diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/MachineLearningManager.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/MachineLearningManager.java deleted file mode 100644 index bb31e555c22f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/MachineLearningManager.java +++ /dev/null @@ -1,1042 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning; - -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.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RequestIdPolicy; -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.machinelearning.fluent.AzureMachineLearningWorkspaces; -import com.azure.resourcemanager.machinelearning.implementation.AzureMachineLearningWorkspacesBuilder; -import com.azure.resourcemanager.machinelearning.implementation.BatchDeploymentsImpl; -import com.azure.resourcemanager.machinelearning.implementation.BatchEndpointsImpl; -import com.azure.resourcemanager.machinelearning.implementation.CodeContainersImpl; -import com.azure.resourcemanager.machinelearning.implementation.CodeVersionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.ComponentContainersImpl; -import com.azure.resourcemanager.machinelearning.implementation.ComponentVersionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.ComputesImpl; -import com.azure.resourcemanager.machinelearning.implementation.DataContainersImpl; -import com.azure.resourcemanager.machinelearning.implementation.DatastoresImpl; -import com.azure.resourcemanager.machinelearning.implementation.DataVersionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.EnvironmentContainersImpl; -import com.azure.resourcemanager.machinelearning.implementation.EnvironmentVersionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.FeaturesetContainersImpl; -import com.azure.resourcemanager.machinelearning.implementation.FeaturesetVersionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.FeaturesImpl; -import com.azure.resourcemanager.machinelearning.implementation.FeaturestoreEntityContainersImpl; -import com.azure.resourcemanager.machinelearning.implementation.FeaturestoreEntityVersionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.JobsImpl; -import com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkProvisionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkSettingsRulesImpl; -import com.azure.resourcemanager.machinelearning.implementation.MarketplaceSubscriptionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.ModelContainersImpl; -import com.azure.resourcemanager.machinelearning.implementation.ModelVersionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.OnlineDeploymentsImpl; -import com.azure.resourcemanager.machinelearning.implementation.OnlineEndpointsImpl; -import com.azure.resourcemanager.machinelearning.implementation.OperationsImpl; -import com.azure.resourcemanager.machinelearning.implementation.PrivateEndpointConnectionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.PrivateLinkResourcesImpl; -import com.azure.resourcemanager.machinelearning.implementation.QuotasImpl; -import com.azure.resourcemanager.machinelearning.implementation.RegistriesImpl; -import com.azure.resourcemanager.machinelearning.implementation.RegistryCodeContainersImpl; -import com.azure.resourcemanager.machinelearning.implementation.RegistryCodeVersionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.RegistryComponentContainersImpl; -import com.azure.resourcemanager.machinelearning.implementation.RegistryComponentVersionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.RegistryDataContainersImpl; -import com.azure.resourcemanager.machinelearning.implementation.RegistryDataReferencesImpl; -import com.azure.resourcemanager.machinelearning.implementation.RegistryDataVersionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentContainersImpl; -import com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentVersionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.RegistryModelContainersImpl; -import com.azure.resourcemanager.machinelearning.implementation.RegistryModelVersionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.SchedulesImpl; -import com.azure.resourcemanager.machinelearning.implementation.ServerlessEndpointsImpl; -import com.azure.resourcemanager.machinelearning.implementation.UsagesImpl; -import com.azure.resourcemanager.machinelearning.implementation.VirtualMachineSizesImpl; -import com.azure.resourcemanager.machinelearning.implementation.WorkspaceConnectionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.WorkspaceFeaturesImpl; -import com.azure.resourcemanager.machinelearning.implementation.WorkspacesImpl; -import com.azure.resourcemanager.machinelearning.models.BatchDeployments; -import com.azure.resourcemanager.machinelearning.models.BatchEndpoints; -import com.azure.resourcemanager.machinelearning.models.CodeContainers; -import com.azure.resourcemanager.machinelearning.models.CodeVersions; -import com.azure.resourcemanager.machinelearning.models.ComponentContainers; -import com.azure.resourcemanager.machinelearning.models.ComponentVersions; -import com.azure.resourcemanager.machinelearning.models.Computes; -import com.azure.resourcemanager.machinelearning.models.DataContainers; -import com.azure.resourcemanager.machinelearning.models.Datastores; -import com.azure.resourcemanager.machinelearning.models.DataVersions; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainers; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersions; -import com.azure.resourcemanager.machinelearning.models.Features; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainers; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersions; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainers; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersions; -import com.azure.resourcemanager.machinelearning.models.Jobs; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisions; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsRules; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptions; -import com.azure.resourcemanager.machinelearning.models.ModelContainers; -import com.azure.resourcemanager.machinelearning.models.ModelVersions; -import com.azure.resourcemanager.machinelearning.models.OnlineDeployments; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpoints; -import com.azure.resourcemanager.machinelearning.models.Operations; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnections; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResources; -import com.azure.resourcemanager.machinelearning.models.Quotas; -import com.azure.resourcemanager.machinelearning.models.Registries; -import com.azure.resourcemanager.machinelearning.models.RegistryCodeContainers; -import com.azure.resourcemanager.machinelearning.models.RegistryCodeVersions; -import com.azure.resourcemanager.machinelearning.models.RegistryComponentContainers; -import com.azure.resourcemanager.machinelearning.models.RegistryComponentVersions; -import com.azure.resourcemanager.machinelearning.models.RegistryDataContainers; -import com.azure.resourcemanager.machinelearning.models.RegistryDataReferences; -import com.azure.resourcemanager.machinelearning.models.RegistryDataVersions; -import com.azure.resourcemanager.machinelearning.models.RegistryEnvironmentContainers; -import com.azure.resourcemanager.machinelearning.models.RegistryEnvironmentVersions; -import com.azure.resourcemanager.machinelearning.models.RegistryModelContainers; -import com.azure.resourcemanager.machinelearning.models.RegistryModelVersions; -import com.azure.resourcemanager.machinelearning.models.Schedules; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoints; -import com.azure.resourcemanager.machinelearning.models.Usages; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizes; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnections; -import com.azure.resourcemanager.machinelearning.models.WorkspaceFeatures; -import com.azure.resourcemanager.machinelearning.models.Workspaces; -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 MachineLearningManager. - * These APIs allow end users to operate on Azure Machine Learning Workspace resources. - */ -public final class MachineLearningManager { - private Operations operations; - - private Workspaces workspaces; - - private Usages usages; - - private VirtualMachineSizes virtualMachineSizes; - - private Quotas quotas; - - private Computes computes; - - private PrivateEndpointConnections privateEndpointConnections; - - private PrivateLinkResources privateLinkResources; - - private WorkspaceConnections workspaceConnections; - - private ManagedNetworkSettingsRules managedNetworkSettingsRules; - - private ManagedNetworkProvisions managedNetworkProvisions; - - private RegistryCodeContainers registryCodeContainers; - - private RegistryCodeVersions registryCodeVersions; - - private RegistryComponentContainers registryComponentContainers; - - private RegistryComponentVersions registryComponentVersions; - - private RegistryDataContainers registryDataContainers; - - private RegistryDataVersions registryDataVersions; - - private RegistryDataReferences registryDataReferences; - - private RegistryEnvironmentContainers registryEnvironmentContainers; - - private RegistryEnvironmentVersions registryEnvironmentVersions; - - private RegistryModelContainers registryModelContainers; - - private RegistryModelVersions registryModelVersions; - - private BatchEndpoints batchEndpoints; - - private BatchDeployments batchDeployments; - - private CodeContainers codeContainers; - - private CodeVersions codeVersions; - - private ComponentContainers componentContainers; - - private ComponentVersions componentVersions; - - private DataContainers dataContainers; - - private DataVersions dataVersions; - - private Datastores datastores; - - private EnvironmentContainers environmentContainers; - - private EnvironmentVersions environmentVersions; - - private FeaturesetContainers featuresetContainers; - - private Features features; - - private FeaturesetVersions featuresetVersions; - - private FeaturestoreEntityContainers featurestoreEntityContainers; - - private FeaturestoreEntityVersions featurestoreEntityVersions; - - private Jobs jobs; - - private MarketplaceSubscriptions marketplaceSubscriptions; - - private ModelContainers modelContainers; - - private ModelVersions modelVersions; - - private OnlineEndpoints onlineEndpoints; - - private OnlineDeployments onlineDeployments; - - private Schedules schedules; - - private ServerlessEndpoints serverlessEndpoints; - - private Registries registries; - - private WorkspaceFeatures workspaceFeatures; - - private final AzureMachineLearningWorkspaces clientObject; - - private MachineLearningManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new AzureMachineLearningWorkspacesBuilder().pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of Machine Learning service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the Machine Learning service API instance. - */ - public static MachineLearningManager 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 Machine Learning service API entry point. - * - * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. - * @param profile the Azure profile for client. - * @return the Machine Learning service API instance. - */ - public static MachineLearningManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return new MachineLearningManager(httpPipeline, profile, null); - } - - /** - * Gets a Configurable instance that can be used to create MachineLearningManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new MachineLearningManager.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 Machine Learning service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the Machine Learning service API instance. - */ - public MachineLearningManager 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.machinelearning") - .append("/") - .append("1.1.0"); - if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder.append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (scopes.isEmpty()) { - scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); - } - if (retryPolicy == null) { - if (retryOptions != null) { - retryPolicy = new RetryPolicy(retryOptions); - } else { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new AddHeadersFromContextPolicy()); - policies.add(new RequestIdPolicy()); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies.add(new 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 MachineLearningManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of Workspaces. It manages Workspace. - * - * @return Resource collection API of Workspaces. - */ - public Workspaces workspaces() { - if (this.workspaces == null) { - this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this); - } - return workspaces; - } - - /** - * Gets the resource collection API of Usages. - * - * @return Resource collection API of Usages. - */ - public Usages usages() { - if (this.usages == null) { - this.usages = new UsagesImpl(clientObject.getUsages(), this); - } - return usages; - } - - /** - * Gets the resource collection API of VirtualMachineSizes. - * - * @return Resource collection API of VirtualMachineSizes. - */ - public VirtualMachineSizes virtualMachineSizes() { - if (this.virtualMachineSizes == null) { - this.virtualMachineSizes = new VirtualMachineSizesImpl(clientObject.getVirtualMachineSizes(), this); - } - return virtualMachineSizes; - } - - /** - * Gets the resource collection API of Quotas. - * - * @return Resource collection API of Quotas. - */ - public Quotas quotas() { - if (this.quotas == null) { - this.quotas = new QuotasImpl(clientObject.getQuotas(), this); - } - return quotas; - } - - /** - * Gets the resource collection API of Computes. It manages ComputeResource. - * - * @return Resource collection API of Computes. - */ - public Computes computes() { - if (this.computes == null) { - this.computes = new ComputesImpl(clientObject.getComputes(), this); - } - return computes; - } - - /** - * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. - * - * @return Resource collection API of PrivateEndpointConnections. - */ - public PrivateEndpointConnections privateEndpointConnections() { - if (this.privateEndpointConnections == null) { - this.privateEndpointConnections - = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); - } - return privateEndpointConnections; - } - - /** - * Gets the resource collection API of PrivateLinkResources. - * - * @return Resource collection API of PrivateLinkResources. - */ - public PrivateLinkResources privateLinkResources() { - if (this.privateLinkResources == null) { - this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); - } - return privateLinkResources; - } - - /** - * Gets the resource collection API of WorkspaceConnections. It manages - * WorkspaceConnectionPropertiesV2BasicResource. - * - * @return Resource collection API of WorkspaceConnections. - */ - public WorkspaceConnections workspaceConnections() { - if (this.workspaceConnections == null) { - this.workspaceConnections = new WorkspaceConnectionsImpl(clientObject.getWorkspaceConnections(), this); - } - return workspaceConnections; - } - - /** - * Gets the resource collection API of ManagedNetworkSettingsRules. It manages OutboundRuleBasicResource. - * - * @return Resource collection API of ManagedNetworkSettingsRules. - */ - public ManagedNetworkSettingsRules managedNetworkSettingsRules() { - if (this.managedNetworkSettingsRules == null) { - this.managedNetworkSettingsRules - = new ManagedNetworkSettingsRulesImpl(clientObject.getManagedNetworkSettingsRules(), this); - } - return managedNetworkSettingsRules; - } - - /** - * Gets the resource collection API of ManagedNetworkProvisions. - * - * @return Resource collection API of ManagedNetworkProvisions. - */ - public ManagedNetworkProvisions managedNetworkProvisions() { - if (this.managedNetworkProvisions == null) { - this.managedNetworkProvisions - = new ManagedNetworkProvisionsImpl(clientObject.getManagedNetworkProvisions(), this); - } - return managedNetworkProvisions; - } - - /** - * Gets the resource collection API of RegistryCodeContainers. - * - * @return Resource collection API of RegistryCodeContainers. - */ - public RegistryCodeContainers registryCodeContainers() { - if (this.registryCodeContainers == null) { - this.registryCodeContainers - = new RegistryCodeContainersImpl(clientObject.getRegistryCodeContainers(), this); - } - return registryCodeContainers; - } - - /** - * Gets the resource collection API of RegistryCodeVersions. - * - * @return Resource collection API of RegistryCodeVersions. - */ - public RegistryCodeVersions registryCodeVersions() { - if (this.registryCodeVersions == null) { - this.registryCodeVersions = new RegistryCodeVersionsImpl(clientObject.getRegistryCodeVersions(), this); - } - return registryCodeVersions; - } - - /** - * Gets the resource collection API of RegistryComponentContainers. - * - * @return Resource collection API of RegistryComponentContainers. - */ - public RegistryComponentContainers registryComponentContainers() { - if (this.registryComponentContainers == null) { - this.registryComponentContainers - = new RegistryComponentContainersImpl(clientObject.getRegistryComponentContainers(), this); - } - return registryComponentContainers; - } - - /** - * Gets the resource collection API of RegistryComponentVersions. - * - * @return Resource collection API of RegistryComponentVersions. - */ - public RegistryComponentVersions registryComponentVersions() { - if (this.registryComponentVersions == null) { - this.registryComponentVersions - = new RegistryComponentVersionsImpl(clientObject.getRegistryComponentVersions(), this); - } - return registryComponentVersions; - } - - /** - * Gets the resource collection API of RegistryDataContainers. - * - * @return Resource collection API of RegistryDataContainers. - */ - public RegistryDataContainers registryDataContainers() { - if (this.registryDataContainers == null) { - this.registryDataContainers - = new RegistryDataContainersImpl(clientObject.getRegistryDataContainers(), this); - } - return registryDataContainers; - } - - /** - * Gets the resource collection API of RegistryDataVersions. - * - * @return Resource collection API of RegistryDataVersions. - */ - public RegistryDataVersions registryDataVersions() { - if (this.registryDataVersions == null) { - this.registryDataVersions = new RegistryDataVersionsImpl(clientObject.getRegistryDataVersions(), this); - } - return registryDataVersions; - } - - /** - * Gets the resource collection API of RegistryDataReferences. - * - * @return Resource collection API of RegistryDataReferences. - */ - public RegistryDataReferences registryDataReferences() { - if (this.registryDataReferences == null) { - this.registryDataReferences - = new RegistryDataReferencesImpl(clientObject.getRegistryDataReferences(), this); - } - return registryDataReferences; - } - - /** - * Gets the resource collection API of RegistryEnvironmentContainers. - * - * @return Resource collection API of RegistryEnvironmentContainers. - */ - public RegistryEnvironmentContainers registryEnvironmentContainers() { - if (this.registryEnvironmentContainers == null) { - this.registryEnvironmentContainers - = new RegistryEnvironmentContainersImpl(clientObject.getRegistryEnvironmentContainers(), this); - } - return registryEnvironmentContainers; - } - - /** - * Gets the resource collection API of RegistryEnvironmentVersions. - * - * @return Resource collection API of RegistryEnvironmentVersions. - */ - public RegistryEnvironmentVersions registryEnvironmentVersions() { - if (this.registryEnvironmentVersions == null) { - this.registryEnvironmentVersions - = new RegistryEnvironmentVersionsImpl(clientObject.getRegistryEnvironmentVersions(), this); - } - return registryEnvironmentVersions; - } - - /** - * Gets the resource collection API of RegistryModelContainers. - * - * @return Resource collection API of RegistryModelContainers. - */ - public RegistryModelContainers registryModelContainers() { - if (this.registryModelContainers == null) { - this.registryModelContainers - = new RegistryModelContainersImpl(clientObject.getRegistryModelContainers(), this); - } - return registryModelContainers; - } - - /** - * Gets the resource collection API of RegistryModelVersions. - * - * @return Resource collection API of RegistryModelVersions. - */ - public RegistryModelVersions registryModelVersions() { - if (this.registryModelVersions == null) { - this.registryModelVersions = new RegistryModelVersionsImpl(clientObject.getRegistryModelVersions(), this); - } - return registryModelVersions; - } - - /** - * Gets the resource collection API of BatchEndpoints. It manages BatchEndpoint. - * - * @return Resource collection API of BatchEndpoints. - */ - public BatchEndpoints batchEndpoints() { - if (this.batchEndpoints == null) { - this.batchEndpoints = new BatchEndpointsImpl(clientObject.getBatchEndpoints(), this); - } - return batchEndpoints; - } - - /** - * Gets the resource collection API of BatchDeployments. It manages BatchDeployment. - * - * @return Resource collection API of BatchDeployments. - */ - public BatchDeployments batchDeployments() { - if (this.batchDeployments == null) { - this.batchDeployments = new BatchDeploymentsImpl(clientObject.getBatchDeployments(), this); - } - return batchDeployments; - } - - /** - * Gets the resource collection API of CodeContainers. It manages CodeContainer. - * - * @return Resource collection API of CodeContainers. - */ - public CodeContainers codeContainers() { - if (this.codeContainers == null) { - this.codeContainers = new CodeContainersImpl(clientObject.getCodeContainers(), this); - } - return codeContainers; - } - - /** - * Gets the resource collection API of CodeVersions. It manages CodeVersion. - * - * @return Resource collection API of CodeVersions. - */ - public CodeVersions codeVersions() { - if (this.codeVersions == null) { - this.codeVersions = new CodeVersionsImpl(clientObject.getCodeVersions(), this); - } - return codeVersions; - } - - /** - * Gets the resource collection API of ComponentContainers. It manages ComponentContainer. - * - * @return Resource collection API of ComponentContainers. - */ - public ComponentContainers componentContainers() { - if (this.componentContainers == null) { - this.componentContainers = new ComponentContainersImpl(clientObject.getComponentContainers(), this); - } - return componentContainers; - } - - /** - * Gets the resource collection API of ComponentVersions. It manages ComponentVersion. - * - * @return Resource collection API of ComponentVersions. - */ - public ComponentVersions componentVersions() { - if (this.componentVersions == null) { - this.componentVersions = new ComponentVersionsImpl(clientObject.getComponentVersions(), this); - } - return componentVersions; - } - - /** - * Gets the resource collection API of DataContainers. It manages DataContainer. - * - * @return Resource collection API of DataContainers. - */ - public DataContainers dataContainers() { - if (this.dataContainers == null) { - this.dataContainers = new DataContainersImpl(clientObject.getDataContainers(), this); - } - return dataContainers; - } - - /** - * Gets the resource collection API of DataVersions. It manages DataVersionBase. - * - * @return Resource collection API of DataVersions. - */ - public DataVersions dataVersions() { - if (this.dataVersions == null) { - this.dataVersions = new DataVersionsImpl(clientObject.getDataVersions(), this); - } - return dataVersions; - } - - /** - * Gets the resource collection API of Datastores. It manages Datastore. - * - * @return Resource collection API of Datastores. - */ - public Datastores datastores() { - if (this.datastores == null) { - this.datastores = new DatastoresImpl(clientObject.getDatastores(), this); - } - return datastores; - } - - /** - * Gets the resource collection API of EnvironmentContainers. It manages EnvironmentContainer. - * - * @return Resource collection API of EnvironmentContainers. - */ - public EnvironmentContainers environmentContainers() { - if (this.environmentContainers == null) { - this.environmentContainers = new EnvironmentContainersImpl(clientObject.getEnvironmentContainers(), this); - } - return environmentContainers; - } - - /** - * Gets the resource collection API of EnvironmentVersions. It manages EnvironmentVersion. - * - * @return Resource collection API of EnvironmentVersions. - */ - public EnvironmentVersions environmentVersions() { - if (this.environmentVersions == null) { - this.environmentVersions = new EnvironmentVersionsImpl(clientObject.getEnvironmentVersions(), this); - } - return environmentVersions; - } - - /** - * Gets the resource collection API of FeaturesetContainers. It manages FeaturesetContainer. - * - * @return Resource collection API of FeaturesetContainers. - */ - public FeaturesetContainers featuresetContainers() { - if (this.featuresetContainers == null) { - this.featuresetContainers = new FeaturesetContainersImpl(clientObject.getFeaturesetContainers(), this); - } - return featuresetContainers; - } - - /** - * Gets the resource collection API of Features. - * - * @return Resource collection API of Features. - */ - public Features features() { - if (this.features == null) { - this.features = new FeaturesImpl(clientObject.getFeatures(), this); - } - return features; - } - - /** - * Gets the resource collection API of FeaturesetVersions. It manages FeaturesetVersion. - * - * @return Resource collection API of FeaturesetVersions. - */ - public FeaturesetVersions featuresetVersions() { - if (this.featuresetVersions == null) { - this.featuresetVersions = new FeaturesetVersionsImpl(clientObject.getFeaturesetVersions(), this); - } - return featuresetVersions; - } - - /** - * Gets the resource collection API of FeaturestoreEntityContainers. It manages FeaturestoreEntityContainer. - * - * @return Resource collection API of FeaturestoreEntityContainers. - */ - public FeaturestoreEntityContainers featurestoreEntityContainers() { - if (this.featurestoreEntityContainers == null) { - this.featurestoreEntityContainers - = new FeaturestoreEntityContainersImpl(clientObject.getFeaturestoreEntityContainers(), this); - } - return featurestoreEntityContainers; - } - - /** - * Gets the resource collection API of FeaturestoreEntityVersions. It manages FeaturestoreEntityVersion. - * - * @return Resource collection API of FeaturestoreEntityVersions. - */ - public FeaturestoreEntityVersions featurestoreEntityVersions() { - if (this.featurestoreEntityVersions == null) { - this.featurestoreEntityVersions - = new FeaturestoreEntityVersionsImpl(clientObject.getFeaturestoreEntityVersions(), this); - } - return featurestoreEntityVersions; - } - - /** - * Gets the resource collection API of Jobs. It manages JobBase. - * - * @return Resource collection API of Jobs. - */ - public Jobs jobs() { - if (this.jobs == null) { - this.jobs = new JobsImpl(clientObject.getJobs(), this); - } - return jobs; - } - - /** - * Gets the resource collection API of MarketplaceSubscriptions. It manages MarketplaceSubscription. - * - * @return Resource collection API of MarketplaceSubscriptions. - */ - public MarketplaceSubscriptions marketplaceSubscriptions() { - if (this.marketplaceSubscriptions == null) { - this.marketplaceSubscriptions - = new MarketplaceSubscriptionsImpl(clientObject.getMarketplaceSubscriptions(), this); - } - return marketplaceSubscriptions; - } - - /** - * Gets the resource collection API of ModelContainers. It manages ModelContainer. - * - * @return Resource collection API of ModelContainers. - */ - public ModelContainers modelContainers() { - if (this.modelContainers == null) { - this.modelContainers = new ModelContainersImpl(clientObject.getModelContainers(), this); - } - return modelContainers; - } - - /** - * Gets the resource collection API of ModelVersions. It manages ModelVersion. - * - * @return Resource collection API of ModelVersions. - */ - public ModelVersions modelVersions() { - if (this.modelVersions == null) { - this.modelVersions = new ModelVersionsImpl(clientObject.getModelVersions(), this); - } - return modelVersions; - } - - /** - * Gets the resource collection API of OnlineEndpoints. It manages OnlineEndpoint. - * - * @return Resource collection API of OnlineEndpoints. - */ - public OnlineEndpoints onlineEndpoints() { - if (this.onlineEndpoints == null) { - this.onlineEndpoints = new OnlineEndpointsImpl(clientObject.getOnlineEndpoints(), this); - } - return onlineEndpoints; - } - - /** - * Gets the resource collection API of OnlineDeployments. It manages OnlineDeployment. - * - * @return Resource collection API of OnlineDeployments. - */ - public OnlineDeployments onlineDeployments() { - if (this.onlineDeployments == null) { - this.onlineDeployments = new OnlineDeploymentsImpl(clientObject.getOnlineDeployments(), this); - } - return onlineDeployments; - } - - /** - * Gets the resource collection API of Schedules. It manages Schedule. - * - * @return Resource collection API of Schedules. - */ - public Schedules schedules() { - if (this.schedules == null) { - this.schedules = new SchedulesImpl(clientObject.getSchedules(), this); - } - return schedules; - } - - /** - * Gets the resource collection API of ServerlessEndpoints. It manages ServerlessEndpoint. - * - * @return Resource collection API of ServerlessEndpoints. - */ - public ServerlessEndpoints serverlessEndpoints() { - if (this.serverlessEndpoints == null) { - this.serverlessEndpoints = new ServerlessEndpointsImpl(clientObject.getServerlessEndpoints(), this); - } - return serverlessEndpoints; - } - - /** - * Gets the resource collection API of Registries. It manages Registry. - * - * @return Resource collection API of Registries. - */ - public Registries registries() { - if (this.registries == null) { - this.registries = new RegistriesImpl(clientObject.getRegistries(), this); - } - return registries; - } - - /** - * Gets the resource collection API of WorkspaceFeatures. - * - * @return Resource collection API of WorkspaceFeatures. - */ - public WorkspaceFeatures workspaceFeatures() { - if (this.workspaceFeatures == null) { - this.workspaceFeatures = new WorkspaceFeaturesImpl(clientObject.getWorkspaceFeatures(), this); - } - return workspaceFeatures; - } - - /** - * Gets wrapped service client AzureMachineLearningWorkspaces providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. - * - * @return Wrapped service client AzureMachineLearningWorkspaces. - */ - public AzureMachineLearningWorkspaces serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningWorkspaces.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningWorkspaces.java deleted file mode 100644 index f9ec50f298e5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningWorkspaces.java +++ /dev/null @@ -1,384 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** - * The interface for AzureMachineLearningWorkspaces class. - */ -public interface AzureMachineLearningWorkspaces { - /** - * 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 OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the WorkspacesClient object to access its operations. - * - * @return the WorkspacesClient object. - */ - WorkspacesClient getWorkspaces(); - - /** - * Gets the UsagesClient object to access its operations. - * - * @return the UsagesClient object. - */ - UsagesClient getUsages(); - - /** - * Gets the VirtualMachineSizesClient object to access its operations. - * - * @return the VirtualMachineSizesClient object. - */ - VirtualMachineSizesClient getVirtualMachineSizes(); - - /** - * Gets the QuotasClient object to access its operations. - * - * @return the QuotasClient object. - */ - QuotasClient getQuotas(); - - /** - * Gets the ComputesClient object to access its operations. - * - * @return the ComputesClient object. - */ - ComputesClient getComputes(); - - /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. - * - * @return the PrivateEndpointConnectionsClient object. - */ - PrivateEndpointConnectionsClient getPrivateEndpointConnections(); - - /** - * Gets the PrivateLinkResourcesClient object to access its operations. - * - * @return the PrivateLinkResourcesClient object. - */ - PrivateLinkResourcesClient getPrivateLinkResources(); - - /** - * Gets the WorkspaceConnectionsClient object to access its operations. - * - * @return the WorkspaceConnectionsClient object. - */ - WorkspaceConnectionsClient getWorkspaceConnections(); - - /** - * Gets the ManagedNetworkSettingsRulesClient object to access its operations. - * - * @return the ManagedNetworkSettingsRulesClient object. - */ - ManagedNetworkSettingsRulesClient getManagedNetworkSettingsRules(); - - /** - * Gets the ManagedNetworkProvisionsClient object to access its operations. - * - * @return the ManagedNetworkProvisionsClient object. - */ - ManagedNetworkProvisionsClient getManagedNetworkProvisions(); - - /** - * Gets the RegistryCodeContainersClient object to access its operations. - * - * @return the RegistryCodeContainersClient object. - */ - RegistryCodeContainersClient getRegistryCodeContainers(); - - /** - * Gets the RegistryCodeVersionsClient object to access its operations. - * - * @return the RegistryCodeVersionsClient object. - */ - RegistryCodeVersionsClient getRegistryCodeVersions(); - - /** - * Gets the RegistryComponentContainersClient object to access its operations. - * - * @return the RegistryComponentContainersClient object. - */ - RegistryComponentContainersClient getRegistryComponentContainers(); - - /** - * Gets the RegistryComponentVersionsClient object to access its operations. - * - * @return the RegistryComponentVersionsClient object. - */ - RegistryComponentVersionsClient getRegistryComponentVersions(); - - /** - * Gets the RegistryDataContainersClient object to access its operations. - * - * @return the RegistryDataContainersClient object. - */ - RegistryDataContainersClient getRegistryDataContainers(); - - /** - * Gets the RegistryDataVersionsClient object to access its operations. - * - * @return the RegistryDataVersionsClient object. - */ - RegistryDataVersionsClient getRegistryDataVersions(); - - /** - * Gets the RegistryDataReferencesClient object to access its operations. - * - * @return the RegistryDataReferencesClient object. - */ - RegistryDataReferencesClient getRegistryDataReferences(); - - /** - * Gets the RegistryEnvironmentContainersClient object to access its operations. - * - * @return the RegistryEnvironmentContainersClient object. - */ - RegistryEnvironmentContainersClient getRegistryEnvironmentContainers(); - - /** - * Gets the RegistryEnvironmentVersionsClient object to access its operations. - * - * @return the RegistryEnvironmentVersionsClient object. - */ - RegistryEnvironmentVersionsClient getRegistryEnvironmentVersions(); - - /** - * Gets the RegistryModelContainersClient object to access its operations. - * - * @return the RegistryModelContainersClient object. - */ - RegistryModelContainersClient getRegistryModelContainers(); - - /** - * Gets the RegistryModelVersionsClient object to access its operations. - * - * @return the RegistryModelVersionsClient object. - */ - RegistryModelVersionsClient getRegistryModelVersions(); - - /** - * Gets the BatchEndpointsClient object to access its operations. - * - * @return the BatchEndpointsClient object. - */ - BatchEndpointsClient getBatchEndpoints(); - - /** - * Gets the BatchDeploymentsClient object to access its operations. - * - * @return the BatchDeploymentsClient object. - */ - BatchDeploymentsClient getBatchDeployments(); - - /** - * Gets the CodeContainersClient object to access its operations. - * - * @return the CodeContainersClient object. - */ - CodeContainersClient getCodeContainers(); - - /** - * Gets the CodeVersionsClient object to access its operations. - * - * @return the CodeVersionsClient object. - */ - CodeVersionsClient getCodeVersions(); - - /** - * Gets the ComponentContainersClient object to access its operations. - * - * @return the ComponentContainersClient object. - */ - ComponentContainersClient getComponentContainers(); - - /** - * Gets the ComponentVersionsClient object to access its operations. - * - * @return the ComponentVersionsClient object. - */ - ComponentVersionsClient getComponentVersions(); - - /** - * Gets the DataContainersClient object to access its operations. - * - * @return the DataContainersClient object. - */ - DataContainersClient getDataContainers(); - - /** - * Gets the DataVersionsClient object to access its operations. - * - * @return the DataVersionsClient object. - */ - DataVersionsClient getDataVersions(); - - /** - * Gets the DatastoresClient object to access its operations. - * - * @return the DatastoresClient object. - */ - DatastoresClient getDatastores(); - - /** - * Gets the EnvironmentContainersClient object to access its operations. - * - * @return the EnvironmentContainersClient object. - */ - EnvironmentContainersClient getEnvironmentContainers(); - - /** - * Gets the EnvironmentVersionsClient object to access its operations. - * - * @return the EnvironmentVersionsClient object. - */ - EnvironmentVersionsClient getEnvironmentVersions(); - - /** - * Gets the FeaturesetContainersClient object to access its operations. - * - * @return the FeaturesetContainersClient object. - */ - FeaturesetContainersClient getFeaturesetContainers(); - - /** - * Gets the FeaturesClient object to access its operations. - * - * @return the FeaturesClient object. - */ - FeaturesClient getFeatures(); - - /** - * Gets the FeaturesetVersionsClient object to access its operations. - * - * @return the FeaturesetVersionsClient object. - */ - FeaturesetVersionsClient getFeaturesetVersions(); - - /** - * Gets the FeaturestoreEntityContainersClient object to access its operations. - * - * @return the FeaturestoreEntityContainersClient object. - */ - FeaturestoreEntityContainersClient getFeaturestoreEntityContainers(); - - /** - * Gets the FeaturestoreEntityVersionsClient object to access its operations. - * - * @return the FeaturestoreEntityVersionsClient object. - */ - FeaturestoreEntityVersionsClient getFeaturestoreEntityVersions(); - - /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. - */ - JobsClient getJobs(); - - /** - * Gets the MarketplaceSubscriptionsClient object to access its operations. - * - * @return the MarketplaceSubscriptionsClient object. - */ - MarketplaceSubscriptionsClient getMarketplaceSubscriptions(); - - /** - * Gets the ModelContainersClient object to access its operations. - * - * @return the ModelContainersClient object. - */ - ModelContainersClient getModelContainers(); - - /** - * Gets the ModelVersionsClient object to access its operations. - * - * @return the ModelVersionsClient object. - */ - ModelVersionsClient getModelVersions(); - - /** - * Gets the OnlineEndpointsClient object to access its operations. - * - * @return the OnlineEndpointsClient object. - */ - OnlineEndpointsClient getOnlineEndpoints(); - - /** - * Gets the OnlineDeploymentsClient object to access its operations. - * - * @return the OnlineDeploymentsClient object. - */ - OnlineDeploymentsClient getOnlineDeployments(); - - /** - * Gets the SchedulesClient object to access its operations. - * - * @return the SchedulesClient object. - */ - SchedulesClient getSchedules(); - - /** - * Gets the ServerlessEndpointsClient object to access its operations. - * - * @return the ServerlessEndpointsClient object. - */ - ServerlessEndpointsClient getServerlessEndpoints(); - - /** - * Gets the RegistriesClient object to access its operations. - * - * @return the RegistriesClient object. - */ - RegistriesClient getRegistries(); - - /** - * Gets the WorkspaceFeaturesClient object to access its operations. - * - * @return the WorkspaceFeaturesClient object. - */ - WorkspaceFeaturesClient getWorkspaceFeatures(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchDeploymentsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchDeploymentsClient.java deleted file mode 100644 index 8ef782e7a521..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchDeploymentsClient.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.machinelearning.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.machinelearning.fluent.models.BatchDeploymentInner; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties; - -/** - * An instance of this class provides access to all the operations defined in BatchDeploymentsClient. - */ -public interface BatchDeploymentsClient { - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @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 a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @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 a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, - String orderBy, Integer top, String skip, Context context); - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName); - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Context context); - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - Context context); - - /** - * Gets a batch inference deployment by id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @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 a batch inference deployment by id along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Context context); - - /** - * Gets a batch inference deployment by id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @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 a batch inference deployment by id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentInner get(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName); - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchDeploymentInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body); - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchDeploymentInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context); - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body); - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context); - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchDeploymentInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, BatchDeploymentInner body); - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchDeploymentInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, BatchDeploymentInner body, Context context); - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, BatchDeploymentInner body); - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, BatchDeploymentInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java deleted file mode 100644 index ad9d816bd275..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java +++ /dev/null @@ -1,300 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.BatchEndpointInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; - -/** - * An instance of this class provides access to all the operations defined in BatchEndpointsClient. - */ -public interface BatchEndpointsClient { - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @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 a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, - Context context); - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, - Context context); - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName, Context context); - - /** - * Gets a batch inference endpoint by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @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 a batch inference endpoint by name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - Context context); - - /** - * Gets a batch inference endpoint by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @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 a batch inference endpoint by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointInner get(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchEndpointInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body); - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchEndpointInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context); - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body); - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body, Context context); - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchEndpointInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, BatchEndpointInner body); - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchEndpointInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, BatchEndpointInner body, Context context); - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - BatchEndpointInner body); - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - BatchEndpointInner body, Context context); - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @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 keys for endpoint authentication along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse(String resourceGroupName, String workspaceName, - String endpointName, Context context); - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @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 keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.java deleted file mode 100644 index de4baa9510dd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.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.machinelearning.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.machinelearning.fluent.models.CodeContainerInner; - -/** - * An instance of this class provides access to all the operations defined in CodeContainersClient. - */ -public interface CodeContainersClient { - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeContainerInner get(String resourceGroupName, String workspaceName, String name); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, - CodeContainerInner body, Context context); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - CodeContainerInner body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java deleted file mode 100644 index abfbf9d071d6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.CodeVersionInner; -import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; - -/** - * An instance of this class provides access to all the operations defined in CodeVersionsClient. - */ -public interface CodeVersionsClient { - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. - * @param hashVersion Hash algorithm version when listing by hash. - * @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 a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, - Integer top, String skip, String hash, String hashVersion, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeVersionInner get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, - String version, CodeVersionInner body, Context context); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - CodeVersionInner body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body, Context context); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, - Context context); - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, - String workspaceName, String name, String version, PendingUploadRequestDto body, Context context); - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PendingUploadResponseDtoInner createOrGetStartPendingUpload(String resourceGroupName, String workspaceName, - String name, String version, PendingUploadRequestDto body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.java deleted file mode 100644 index 9758c6b03bcf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.java +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in ComponentContainersClient. - */ -public interface ComponentContainersClient { - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentContainerInner get(String resourceGroupName, String workspaceName, String name); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, ComponentContainerInner body, Context context); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ComponentContainerInner body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java deleted file mode 100644 index b5c5be3c55a0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.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.machinelearning.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.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in ComponentVersionsClient. - */ -public interface ComponentVersionsClient { - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @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 a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentVersionInner get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, String version, ComponentVersionInner body, Context context); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - ComponentVersionInner body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body, Context context); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, - Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java deleted file mode 100644 index 2acd533571d4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java +++ /dev/null @@ -1,527 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.ComputeResourceInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; -import com.azure.resourcemanager.machinelearning.models.ClusterUpdateParameters; -import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; - -/** - * An instance of this class provides access to all the operations defined in ComputesClient. - */ -public interface ComputesClient { - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 computes in specified workspace as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 computes in specified workspace as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context); - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 compute definition by its name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String computeName, - Context context); - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 compute definition by its name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner get(String resourceGroupName, String workspaceName, String computeName); - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComputeResourceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String computeName, ComputeResourceInner parameters); - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComputeResourceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String computeName, ComputeResourceInner parameters, Context context); - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @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 machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String computeName, - ComputeResourceInner parameters); - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @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 machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String computeName, - ComputeResourceInner parameters, Context context); - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComputeResourceInner> beginUpdate(String resourceGroupName, - String workspaceName, String computeName, ClusterUpdateParameters parameters); - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComputeResourceInner> beginUpdate(String resourceGroupName, - String workspaceName, String computeName, ClusterUpdateParameters parameters, Context context); - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @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 machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner update(String resourceGroupName, String workspaceName, String computeName, - ClusterUpdateParameters parameters); - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @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 machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner update(String resourceGroupName, String workspaceName, String computeName, - ClusterUpdateParameters parameters, Context context); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction, Context context); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction, Context context); - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listNodes(String resourceGroupName, String workspaceName, - String computeName); - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listNodes(String resourceGroupName, String workspaceName, - String computeName, Context context); - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 secrets related to Machine Learning compute (storage keys, service credentials, etc) along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse(String resourceGroupName, String workspaceName, - String computeName, Context context); - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeSecretsInner listKeys(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStart(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStart(String resourceGroupName, String workspaceName, String computeName, - Context context); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void start(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void start(String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStop(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStop(String resourceGroupName, String workspaceName, String computeName, - Context context); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void stop(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void stop(String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestart(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestart(String resourceGroupName, String workspaceName, String computeName, - Context context); - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void restart(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void restart(String resourceGroupName, String workspaceName, String computeName, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataContainersClient.java deleted file mode 100644 index 27ae140fa88d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataContainersClient.java +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in DataContainersClient. - */ -public interface DataContainersClient { - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataContainerInner get(String resourceGroupName, String workspaceName, String name); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, - DataContainerInner body, Context context); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - DataContainerInner body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java deleted file mode 100644 index ae284eec114f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in DataVersionsClient. - */ -public interface DataVersionsClient { - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @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 a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @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 a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataVersionBaseInner get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, String version, DataVersionBaseInner body, Context context); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataVersionBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - DataVersionBaseInner body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body, Context context); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, - Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.java deleted file mode 100644 index 4f1a49380464..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.DatastoreInner; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import java.util.List; - -/** - * An instance of this class provides access to all the operations defined in DatastoresClient. - */ -public interface DatastoresClient { - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of Datastore entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @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 a paginated list of Datastore entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, - Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, Context context); - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreInner get(String resourceGroupName, String workspaceName, String name); - - /** - * Create or update datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @param skipValidation Flag to skip validation. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, - DatastoreInner body, Boolean skipValidation, Context context); - - /** - * Create or update datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreInner createOrUpdate(String resourceGroupName, String workspaceName, String name, DatastoreInner body); - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore secrets along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listSecretsWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore secrets. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreSecretsInner listSecrets(String resourceGroupName, String workspaceName, String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java deleted file mode 100644 index ab219d8a088c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in EnvironmentContainersClient. - */ -public interface EnvironmentContainersClient { - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentContainerInner get(String resourceGroupName, String workspaceName, String name); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, EnvironmentContainerInner body, Context context); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - EnvironmentContainerInner body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java deleted file mode 100644 index 761e1ea8a32b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.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.machinelearning.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.machinelearning.fluent.models.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in EnvironmentVersionsClient. - */ -public interface EnvironmentVersionsClient { - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentVersionInner get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Creates or updates an EnvironmentVersion. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, String version, EnvironmentVersionInner body, Context context); - - /** - * Creates or updates an EnvironmentVersion. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - EnvironmentVersionInner body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body, Context context); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, - Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesClient.java deleted file mode 100644 index ed237ab0ca7c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesClient.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.machinelearning.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.machinelearning.fluent.models.FeatureInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in FeaturesClient. - */ -public interface FeaturesClient { - /** - * List Features. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. - * @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 a paginated list of Feature entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion); - - /** - * List Features. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param featureName feature name. - * @param description Description of the featureset. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize Page size. - * @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 a paginated list of Feature entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String skip, String tags, String featureName, String description, - ListViewType listViewType, Integer pageSize, Context context); - - /** - * Get feature. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. - * @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 feature along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String featureName, Context context); - - /** - * Get feature. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. - * @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 feature. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeatureInner get(String resourceGroupName, String workspaceName, String featuresetName, String featuresetVersion, - String featureName); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetContainersClient.java deleted file mode 100644 index 0ced038e3d20..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetContainersClient.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.FeaturesetContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in FeaturesetContainersClient. - */ -public interface FeaturesetContainersClient { - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featureset. - * @param description description for the feature set. - * @param createdBy createdBy user name. - * @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 a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, - Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getEntityWithResponse(String resourceGroupName, String workspaceName, - String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturesetContainerInner getEntity(String resourceGroupName, String workspaceName, String name); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturesetContainerInner> - beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturesetContainerInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body, Context context); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturesetContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturesetContainerInner body); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturesetContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturesetContainerInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetVersionsClient.java deleted file mode 100644 index 86b8128c91af..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetVersionsClient.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.machinelearning.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.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in FeaturesetVersionsClient. - */ -public interface FeaturesetVersionsClient { - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @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 a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featureset version. - * @param version featureset version. - * @param description description for the feature set version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @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 a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, - String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - String version, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturesetVersionInner get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturesetVersionInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String name, String version, FeaturesetVersionInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturesetVersionInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String name, String version, FeaturesetVersionInner body, Context context); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturesetVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - FeaturesetVersionInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturesetVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - FeaturesetVersionInner body, Context context); - - /** - * Backfill. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Feature set version backfill request entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of response payload for creating a backfill request for a given - * feature set version. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturesetVersionBackfillResponseInner> - beginBackfill(String resourceGroupName, String workspaceName, String name, String version, - FeaturesetVersionBackfillRequest body); - - /** - * Backfill. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Feature set version backfill request entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of response payload for creating a backfill request for a given - * feature set version. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturesetVersionBackfillResponseInner> - beginBackfill(String resourceGroupName, String workspaceName, String name, String version, - FeaturesetVersionBackfillRequest body, Context context); - - /** - * Backfill. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Feature set version backfill request entity. - * @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 response payload for creating a backfill request for a given feature set version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturesetVersionBackfillResponseInner backfill(String resourceGroupName, String workspaceName, String name, - String version, FeaturesetVersionBackfillRequest body); - - /** - * Backfill. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Feature set version backfill request entity. - * @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 response payload for creating a backfill request for a given feature set version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturesetVersionBackfillResponseInner backfill(String resourceGroupName, String workspaceName, String name, - String version, FeaturesetVersionBackfillRequest body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityContainersClient.java deleted file mode 100644 index dee9cb58f720..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityContainersClient.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.machinelearning.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.machinelearning.fluent.models.FeaturestoreEntityContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in FeaturestoreEntityContainersClient. - */ -public interface FeaturestoreEntityContainersClient { - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of FeaturestoreEntityContainer entities as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featurestore entity. - * @param description description for the featurestore entity. - * @param createdBy createdBy user name. - * @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 a paginated list of FeaturestoreEntityContainer entities as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, - Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getEntityWithResponse(String resourceGroupName, String workspaceName, - String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturestoreEntityContainerInner getEntity(String resourceGroupName, String workspaceName, String name); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturestoreEntityContainerInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, FeaturestoreEntityContainerInner body); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturestoreEntityContainerInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, FeaturestoreEntityContainerInner body, - Context context); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturestoreEntityContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturestoreEntityContainerInner body); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturestoreEntityContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturestoreEntityContainerInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityVersionsClient.java deleted file mode 100644 index aa9d4b1c549b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityVersionsClient.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.machinelearning.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.machinelearning.fluent.models.FeaturestoreEntityVersionInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in FeaturestoreEntityVersionsClient. - */ -public interface FeaturestoreEntityVersionsClient { - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @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 a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featurestore entity version. - * @param version featurestore entity version. - * @param description description for the feature entity version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @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 a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name, - String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - String version, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, - String name, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturestoreEntityVersionInner get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturestoreEntityVersionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, - FeaturestoreEntityVersionInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturestoreEntityVersionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, - FeaturestoreEntityVersionInner body, Context context); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturestoreEntityVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, FeaturestoreEntityVersionInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturestoreEntityVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, FeaturestoreEntityVersionInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java deleted file mode 100644 index 68a22330dae0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.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.machinelearning.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.machinelearning.fluent.models.JobBaseInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in JobsClient. - */ -public interface JobsClient { - /** - * Lists Jobs in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of JobBase entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Lists Jobs in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param jobType Type of job to be returned. - * @param tag Jobs returned will have this tag key. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param properties Comma-separated list of user property names (and optionally values). Example: - * prop1,prop2=value2. - * @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 a paginated list of JobBase entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, String jobType, - String tag, ListViewType listViewType, String properties, Context context); - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String id); - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String id, - Context context); - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String id); - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String id, Context context); - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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 a Job by name/id along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String id, Context context); - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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 a Job by name/id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobBaseInner get(String resourceGroupName, String workspaceName, String id); - - /** - * Creates and executes a Job. - * For update case, the Tags in the definition passed in will replace Tags in the existing job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String id, - JobBaseInner body, Context context); - - /** - * Creates and executes a Job. - * For update case, the Tags in the definition passed in will replace Tags in the existing job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String id, JobBaseInner body); - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCancel(String resourceGroupName, String workspaceName, String id); - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCancel(String resourceGroupName, String workspaceName, String id, - Context context); - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void cancel(String resourceGroupName, String workspaceName, String id); - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void cancel(String resourceGroupName, String workspaceName, String id, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkProvisionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkProvisionsClient.java deleted file mode 100644 index 1d352bc17141..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkProvisionsClient.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.machinelearning.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions; - -/** - * An instance of this class provides access to all the operations defined in ManagedNetworkProvisionsClient. - */ -public interface ManagedNetworkProvisionsClient { - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of status of the Provisioning for the managed network of a machine - * learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedNetworkProvisionStatusInner> - beginProvisionManagedNetwork(String resourceGroupName, String workspaceName); - - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param body Managed Network Provisioning Options for a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of status of the Provisioning for the managed network of a machine - * learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedNetworkProvisionStatusInner> - beginProvisionManagedNetwork(String resourceGroupName, String workspaceName, - ManagedNetworkProvisionOptions body, Context context); - - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 status of the Provisioning for the managed network of a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedNetworkProvisionStatusInner provisionManagedNetwork(String resourceGroupName, String workspaceName); - - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param body Managed Network Provisioning Options for a machine learning workspace. - * @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 status of the Provisioning for the managed network of a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedNetworkProvisionStatusInner provisionManagedNetwork(String resourceGroupName, String workspaceName, - ManagedNetworkProvisionOptions body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsRulesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsRulesClient.java deleted file mode 100644 index e092cd4e3ab9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsRulesClient.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.machinelearning.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.machinelearning.fluent.models.OutboundRuleBasicResourceInner; - -/** - * An instance of this class provides access to all the operations defined in ManagedNetworkSettingsRulesClient. - */ -public interface ManagedNetworkSettingsRulesClient { - /** - * Lists the managed network outbound rules for a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of outbound rules for the managed network of a machine learning workspace as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Lists the managed network outbound rules for a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of outbound rules for the managed network of a machine learning workspace as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String ruleName); - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String ruleName, - Context context); - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String ruleName); - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String ruleName, Context context); - - /** - * Gets an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @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 an outbound rule from the managed network of a machine learning workspace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, - String ruleName, Context context); - - /** - * Gets an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @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 an outbound rule from the managed network of a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OutboundRuleBasicResourceInner get(String resourceGroupName, String workspaceName, String ruleName); - - /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of outbound Rule Basic Resource for the managed network of a machine - * learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body); - - /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of outbound Rule Basic Resource for the managed network of a machine - * learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body, - Context context); - - /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. - * @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 outbound Rule Basic Resource for the managed network of a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String ruleName, - OutboundRuleBasicResourceInner body); - - /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. - * @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 outbound Rule Basic Resource for the managed network of a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String ruleName, - OutboundRuleBasicResourceInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/MarketplaceSubscriptionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/MarketplaceSubscriptionsClient.java deleted file mode 100644 index 33ef9a340bac..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/MarketplaceSubscriptionsClient.java +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.MarketplaceSubscriptionInner; - -/** - * An instance of this class provides access to all the operations defined in MarketplaceSubscriptionsClient. - */ -public interface MarketplaceSubscriptionsClient { - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context); - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MarketplaceSubscriptionInner get(String resourceGroupName, String workspaceName, String name); - - /** - * Create or update Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MarketplaceSubscriptionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body); - - /** - * Create or update Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MarketplaceSubscriptionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body, - Context context); - - /** - * Create or update Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during 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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MarketplaceSubscriptionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - MarketplaceSubscriptionInner body); - - /** - * Create or update Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MarketplaceSubscriptionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - MarketplaceSubscriptionInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelContainersClient.java deleted file mode 100644 index 847e25e1e82a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelContainersClient.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.machinelearning.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.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in ModelContainersClient. - */ -public interface ModelContainersClient { - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, - ListViewType listViewType, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelContainerInner get(String resourceGroupName, String workspaceName, String name); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, ModelContainerInner body, Context context); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ModelContainerInner body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java deleted file mode 100644 index f331fba8cb0c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.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.machinelearning.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.machinelearning.fluent.models.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in ModelVersionsClient. - */ -public interface ModelVersionsClient { - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @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 a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, - String orderBy, Integer top, String version, String description, Integer offset, String tags, String properties, - String feed, ListViewType listViewType, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelVersionInner get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, - String version, ModelVersionInner body, Context context); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - ModelVersionInner body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body, Context context); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, - Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java deleted file mode 100644 index 0f4e1a6102b2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java +++ /dev/null @@ -1,363 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.DeploymentLogsInner; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner; -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; - -/** - * An instance of this class provides access to all the operations defined in OnlineDeploymentsClient. - */ -public interface OnlineDeploymentsClient { - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @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 a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @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 a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, - String orderBy, Integer top, String skip, Context context); - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName); - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Context context); - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - Context context); - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @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 inference Deployment Deployment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Context context); - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @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 inference Deployment Deployment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentInner get(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName); - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineDeploymentInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body); - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineDeploymentInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body, - Context context); - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialMinimalTrackedResourceWithSku body); - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialMinimalTrackedResourceWithSku body, Context context); - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, OnlineDeploymentInner body); - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, OnlineDeploymentInner body, Context context); - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, OnlineDeploymentInner body); - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, OnlineDeploymentInner body, Context context); - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getLogsWithResponse(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, DeploymentLogsRequest body, Context context); - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentLogsInner getLogs(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, DeploymentLogsRequest body); - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @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 a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSkus(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName); - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param count Number of Skus to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @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 a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSkus(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Integer count, String skip, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java deleted file mode 100644 index 0eb371edea14..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java +++ /dev/null @@ -1,406 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner; -import com.azure.resourcemanager.machinelearning.models.EndpointComputeType; -import com.azure.resourcemanager.machinelearning.models.OrderString; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; -import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; - -/** - * An instance of this class provides access to all the operations defined in OnlineEndpointsClient. - */ -public interface OnlineEndpointsClient { - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @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 a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name, Integer count, - EndpointComputeType computeType, String skip, String tags, String properties, OrderString orderBy, - Context context); - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, - Context context); - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName, Context context); - - /** - * Get Online Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 online Endpoint along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - Context context); - - /** - * Get Online Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 online Endpoint. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointInner get(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineEndpointInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body); - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineEndpointInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context); - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body); - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body, Context context); - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineEndpointInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, OnlineEndpointInner body); - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineEndpointInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, OnlineEndpointInner body, Context context); - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - OnlineEndpointInner body); - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - OnlineEndpointInner body, Context context); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 keys for endpoint authentication along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse(String resourceGroupName, String workspaceName, - String endpointName, Context context); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRegenerateKeys(String resourceGroupName, String workspaceName, - String endpointName, RegenerateEndpointKeysRequest body); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRegenerateKeys(String resourceGroupName, String workspaceName, - String endpointName, RegenerateEndpointKeysRequest body, Context context); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, - RegenerateEndpointKeysRequest body); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, - RegenerateEndpointKeysRequest body, Context context); - - /** - * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 service Token along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getTokenWithResponse(String resourceGroupName, String workspaceName, - String endpointName, Context context); - - /** - * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 service Token. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EndpointAuthTokenInner getToken(String resourceGroupName, String workspaceName, String endpointName); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java deleted file mode 100644 index b222e86651c9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.OperationInner; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public interface OperationsClient { - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.java deleted file mode 100644 index b3867155b4b7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.java +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.PrivateEndpointConnectionInner; - -/** - * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. - */ -public interface PrivateEndpointConnectionsClient { - /** - * List all the private endpoint connections associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List all the private endpoint connections associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @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 specified private endpoint connection associated with the workspace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context); - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @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 specified private endpoint connection associated with the workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName); - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @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 Private Endpoint Connection resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner properties, Context context); - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @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 Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner properties); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java deleted file mode 100644 index c40a3ce213ae..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.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.machinelearning.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.machinelearning.fluent.models.PrivateLinkResourceListResultInner; - -/** - * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. - */ -public interface PrivateLinkResourcesClient { - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 private link resources that need to be created for a workspace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String resourceGroupName, String workspaceName, - Context context); - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 private link resources that need to be created for a workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceListResultInner list(String resourceGroupName, String workspaceName); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java deleted file mode 100644 index bff12926f7fb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.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.machinelearning.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.machinelearning.fluent.models.ResourceQuotaInner; -import com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner; -import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; - -/** - * An instance of this class provides access to all the operations defined in QuotasClient. - */ -public interface QuotasClient { - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @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 result of update workspace quota along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String location, QuotaUpdateParameters parameters, - Context context); - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @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 result of update workspace quota. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - UpdateWorkspaceQuotasResultInner update(String location, QuotaUpdateParameters parameters); - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @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 currently assigned Workspace Quotas based on VMFamily as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location); - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @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 currently assigned Workspace Quotas based on VMFamily as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java deleted file mode 100644 index 30efcfc24822..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.RegistryInner; -import com.azure.resourcemanager.machinelearning.models.PartialRegistryPartialTrackedResource; - -/** - * An instance of this class provides access to all the operations defined in RegistriesClient. - */ -public interface RegistriesClient { - /** - * List registries by subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List registries by subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * List registries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 a paginated list of Registry entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List registries. - * - * @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.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 a paginated list of Registry entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Delete registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName); - - /** - * Delete registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, Context context); - - /** - * Delete registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName); - - /** - * Delete registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, Context context); - - /** - * Get registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 registry along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, - Context context); - - /** - * Get registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryInner getByResourceGroup(String resourceGroupName, String registryName); - - /** - * Update tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String registryName, - PartialRegistryPartialTrackedResource body, Context context); - - /** - * Update tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryInner update(String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body); - - /** - * Create or update registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RegistryInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, RegistryInner body); - - /** - * Create or update registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RegistryInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, RegistryInner body, Context context); - - /** - * Create or update registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body); - - /** - * Create or update registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body, Context context); - - /** - * Remove regions from registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RegistryInner> beginRemoveRegions(String resourceGroupName, - String registryName, RegistryInner body); - - /** - * Remove regions from registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RegistryInner> beginRemoveRegions(String resourceGroupName, - String registryName, RegistryInner body, Context context); - - /** - * Remove regions from registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryInner removeRegions(String resourceGroupName, String registryName, RegistryInner body); - - /** - * Remove regions from registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryInner removeRegions(String resourceGroupName, String registryName, RegistryInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java deleted file mode 100644 index db782ef7731d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.CodeContainerInner; - -/** - * An instance of this class provides access to all the operations defined in RegistryCodeContainersClient. - */ -public interface RegistryCodeContainersClient { - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @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 a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String skip, Context context); - - /** - * Delete Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String codeName); - - /** - * Delete Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String codeName, - Context context); - - /** - * Delete Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String codeName); - - /** - * Delete Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String codeName, Context context); - - /** - * Get Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @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 code container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String codeName, - Context context); - - /** - * Get Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @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 code container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeContainerInner get(String resourceGroupName, String registryName, String codeName); - - /** - * Create or update Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CodeContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String codeName, CodeContainerInner body); - - /** - * Create or update Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CodeContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String codeName, CodeContainerInner body, Context context); - - /** - * Create or update Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeContainerInner createOrUpdate(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body); - - /** - * Create or update Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeContainerInner createOrUpdate(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java deleted file mode 100644 index abda21cb6547..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.CodeVersionInner; -import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; - -/** - * An instance of this class provides access to all the operations defined in RegistryCodeVersionsClient. - */ -public interface RegistryCodeVersionsClient { - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @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 a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String codeName); - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @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 a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String codeName, String orderBy, - Integer top, String skip, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String codeName, - String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String codeName, - String version, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String codeName, String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String codeName, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String codeName, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeVersionInner get(String resourceGroupName, String registryName, String codeName, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CodeVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String codeName, String version, CodeVersionInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CodeVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String codeName, String version, CodeVersionInner body, Context context); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeVersionInner createOrUpdate(String resourceGroupName, String registryName, String codeName, String version, - CodeVersionInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeVersionInner createOrUpdate(String resourceGroupName, String registryName, String codeName, String version, - CodeVersionInner body, Context context); - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, - String registryName, String codeName, String version, PendingUploadRequestDto body, Context context); - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PendingUploadResponseDtoInner createOrGetStartPendingUpload(String resourceGroupName, String registryName, - String codeName, String version, PendingUploadRequestDto body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.java deleted file mode 100644 index 4ab7c9853bf6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.java +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.ComponentContainerInner; - -/** - * An instance of this class provides access to all the operations defined in RegistryComponentContainersClient. - */ -public interface RegistryComponentContainersClient { - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @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 a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String skip, - Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String componentName); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String componentName, - Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String componentName); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String componentName, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, - String componentName, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentContainerInner get(String resourceGroupName, String registryName, String componentName); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComponentContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String componentName, ComponentContainerInner body); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComponentContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String componentName, ComponentContainerInner body, - Context context); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentContainerInner createOrUpdate(String resourceGroupName, String registryName, String componentName, - ComponentContainerInner body); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentContainerInner createOrUpdate(String resourceGroupName, String registryName, String componentName, - ComponentContainerInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.java deleted file mode 100644 index a493d51e7a07..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.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.machinelearning.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.machinelearning.fluent.models.ComponentVersionInner; - -/** - * An instance of this class provides access to all the operations defined in RegistryComponentVersionsClient. - */ -public interface RegistryComponentVersionsClient { - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @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 a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String componentName); - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @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 a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String componentName, - String orderBy, Integer top, String skip, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String componentName, - String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String componentName, - String version, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String componentName, String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String componentName, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String componentName, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentVersionInner get(String resourceGroupName, String registryName, String componentName, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComponentVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String componentName, String version, ComponentVersionInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComponentVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String componentName, String version, ComponentVersionInner body, Context context); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentVersionInner createOrUpdate(String resourceGroupName, String registryName, String componentName, - String version, ComponentVersionInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentVersionInner createOrUpdate(String resourceGroupName, String registryName, String componentName, - String version, ComponentVersionInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataContainersClient.java deleted file mode 100644 index e53c73329815..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataContainersClient.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.machinelearning.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.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in RegistryDataContainersClient. - */ -public interface RegistryDataContainersClient { - /** - * List Data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * List Data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, - Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String name); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String name, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataContainerInner get(String resourceGroupName, String registryName, String name); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DataContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String name, DataContainerInner body); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DataContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String name, DataContainerInner body, Context context); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataContainerInner createOrUpdate(String resourceGroupName, String registryName, String name, - DataContainerInner body); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataContainerInner createOrUpdate(String resourceGroupName, String registryName, String name, - DataContainerInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataReferencesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataReferencesClient.java deleted file mode 100644 index 690bf2625158..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataReferencesClient.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.machinelearning.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.machinelearning.fluent.models.GetBlobReferenceSasResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasRequestDto; - -/** - * An instance of this class provides access to all the operations defined in RegistryDataReferencesClient. - */ -public interface RegistryDataReferencesClient { - /** - * Get blob reference SAS Uri. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data reference name. - * @param version Version identifier. - * @param body Asset id and blob uri. - * @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 blob reference SAS Uri along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getBlobReferenceSasWithResponse(String resourceGroupName, - String registryName, String name, String version, GetBlobReferenceSasRequestDto body, Context context); - - /** - * Get blob reference SAS Uri. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data reference name. - * @param version Version identifier. - * @param body Asset id and blob uri. - * @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 blob reference SAS Uri. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - GetBlobReferenceSasResponseDtoInner getBlobReferenceSas(String resourceGroupName, String registryName, String name, - String version, GetBlobReferenceSasRequestDto body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataVersionsClient.java deleted file mode 100644 index 746599d4390a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataVersionsClient.java +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; - -/** - * An instance of this class provides access to all the operations defined in RegistryDataVersionsClient. - */ -public interface RegistryDataVersionsClient { - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @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 a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String name); - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @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 a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String name, String orderBy, - Integer top, String skip, String tags, ListViewType listViewType, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, - String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, - String version, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String name, String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String name, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String name, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataVersionBaseInner get(String resourceGroupName, String registryName, String name, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DataVersionBaseInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String name, String version, DataVersionBaseInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DataVersionBaseInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String name, String version, DataVersionBaseInner body, Context context); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataVersionBaseInner createOrUpdate(String resourceGroupName, String registryName, String name, String version, - DataVersionBaseInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataVersionBaseInner createOrUpdate(String resourceGroupName, String registryName, String name, String version, - DataVersionBaseInner body, Context context); - - /** - * Generate a storage location and credential for the client to upload a data asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, - String registryName, String name, String version, PendingUploadRequestDto body, Context context); - - /** - * Generate a storage location and credential for the client to upload a data asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PendingUploadResponseDtoInner createOrGetStartPendingUpload(String resourceGroupName, String registryName, - String name, String version, PendingUploadRequestDto body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.java deleted file mode 100644 index 1a05274522d5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.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.machinelearning.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.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in RegistryEnvironmentContainersClient. - */ -public interface RegistryEnvironmentContainersClient { - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String environmentName); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String environmentName, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String environmentName); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String environmentName, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, - String environmentName, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentContainerInner get(String resourceGroupName, String registryName, String environmentName); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body, - Context context); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentContainerInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, - EnvironmentContainerInner body); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentContainerInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, - EnvironmentContainerInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.java deleted file mode 100644 index ba7844b2fdb6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.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.machinelearning.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.machinelearning.fluent.models.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in RegistryEnvironmentVersionsClient. - */ -public interface RegistryEnvironmentVersionsClient { - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @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 a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String environmentName); - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String environmentName, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String environmentName, String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String environmentName, String version, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String environmentName, String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String environmentName, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, - String environmentName, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentVersionInner get(String resourceGroupName, String registryName, String environmentName, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String environmentName, String version, - EnvironmentVersionInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String environmentName, String version, - EnvironmentVersionInner body, Context context); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentVersionInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, - String version, EnvironmentVersionInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentVersionInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, - String version, EnvironmentVersionInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.java deleted file mode 100644 index ffd6476b53c6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.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.machinelearning.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.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * An instance of this class provides access to all the operations defined in RegistryModelContainersClient. - */ -public interface RegistryModelContainersClient { - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String modelName); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String modelName, - Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String modelName); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String modelName, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String modelName, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelContainerInner get(String resourceGroupName, String registryName, String modelName); - - /** - * Create or update model container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ModelContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String modelName, ModelContainerInner body); - - /** - * Create or update model container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ModelContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String modelName, ModelContainerInner body, Context context); - - /** - * Create or update model container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelContainerInner createOrUpdate(String resourceGroupName, String registryName, String modelName, - ModelContainerInner body); - - /** - * Create or update model container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelContainerInner createOrUpdate(String resourceGroupName, String registryName, String modelName, - ModelContainerInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.java deleted file mode 100644 index 11e3725d463f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.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.machinelearning.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.machinelearning.fluent.models.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; - -/** - * An instance of this class provides access to all the operations defined in RegistryModelVersionsClient. - */ -public interface RegistryModelVersionsClient { - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @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 a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String modelName); - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Version identifier. - * @param description Model description. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String modelName, String skip, - String orderBy, Integer top, String version, String description, String tags, String properties, - ListViewType listViewType, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String modelName, - String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String modelName, - String version, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String modelName, String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String modelName, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String modelName, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelVersionInner get(String resourceGroupName, String registryName, String modelName, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ModelVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String modelName, String version, ModelVersionInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ModelVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String modelName, String version, ModelVersionInner body, Context context); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelVersionInner createOrUpdate(String resourceGroupName, String registryName, String modelName, String version, - ModelVersionInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelVersionInner createOrUpdate(String resourceGroupName, String registryName, String modelName, String version, - ModelVersionInner body, Context context); - - /** - * Generate a storage location and credential for the client to upload a model asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, - String registryName, String modelName, String version, PendingUploadRequestDto body, Context context); - - /** - * Generate a storage location and credential for the client to upload a model asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PendingUploadResponseDtoInner createOrGetStartPendingUpload(String resourceGroupName, String registryName, - String modelName, String version, PendingUploadRequestDto body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java deleted file mode 100644 index cd31652c50e5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.ScheduleInner; -import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; - -/** - * An instance of this class provides access to all the operations defined in SchedulesClient. - */ -public interface SchedulesClient { - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of Schedule entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @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 a paginated list of Schedule entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ScheduleListViewType listViewType, Context context); - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @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 schedule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @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 schedule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScheduleInner get(String resourceGroupName, String workspaceName, String name); - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScheduleInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String name, ScheduleInner body); - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScheduleInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String name, ScheduleInner body, Context context); - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScheduleInner createOrUpdate(String resourceGroupName, String workspaceName, String name, ScheduleInner body); - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScheduleInner createOrUpdate(String resourceGroupName, String workspaceName, String name, ScheduleInner body, - Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ServerlessEndpointsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ServerlessEndpointsClient.java deleted file mode 100644 index ec664f5bab71..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ServerlessEndpointsClient.java +++ /dev/null @@ -1,366 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; -import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; - -/** - * An instance of this class provides access to all the operations defined in ServerlessEndpointsClient. - */ -public interface ServerlessEndpointsClient { - /** - * List Serverless Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List Serverless Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 a paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context); - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get Serverless Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 serverless Endpoint along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get Serverless Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 serverless Endpoint. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServerlessEndpointInner get(String resourceGroupName, String workspaceName, String name); - - /** - * Update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerlessEndpointInner> beginUpdate(String resourceGroupName, - String workspaceName, String name, PartialMinimalTrackedResourceWithSkuAndIdentity body); - - /** - * Update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerlessEndpointInner> beginUpdate(String resourceGroupName, - String workspaceName, String name, PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context); - - /** - * Update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServerlessEndpointInner update(String resourceGroupName, String workspaceName, String name, - PartialMinimalTrackedResourceWithSkuAndIdentity body); - - /** - * Update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServerlessEndpointInner update(String resourceGroupName, String workspaceName, String name, - PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context); - - /** - * Create or update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerlessEndpointInner> - beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body); - - /** - * Create or update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerlessEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body, Context context); - - /** - * Create or update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServerlessEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ServerlessEndpointInner body); - - /** - * Create or update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServerlessEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ServerlessEndpointInner body, Context context); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 keys for endpoint authentication along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String name); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EndpointAuthKeysInner> beginRegenerateKeys(String resourceGroupName, - String workspaceName, String name, RegenerateEndpointKeysRequest body); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EndpointAuthKeysInner> beginRegenerateKeys(String resourceGroupName, - String workspaceName, String name, RegenerateEndpointKeysRequest body, Context context); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EndpointAuthKeysInner regenerateKeys(String resourceGroupName, String workspaceName, String name, - RegenerateEndpointKeysRequest body); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EndpointAuthKeysInner regenerateKeys(String resourceGroupName, String workspaceName, String name, - RegenerateEndpointKeysRequest body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.java deleted file mode 100644 index 675c00685de4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.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.machinelearning.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.machinelearning.fluent.models.UsageInner; - -/** - * An instance of this class provides access to all the operations defined in UsagesClient. - */ -public interface UsagesClient { - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @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 current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location); - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @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 current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.java deleted file mode 100644 index c0febf79a6e4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.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.machinelearning.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.machinelearning.fluent.models.VirtualMachineSizeListResultInner; - -/** - * An instance of this class provides access to all the operations defined in VirtualMachineSizesClient. - */ -public interface VirtualMachineSizesClient { - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @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 List Virtual Machine size operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String location, Context context); - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @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 List Virtual Machine size operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VirtualMachineSizeListResultInner list(String location); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java deleted file mode 100644 index eee87969a4a3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; - -/** - * An instance of this class provides access to all the operations defined in WorkspaceConnectionsClient. - */ -public interface WorkspaceConnectionsClient { - /** - * The create operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse(String resourceGroupName, - String workspaceName, String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner parameters, - Context context); - - /** - * The create operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceConnectionPropertiesV2BasicResourceInner create(String resourceGroupName, String workspaceName, - String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner parameters); - - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, - String workspaceName, String connectionName, Context context); - - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceConnectionPropertiesV2BasicResourceInner get(String resourceGroupName, String workspaceName, - String connectionName); - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String connectionName, - Context context); - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String connectionName); - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, - String workspaceName); - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @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 paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, - String workspaceName, String target, String category, Context context); - - /** - * List all the secrets of a machine learning workspaces connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listSecretsWithResponse(String resourceGroupName, - String workspaceName, String connectionName, Context context); - - /** - * List all the secrets of a machine learning workspaces connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceConnectionPropertiesV2BasicResourceInner listSecrets(String resourceGroupName, String workspaceName, - String connectionName); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceFeaturesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceFeaturesClient.java deleted file mode 100644 index 8437e6ab4254..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceFeaturesClient.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.machinelearning.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.machinelearning.fluent.models.AmlUserFeatureInner; - -/** - * An instance of this class provides access to all the operations defined in WorkspaceFeaturesClient. - */ -public interface WorkspaceFeaturesClient { - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 List Aml user feature operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 List Aml user feature operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java deleted file mode 100644 index d3a6d397d5b9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.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.machinelearning.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.machinelearning.fluent.models.DiagnoseResponseResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListNotebookKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListStorageAccountKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListWorkspaceKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters; -import com.azure.resourcemanager.machinelearning.models.WorkspaceUpdateParameters; - -/** - * An instance of this class provides access to all the operations defined in WorkspacesClient. - */ -public interface WorkspacesClient { - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 the specified machine learning workspace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, - Context context); - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 the specified machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner parameters); - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner parameters, Context context); - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @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 an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters); - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @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 an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters, - Context context); - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName); - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, Boolean forceToPurge, - Context context); - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName); - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context); - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters); - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters, Context context); - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @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 an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters); - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @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 an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters, - Context context); - - /** - * Lists all the available machine learning workspaces under the specified 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.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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. - * @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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context); - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DiagnoseResponseResultInner> - beginDiagnose(String resourceGroupName, String workspaceName); - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DiagnoseResponseResultInner> beginDiagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context); - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DiagnoseResponseResultInner diagnose(String resourceGroupName, String workspaceName); - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DiagnoseResponseResultInner diagnose(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters, Context context); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse(String resourceGroupName, String workspaceName, - Context context); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ListWorkspaceKeysResultInner listKeys(String resourceGroupName, String workspaceName); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName, Context context); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void resyncKeys(String resourceGroupName, String workspaceName); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void resyncKeys(String resourceGroupName, String workspaceName, Context context); - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String skip, Context context); - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listNotebookAccessTokenWithResponse(String resourceGroupName, - String workspaceName, Context context); - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName); - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NotebookResourceInfoInner> - beginPrepareNotebook(String resourceGroupName, String workspaceName); - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NotebookResourceInfoInner> - beginPrepareNotebook(String resourceGroupName, String workspaceName, Context context); - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName); - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName, Context context); - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listStorageAccountKeysWithResponse(String resourceGroupName, - String workspaceName, Context context); - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceGroupName, String workspaceName); - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listNotebookKeysWithResponse(String resourceGroupName, String workspaceName, - Context context); - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, String workspaceName); - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listOutboundNetworkDependenciesEndpointsWithResponse(String resourceGroupName, - String workspaceName, Context context); - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String workspaceName); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.java deleted file mode 100644 index faf14637e351..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Features enabled for a workspace. - */ -@Fluent -public final class AmlUserFeatureInner implements JsonSerializable { - /* - * Specifies the feature ID - */ - private String id; - - /* - * Specifies the feature name - */ - private String displayName; - - /* - * Describes the feature for user experience - */ - private String description; - - /** - * Creates an instance of AmlUserFeatureInner class. - */ - public AmlUserFeatureInner() { - } - - /** - * Get the id property: Specifies the feature ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Specifies the feature ID. - * - * @param id the id value to set. - * @return the AmlUserFeatureInner object itself. - */ - public AmlUserFeatureInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the displayName property: Specifies the feature name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Specifies the feature name. - * - * @param displayName the displayName value to set. - * @return the AmlUserFeatureInner object itself. - */ - public AmlUserFeatureInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description property: Describes the feature for user experience. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Describes the feature for user experience. - * - * @param description the description value to set. - * @return the AmlUserFeatureInner object itself. - */ - public AmlUserFeatureInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("displayName", this.displayName); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AmlUserFeatureInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AmlUserFeatureInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AmlUserFeatureInner. - */ - public static AmlUserFeatureInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AmlUserFeatureInner deserializedAmlUserFeatureInner = new AmlUserFeatureInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedAmlUserFeatureInner.id = reader.getString(); - } else if ("displayName".equals(fieldName)) { - deserializedAmlUserFeatureInner.displayName = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedAmlUserFeatureInner.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAmlUserFeatureInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java deleted file mode 100644 index d4ddade922d3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentProperties; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.io.IOException; -import java.util.Map; - -/** - * The BatchDeployment model. - */ -@Fluent -public final class BatchDeploymentInner extends Resource { - /* - * [Required] Additional attributes of the entity. - */ - private BatchDeploymentProperties properties; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - */ - private String kind; - - /* - * Managed service identity (system assigned and/or user assigned identities) - */ - private ManagedServiceIdentity identity; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of BatchDeploymentInner class. - */ - public BatchDeploymentInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public BatchDeploymentProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the BatchDeploymentInner object itself. - */ - public BatchDeploymentInner withProperties(BatchDeploymentProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @param kind the kind value to set. - * @return the BatchDeploymentInner object itself. - */ - public BatchDeploymentInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the BatchDeploymentInner object itself. - */ - public BatchDeploymentInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the BatchDeploymentInner object itself. - */ - public BatchDeploymentInner withSku(Sku sku) { - this.sku = sku; - 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public BatchDeploymentInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BatchDeploymentInner 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) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property properties in model BatchDeploymentInner")); - } else { - properties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BatchDeploymentInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("kind", this.kind); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeJsonField("sku", this.sku); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BatchDeploymentInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BatchDeploymentInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BatchDeploymentInner. - */ - public static BatchDeploymentInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BatchDeploymentInner deserializedBatchDeploymentInner = new BatchDeploymentInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedBatchDeploymentInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedBatchDeploymentInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedBatchDeploymentInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedBatchDeploymentInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBatchDeploymentInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedBatchDeploymentInner.properties = BatchDeploymentProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedBatchDeploymentInner.kind = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedBatchDeploymentInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("sku".equals(fieldName)) { - deserializedBatchDeploymentInner.sku = Sku.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedBatchDeploymentInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBatchDeploymentInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java deleted file mode 100644 index a4494b6eabf1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.io.IOException; -import java.util.Map; - -/** - * The BatchEndpoint model. - */ -@Fluent -public final class BatchEndpointInner extends Resource { - /* - * [Required] Additional attributes of the entity. - */ - private BatchEndpointProperties properties; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - */ - private String kind; - - /* - * Managed service identity (system assigned and/or user assigned identities) - */ - private ManagedServiceIdentity identity; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of BatchEndpointInner class. - */ - public BatchEndpointInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public BatchEndpointProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the BatchEndpointInner object itself. - */ - public BatchEndpointInner withProperties(BatchEndpointProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @param kind the kind value to set. - * @return the BatchEndpointInner object itself. - */ - public BatchEndpointInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the BatchEndpointInner object itself. - */ - public BatchEndpointInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the BatchEndpointInner object itself. - */ - public BatchEndpointInner withSku(Sku sku) { - this.sku = sku; - 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public BatchEndpointInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BatchEndpointInner 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property properties in model BatchEndpointInner")); - } else { - properties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BatchEndpointInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("kind", this.kind); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeJsonField("sku", this.sku); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BatchEndpointInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BatchEndpointInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BatchEndpointInner. - */ - public static BatchEndpointInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BatchEndpointInner deserializedBatchEndpointInner = new BatchEndpointInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedBatchEndpointInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedBatchEndpointInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedBatchEndpointInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedBatchEndpointInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBatchEndpointInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedBatchEndpointInner.properties = BatchEndpointProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedBatchEndpointInner.kind = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedBatchEndpointInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("sku".equals(fieldName)) { - deserializedBatchEndpointInner.sku = Sku.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedBatchEndpointInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBatchEndpointInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.java deleted file mode 100644 index 3529474f10de..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; -import java.io.IOException; - -/** - * The properties of a amlCompute that need to be updated. - */ -@Fluent -public final class ClusterUpdateProperties implements JsonSerializable { - /* - * Properties of ClusterUpdate - */ - private ScaleSettingsInformation properties; - - /** - * Creates an instance of ClusterUpdateProperties class. - */ - public ClusterUpdateProperties() { - } - - /** - * Get the properties property: Properties of ClusterUpdate. - * - * @return the properties value. - */ - public ScaleSettingsInformation properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of ClusterUpdate. - * - * @param properties the properties value to set. - * @return the ClusterUpdateProperties object itself. - */ - public ClusterUpdateProperties withProperties(ScaleSettingsInformation properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ClusterUpdateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClusterUpdateProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ClusterUpdateProperties. - */ - public static ClusterUpdateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClusterUpdateProperties deserializedClusterUpdateProperties = new ClusterUpdateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedClusterUpdateProperties.properties = ScaleSettingsInformation.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedClusterUpdateProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.java deleted file mode 100644 index 81ef24936822..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class CodeContainerInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private CodeContainerProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of CodeContainerInner class. - */ - public CodeContainerInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public CodeContainerProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the CodeContainerInner object itself. - */ - public CodeContainerInner withProperties(CodeContainerProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property properties in model CodeContainerInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodeContainerInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CodeContainerInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CodeContainerInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CodeContainerInner. - */ - public static CodeContainerInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CodeContainerInner deserializedCodeContainerInner = new CodeContainerInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedCodeContainerInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedCodeContainerInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedCodeContainerInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedCodeContainerInner.properties = CodeContainerProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedCodeContainerInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCodeContainerInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java deleted file mode 100644 index 5b0d8710edc0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.CodeVersionProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class CodeVersionInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private CodeVersionProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of CodeVersionInner class. - */ - public CodeVersionInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public CodeVersionProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the CodeVersionInner object itself. - */ - public CodeVersionInner withProperties(CodeVersionProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property properties in model CodeVersionInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodeVersionInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CodeVersionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CodeVersionInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CodeVersionInner. - */ - public static CodeVersionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CodeVersionInner deserializedCodeVersionInner = new CodeVersionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedCodeVersionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedCodeVersionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedCodeVersionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedCodeVersionInner.properties = CodeVersionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedCodeVersionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCodeVersionInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java deleted file mode 100644 index 0168e82327e5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class ComponentContainerInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private ComponentContainerProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of ComponentContainerInner class. - */ - public ComponentContainerInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public ComponentContainerProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the ComponentContainerInner object itself. - */ - public ComponentContainerInner withProperties(ComponentContainerProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model ComponentContainerInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ComponentContainerInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComponentContainerInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComponentContainerInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ComponentContainerInner. - */ - public static ComponentContainerInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComponentContainerInner deserializedComponentContainerInner = new ComponentContainerInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedComponentContainerInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedComponentContainerInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedComponentContainerInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedComponentContainerInner.properties = ComponentContainerProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedComponentContainerInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedComponentContainerInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java deleted file mode 100644 index fbe9071c6c41..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class ComponentVersionInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private ComponentVersionProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of ComponentVersionInner class. - */ - public ComponentVersionInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public ComponentVersionProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the ComponentVersionInner object itself. - */ - public ComponentVersionInner withProperties(ComponentVersionProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model ComponentVersionInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ComponentVersionInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComponentVersionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComponentVersionInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ComponentVersionInner. - */ - public static ComponentVersionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComponentVersionInner deserializedComponentVersionInner = new ComponentVersionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedComponentVersionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedComponentVersionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedComponentVersionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedComponentVersionInner.properties = ComponentVersionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedComponentVersionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedComponentVersionInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeResourceInner.java deleted file mode 100644 index 9885a5d752a7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeResourceInner.java +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.Compute; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.io.IOException; -import java.util.Map; - -/** - * Machine Learning compute object wrapped into ARM resource envelope. - */ -@Fluent -public final class ComputeResourceInner extends ProxyResource { - /* - * The identity of the resource. - */ - private ManagedServiceIdentity identity; - - /* - * Specifies the location of the resource. - */ - private String location; - - /* - * Contains resource tags defined as key/value pairs. - */ - private Map tags; - - /* - * The sku of the workspace. - */ - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Compute properties - */ - private Compute properties; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of ComputeResourceInner class. - */ - public ComputeResourceInner() { - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the ComputeResourceInner object itself. - */ - public ComputeResourceInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the location property: Specifies the location of the resource. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Specifies the location of the resource. - * - * @param location the location value to set. - * @return the ComputeResourceInner object itself. - */ - public ComputeResourceInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the tags property: Contains resource tags defined as key/value pairs. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Contains resource tags defined as key/value pairs. - * - * @param tags the tags value to set. - * @return the ComputeResourceInner object itself. - */ - public ComputeResourceInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the sku property: The sku of the workspace. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the ComputeResourceInner object itself. - */ - public ComputeResourceInner withSku(Sku sku) { - this.sku = sku; - 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; - } - - /** - * Get the properties property: Compute properties. - * - * @return the properties value. - */ - public Compute properties() { - return this.properties; - } - - /** - * Set the properties property: Compute properties. - * - * @param properties the properties value to set. - * @return the ComputeResourceInner object itself. - */ - public ComputeResourceInner withProperties(Compute properties) { - this.properties = properties; - return this; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("sku", this.sku); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeResourceInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ComputeResourceInner. - */ - public static ComputeResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeResourceInner deserializedComputeResourceInner = new ComputeResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedComputeResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedComputeResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedComputeResourceInner.type = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedComputeResourceInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedComputeResourceInner.location = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedComputeResourceInner.tags = tags; - } else if ("sku".equals(fieldName)) { - deserializedComputeResourceInner.sku = Sku.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedComputeResourceInner.systemData = SystemData.fromJson(reader); - } else if ("properties".equals(fieldName)) { - deserializedComputeResourceInner.properties = Compute.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeResourceInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java deleted file mode 100644 index 3d620290a0ee..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.AksComputeSecrets; -import com.azure.resourcemanager.machinelearning.models.ComputeType; -import com.azure.resourcemanager.machinelearning.models.DatabricksComputeSecrets; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSecrets; -import java.io.IOException; - -/** - * Secrets related to a Machine Learning compute. Might differ for every type of compute. - */ -@Immutable -public class ComputeSecretsInner implements JsonSerializable { - /* - * The type of compute - */ - private ComputeType computeType = ComputeType.fromString("ComputeSecrets"); - - /** - * Creates an instance of ComputeSecretsInner class. - */ - public ComputeSecretsInner() { - } - - /** - * Get the computeType property: The type of compute. - * - * @return the computeType value. - */ - public ComputeType computeType() { - return this.computeType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeSecretsInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeSecretsInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeSecretsInner. - */ - public static ComputeSecretsInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("computeType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AKS".equals(discriminatorValue)) { - return AksComputeSecrets.fromJson(readerToUse.reset()); - } else if ("VirtualMachine".equals(discriminatorValue)) { - return VirtualMachineSecrets.fromJson(readerToUse.reset()); - } else if ("Databricks".equals(discriminatorValue)) { - return DatabricksComputeSecrets.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ComputeSecretsInner fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeSecretsInner deserializedComputeSecretsInner = new ComputeSecretsInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeType".equals(fieldName)) { - deserializedComputeSecretsInner.computeType = ComputeType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeSecretsInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerInner.java deleted file mode 100644 index b20e49abe512..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class DataContainerInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private DataContainerProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of DataContainerInner class. - */ - public DataContainerInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public DataContainerProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the DataContainerInner object itself. - */ - public DataContainerInner withProperties(DataContainerProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property properties in model DataContainerInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataContainerInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataContainerInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataContainerInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DataContainerInner. - */ - public static DataContainerInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataContainerInner deserializedDataContainerInner = new DataContainerInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDataContainerInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDataContainerInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDataContainerInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDataContainerInner.properties = DataContainerProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDataContainerInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDataContainerInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseInner.java deleted file mode 100644 index 90443894107e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseInner.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class DataVersionBaseInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private DataVersionBaseProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of DataVersionBaseInner class. - */ - public DataVersionBaseInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public DataVersionBaseProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the DataVersionBaseInner object itself. - */ - public DataVersionBaseInner withProperties(DataVersionBaseProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property properties in model DataVersionBaseInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataVersionBaseInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataVersionBaseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataVersionBaseInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DataVersionBaseInner. - */ - public static DataVersionBaseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataVersionBaseInner deserializedDataVersionBaseInner = new DataVersionBaseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDataVersionBaseInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDataVersionBaseInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDataVersionBaseInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDataVersionBaseInner.properties = DataVersionBaseProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDataVersionBaseInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDataVersionBaseInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreInner.java deleted file mode 100644 index 90773283eb3a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.DatastoreProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class DatastoreInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private DatastoreProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of DatastoreInner class. - */ - public DatastoreInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public DatastoreProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the DatastoreInner object itself. - */ - public DatastoreInner withProperties(DatastoreProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property properties in model DatastoreInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DatastoreInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatastoreInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatastoreInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DatastoreInner. - */ - public static DatastoreInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DatastoreInner deserializedDatastoreInner = new DatastoreInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDatastoreInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDatastoreInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDatastoreInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDatastoreInner.properties = DatastoreProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDatastoreInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDatastoreInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreSecretsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreSecretsInner.java deleted file mode 100644 index d1535e727afc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreSecretsInner.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreSecrets; -import com.azure.resourcemanager.machinelearning.models.CertificateDatastoreSecrets; -import com.azure.resourcemanager.machinelearning.models.SasDatastoreSecrets; -import com.azure.resourcemanager.machinelearning.models.SecretsType; -import com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreSecrets; -import java.io.IOException; - -/** - * Base definition for datastore secrets. - */ -@Immutable -public class DatastoreSecretsInner implements JsonSerializable { - /* - * [Required] Credential type used to authentication with storage. - */ - private SecretsType secretsType = SecretsType.fromString("DatastoreSecrets"); - - /** - * Creates an instance of DatastoreSecretsInner class. - */ - public DatastoreSecretsInner() { - } - - /** - * Get the secretsType property: [Required] Credential type used to authentication with storage. - * - * @return the secretsType value. - */ - public SecretsType secretsType() { - return this.secretsType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("secretsType", this.secretsType == null ? null : this.secretsType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatastoreSecretsInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatastoreSecretsInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DatastoreSecretsInner. - */ - public static DatastoreSecretsInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("secretsType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AccountKey".equals(discriminatorValue)) { - return AccountKeyDatastoreSecrets.fromJson(readerToUse.reset()); - } else if ("Certificate".equals(discriminatorValue)) { - return CertificateDatastoreSecrets.fromJson(readerToUse.reset()); - } else if ("Sas".equals(discriminatorValue)) { - return SasDatastoreSecrets.fromJson(readerToUse.reset()); - } else if ("ServicePrincipal".equals(discriminatorValue)) { - return ServicePrincipalDatastoreSecrets.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static DatastoreSecretsInner fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DatastoreSecretsInner deserializedDatastoreSecretsInner = new DatastoreSecretsInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("secretsType".equals(fieldName)) { - deserializedDatastoreSecretsInner.secretsType = SecretsType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDatastoreSecretsInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.java deleted file mode 100644 index 532f61f4d78c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The DeploymentLogs model. - */ -@Fluent -public final class DeploymentLogsInner implements JsonSerializable { - /* - * The retrieved online deployment logs. - */ - private String content; - - /** - * Creates an instance of DeploymentLogsInner class. - */ - public DeploymentLogsInner() { - } - - /** - * Get the content property: The retrieved online deployment logs. - * - * @return the content value. - */ - public String content() { - return this.content; - } - - /** - * Set the content property: The retrieved online deployment logs. - * - * @param content the content value to set. - * @return the DeploymentLogsInner object itself. - */ - public DeploymentLogsInner withContent(String content) { - this.content = content; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("content", this.content); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DeploymentLogsInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DeploymentLogsInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DeploymentLogsInner. - */ - public static DeploymentLogsInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DeploymentLogsInner deserializedDeploymentLogsInner = new DeploymentLogsInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("content".equals(fieldName)) { - deserializedDeploymentLogsInner.content = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDeploymentLogsInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DiagnoseResponseResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DiagnoseResponseResultInner.java deleted file mode 100644 index 5ac507407d87..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DiagnoseResponseResultInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.DiagnoseResponseResultValue; -import java.io.IOException; - -/** - * The DiagnoseResponseResult model. - */ -@Fluent -public final class DiagnoseResponseResultInner implements JsonSerializable { - /* - * The value property. - */ - private DiagnoseResponseResultValue value; - - /** - * Creates an instance of DiagnoseResponseResultInner class. - */ - public DiagnoseResponseResultInner() { - } - - /** - * Get the value property: The value property. - * - * @return the value value. - */ - public DiagnoseResponseResultValue value() { - return this.value; - } - - /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the DiagnoseResponseResultInner object itself. - */ - public DiagnoseResponseResultInner withValue(DiagnoseResponseResultValue value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnoseResponseResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnoseResponseResultInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiagnoseResponseResultInner. - */ - public static DiagnoseResponseResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnoseResponseResultInner deserializedDiagnoseResponseResultInner = new DiagnoseResponseResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - deserializedDiagnoseResponseResultInner.value = DiagnoseResponseResultValue.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnoseResponseResultInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthKeysInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthKeysInner.java deleted file mode 100644 index 33f23772b606..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthKeysInner.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Keys for endpoint authentication. - */ -@Fluent -public final class EndpointAuthKeysInner implements JsonSerializable { - /* - * The primary key. - */ - private String primaryKey; - - /* - * The secondary key. - */ - private String secondaryKey; - - /** - * Creates an instance of EndpointAuthKeysInner class. - */ - public EndpointAuthKeysInner() { - } - - /** - * Get the primaryKey property: The primary key. - * - * @return the primaryKey value. - */ - public String primaryKey() { - return this.primaryKey; - } - - /** - * Set the primaryKey property: The primary key. - * - * @param primaryKey the primaryKey value to set. - * @return the EndpointAuthKeysInner object itself. - */ - public EndpointAuthKeysInner withPrimaryKey(String primaryKey) { - this.primaryKey = primaryKey; - return this; - } - - /** - * Get the secondaryKey property: The secondary key. - * - * @return the secondaryKey value. - */ - public String secondaryKey() { - return this.secondaryKey; - } - - /** - * Set the secondaryKey property: The secondary key. - * - * @param secondaryKey the secondaryKey value to set. - * @return the EndpointAuthKeysInner object itself. - */ - public EndpointAuthKeysInner withSecondaryKey(String secondaryKey) { - this.secondaryKey = secondaryKey; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("primaryKey", this.primaryKey); - jsonWriter.writeStringField("secondaryKey", this.secondaryKey); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EndpointAuthKeysInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EndpointAuthKeysInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the EndpointAuthKeysInner. - */ - public static EndpointAuthKeysInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EndpointAuthKeysInner deserializedEndpointAuthKeysInner = new EndpointAuthKeysInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("primaryKey".equals(fieldName)) { - deserializedEndpointAuthKeysInner.primaryKey = reader.getString(); - } else if ("secondaryKey".equals(fieldName)) { - deserializedEndpointAuthKeysInner.secondaryKey = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEndpointAuthKeysInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthTokenInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthTokenInner.java deleted file mode 100644 index ae60a3319a7b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthTokenInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Service Token. - */ -@Fluent -public final class EndpointAuthTokenInner implements JsonSerializable { - /* - * Access token for endpoint authentication. - */ - private String accessToken; - - /* - * Access token type. - */ - private String tokenType; - - /* - * Access token expiry time (UTC). - */ - private Long expiryTimeUtc; - - /* - * Refresh access token after time (UTC). - */ - private Long refreshAfterTimeUtc; - - /** - * Creates an instance of EndpointAuthTokenInner class. - */ - public EndpointAuthTokenInner() { - } - - /** - * Get the accessToken property: Access token for endpoint authentication. - * - * @return the accessToken value. - */ - public String accessToken() { - return this.accessToken; - } - - /** - * Set the accessToken property: Access token for endpoint authentication. - * - * @param accessToken the accessToken value to set. - * @return the EndpointAuthTokenInner object itself. - */ - public EndpointAuthTokenInner withAccessToken(String accessToken) { - this.accessToken = accessToken; - return this; - } - - /** - * Get the tokenType property: Access token type. - * - * @return the tokenType value. - */ - public String tokenType() { - return this.tokenType; - } - - /** - * Set the tokenType property: Access token type. - * - * @param tokenType the tokenType value to set. - * @return the EndpointAuthTokenInner object itself. - */ - public EndpointAuthTokenInner withTokenType(String tokenType) { - this.tokenType = tokenType; - return this; - } - - /** - * Get the expiryTimeUtc property: Access token expiry time (UTC). - * - * @return the expiryTimeUtc value. - */ - public Long expiryTimeUtc() { - return this.expiryTimeUtc; - } - - /** - * Set the expiryTimeUtc property: Access token expiry time (UTC). - * - * @param expiryTimeUtc the expiryTimeUtc value to set. - * @return the EndpointAuthTokenInner object itself. - */ - public EndpointAuthTokenInner withExpiryTimeUtc(Long expiryTimeUtc) { - this.expiryTimeUtc = expiryTimeUtc; - return this; - } - - /** - * Get the refreshAfterTimeUtc property: Refresh access token after time (UTC). - * - * @return the refreshAfterTimeUtc value. - */ - public Long refreshAfterTimeUtc() { - return this.refreshAfterTimeUtc; - } - - /** - * Set the refreshAfterTimeUtc property: Refresh access token after time (UTC). - * - * @param refreshAfterTimeUtc the refreshAfterTimeUtc value to set. - * @return the EndpointAuthTokenInner object itself. - */ - public EndpointAuthTokenInner withRefreshAfterTimeUtc(Long refreshAfterTimeUtc) { - this.refreshAfterTimeUtc = refreshAfterTimeUtc; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("accessToken", this.accessToken); - jsonWriter.writeStringField("tokenType", this.tokenType); - jsonWriter.writeNumberField("expiryTimeUtc", this.expiryTimeUtc); - jsonWriter.writeNumberField("refreshAfterTimeUtc", this.refreshAfterTimeUtc); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EndpointAuthTokenInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EndpointAuthTokenInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the EndpointAuthTokenInner. - */ - public static EndpointAuthTokenInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EndpointAuthTokenInner deserializedEndpointAuthTokenInner = new EndpointAuthTokenInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("accessToken".equals(fieldName)) { - deserializedEndpointAuthTokenInner.accessToken = reader.getString(); - } else if ("tokenType".equals(fieldName)) { - deserializedEndpointAuthTokenInner.tokenType = reader.getString(); - } else if ("expiryTimeUtc".equals(fieldName)) { - deserializedEndpointAuthTokenInner.expiryTimeUtc = reader.getNullable(JsonReader::getLong); - } else if ("refreshAfterTimeUtc".equals(fieldName)) { - deserializedEndpointAuthTokenInner.refreshAfterTimeUtc = reader.getNullable(JsonReader::getLong); - } else { - reader.skipChildren(); - } - } - - return deserializedEndpointAuthTokenInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointPropertiesBaseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointPropertiesBaseInner.java deleted file mode 100644 index 3ed8cb7b4073..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointPropertiesBaseInner.java +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthMode; -import java.io.IOException; -import java.util.Map; - -/** - * Inference Endpoint base definition. - */ -@Fluent -public class EndpointPropertiesBaseInner implements JsonSerializable { - /* - * Description of the inference endpoint. - */ - private String description; - - /* - * Property dictionary. Properties can be added, but not removed or altered. - */ - private Map properties; - - /* - * Endpoint URI. - */ - private String scoringUri; - - /* - * Endpoint Swagger URI. - */ - private String swaggerUri; - - /* - * [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based - * authentication. 'Key' doesn't expire but 'AMLToken' does. - */ - private EndpointAuthMode authMode; - - /* - * EndpointAuthKeys to set initially on an Endpoint. - * This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. - */ - private EndpointAuthKeysInner keys; - - /** - * Creates an instance of EndpointPropertiesBaseInner class. - */ - public EndpointPropertiesBaseInner() { - } - - /** - * Get the description property: Description of the inference endpoint. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of the inference endpoint. - * - * @param description the description value to set. - * @return the EndpointPropertiesBaseInner object itself. - */ - public EndpointPropertiesBaseInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the properties property: Property dictionary. Properties can be added, but not removed or altered. - * - * @return the properties value. - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties property: Property dictionary. Properties can be added, but not removed or altered. - * - * @param properties the properties value to set. - * @return the EndpointPropertiesBaseInner object itself. - */ - public EndpointPropertiesBaseInner withProperties(Map properties) { - this.properties = properties; - return this; - } - - /** - * Get the scoringUri property: Endpoint URI. - * - * @return the scoringUri value. - */ - public String scoringUri() { - return this.scoringUri; - } - - /** - * Set the scoringUri property: Endpoint URI. - * - * @param scoringUri the scoringUri value to set. - * @return the EndpointPropertiesBaseInner object itself. - */ - EndpointPropertiesBaseInner withScoringUri(String scoringUri) { - this.scoringUri = scoringUri; - return this; - } - - /** - * Get the swaggerUri property: Endpoint Swagger URI. - * - * @return the swaggerUri value. - */ - public String swaggerUri() { - return this.swaggerUri; - } - - /** - * Set the swaggerUri property: Endpoint Swagger URI. - * - * @param swaggerUri the swaggerUri value to set. - * @return the EndpointPropertiesBaseInner object itself. - */ - EndpointPropertiesBaseInner withSwaggerUri(String swaggerUri) { - this.swaggerUri = swaggerUri; - return this; - } - - /** - * Get the authMode property: [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine - * Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. - * - * @return the authMode value. - */ - public EndpointAuthMode authMode() { - return this.authMode; - } - - /** - * Set the authMode property: [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine - * Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. - * - * @param authMode the authMode value to set. - * @return the EndpointPropertiesBaseInner object itself. - */ - public EndpointPropertiesBaseInner withAuthMode(EndpointAuthMode authMode) { - this.authMode = authMode; - return this; - } - - /** - * Get the keys property: EndpointAuthKeys to set initially on an Endpoint. - * This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. - * - * @return the keys value. - */ - public EndpointAuthKeysInner keys() { - return this.keys; - } - - /** - * Set the keys property: EndpointAuthKeys to set initially on an Endpoint. - * This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. - * - * @param keys the keys value to set. - * @return the EndpointPropertiesBaseInner object itself. - */ - public EndpointPropertiesBaseInner withKeys(EndpointAuthKeysInner keys) { - this.keys = keys; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (authMode() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property authMode in model EndpointPropertiesBaseInner")); - } - if (keys() != null) { - keys().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EndpointPropertiesBaseInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authMode", this.authMode == null ? null : this.authMode.toString()); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("keys", this.keys); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EndpointPropertiesBaseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EndpointPropertiesBaseInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EndpointPropertiesBaseInner. - */ - public static EndpointPropertiesBaseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EndpointPropertiesBaseInner deserializedEndpointPropertiesBaseInner = new EndpointPropertiesBaseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("authMode".equals(fieldName)) { - deserializedEndpointPropertiesBaseInner.authMode = EndpointAuthMode.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedEndpointPropertiesBaseInner.description = reader.getString(); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedEndpointPropertiesBaseInner.properties = properties; - } else if ("scoringUri".equals(fieldName)) { - deserializedEndpointPropertiesBaseInner.scoringUri = reader.getString(); - } else if ("swaggerUri".equals(fieldName)) { - deserializedEndpointPropertiesBaseInner.swaggerUri = reader.getString(); - } else if ("keys".equals(fieldName)) { - deserializedEndpointPropertiesBaseInner.keys = EndpointAuthKeysInner.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEndpointPropertiesBaseInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java deleted file mode 100644 index 988eef2ab7d4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class EnvironmentContainerInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private EnvironmentContainerProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of EnvironmentContainerInner class. - */ - public EnvironmentContainerInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public EnvironmentContainerProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the EnvironmentContainerInner object itself. - */ - public EnvironmentContainerInner withProperties(EnvironmentContainerProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model EnvironmentContainerInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentContainerInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnvironmentContainerInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnvironmentContainerInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EnvironmentContainerInner. - */ - public static EnvironmentContainerInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnvironmentContainerInner deserializedEnvironmentContainerInner = new EnvironmentContainerInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedEnvironmentContainerInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedEnvironmentContainerInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedEnvironmentContainerInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedEnvironmentContainerInner.properties = EnvironmentContainerProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedEnvironmentContainerInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEnvironmentContainerInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java deleted file mode 100644 index 479e58bf0248..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class EnvironmentVersionInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private EnvironmentVersionProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of EnvironmentVersionInner class. - */ - public EnvironmentVersionInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public EnvironmentVersionProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the EnvironmentVersionInner object itself. - */ - public EnvironmentVersionInner withProperties(EnvironmentVersionProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model EnvironmentVersionInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentVersionInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnvironmentVersionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnvironmentVersionInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EnvironmentVersionInner. - */ - public static EnvironmentVersionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnvironmentVersionInner deserializedEnvironmentVersionInner = new EnvironmentVersionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedEnvironmentVersionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedEnvironmentVersionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedEnvironmentVersionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedEnvironmentVersionInner.properties = EnvironmentVersionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedEnvironmentVersionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEnvironmentVersionInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.java deleted file mode 100644 index 1ddfcb011592..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoints; -import java.io.IOException; -import java.util.List; - -/** - * The ExternalFqdnResponse model. - */ -@Fluent -public final class ExternalFqdnResponseInner implements JsonSerializable { - /* - * The value property. - */ - private List value; - - /** - * Creates an instance of ExternalFqdnResponseInner class. - */ - public ExternalFqdnResponseInner() { - } - - /** - * Get the value property: The value property. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the ExternalFqdnResponseInner object itself. - */ - public ExternalFqdnResponseInner 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) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExternalFqdnResponseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExternalFqdnResponseInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ExternalFqdnResponseInner. - */ - public static ExternalFqdnResponseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExternalFqdnResponseInner deserializedExternalFqdnResponseInner = new ExternalFqdnResponseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> FqdnEndpoints.fromJson(reader1)); - deserializedExternalFqdnResponseInner.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedExternalFqdnResponseInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeatureInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeatureInner.java deleted file mode 100644 index 5fab82ad54b0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeatureInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.FeatureProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class FeatureInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private FeatureProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of FeatureInner class. - */ - public FeatureInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public FeatureProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the FeatureInner object itself. - */ - public FeatureInner withProperties(FeatureProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property properties in model FeatureInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FeatureInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeatureInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeatureInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the FeatureInner. - */ - public static FeatureInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeatureInner deserializedFeatureInner = new FeatureInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedFeatureInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedFeatureInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedFeatureInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedFeatureInner.properties = FeatureProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedFeatureInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedFeatureInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetContainerInner.java deleted file mode 100644 index 75e459199aec..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetContainerInner.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class FeaturesetContainerInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private FeaturesetContainerProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of FeaturesetContainerInner class. - */ - public FeaturesetContainerInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public FeaturesetContainerProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the FeaturesetContainerInner object itself. - */ - public FeaturesetContainerInner withProperties(FeaturesetContainerProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model FeaturesetContainerInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FeaturesetContainerInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeaturesetContainerInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeaturesetContainerInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the FeaturesetContainerInner. - */ - public static FeaturesetContainerInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeaturesetContainerInner deserializedFeaturesetContainerInner = new FeaturesetContainerInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedFeaturesetContainerInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedFeaturesetContainerInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedFeaturesetContainerInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedFeaturesetContainerInner.properties = FeaturesetContainerProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedFeaturesetContainerInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedFeaturesetContainerInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionBackfillResponseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionBackfillResponseInner.java deleted file mode 100644 index 24b63beb85cb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionBackfillResponseInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Response payload for creating a backfill request for a given feature set version. - */ -@Fluent -public final class FeaturesetVersionBackfillResponseInner - implements JsonSerializable { - /* - * List of jobs submitted as part of the backfill request. - */ - private List jobIds; - - /** - * Creates an instance of FeaturesetVersionBackfillResponseInner class. - */ - public FeaturesetVersionBackfillResponseInner() { - } - - /** - * Get the jobIds property: List of jobs submitted as part of the backfill request. - * - * @return the jobIds value. - */ - public List jobIds() { - return this.jobIds; - } - - /** - * Set the jobIds property: List of jobs submitted as part of the backfill request. - * - * @param jobIds the jobIds value to set. - * @return the FeaturesetVersionBackfillResponseInner object itself. - */ - public FeaturesetVersionBackfillResponseInner withJobIds(List jobIds) { - this.jobIds = jobIds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("jobIds", this.jobIds, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeaturesetVersionBackfillResponseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeaturesetVersionBackfillResponseInner if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FeaturesetVersionBackfillResponseInner. - */ - public static FeaturesetVersionBackfillResponseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeaturesetVersionBackfillResponseInner deserializedFeaturesetVersionBackfillResponseInner - = new FeaturesetVersionBackfillResponseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobIds".equals(fieldName)) { - List jobIds = reader.readArray(reader1 -> reader1.getString()); - deserializedFeaturesetVersionBackfillResponseInner.jobIds = jobIds; - } else { - reader.skipChildren(); - } - } - - return deserializedFeaturesetVersionBackfillResponseInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionInner.java deleted file mode 100644 index 68b3d08df57c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionInner.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class FeaturesetVersionInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private FeaturesetVersionProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of FeaturesetVersionInner class. - */ - public FeaturesetVersionInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public FeaturesetVersionProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the FeaturesetVersionInner object itself. - */ - public FeaturesetVersionInner withProperties(FeaturesetVersionProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model FeaturesetVersionInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FeaturesetVersionInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeaturesetVersionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeaturesetVersionInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the FeaturesetVersionInner. - */ - public static FeaturesetVersionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeaturesetVersionInner deserializedFeaturesetVersionInner = new FeaturesetVersionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedFeaturesetVersionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedFeaturesetVersionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedFeaturesetVersionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedFeaturesetVersionInner.properties = FeaturesetVersionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedFeaturesetVersionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedFeaturesetVersionInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityContainerInner.java deleted file mode 100644 index 3cff75870f94..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityContainerInner.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class FeaturestoreEntityContainerInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private FeaturestoreEntityContainerProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of FeaturestoreEntityContainerInner class. - */ - public FeaturestoreEntityContainerInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public FeaturestoreEntityContainerProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the FeaturestoreEntityContainerInner object itself. - */ - public FeaturestoreEntityContainerInner withProperties(FeaturestoreEntityContainerProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model FeaturestoreEntityContainerInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FeaturestoreEntityContainerInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeaturestoreEntityContainerInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeaturestoreEntityContainerInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the FeaturestoreEntityContainerInner. - */ - public static FeaturestoreEntityContainerInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeaturestoreEntityContainerInner deserializedFeaturestoreEntityContainerInner - = new FeaturestoreEntityContainerInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedFeaturestoreEntityContainerInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedFeaturestoreEntityContainerInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedFeaturestoreEntityContainerInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedFeaturestoreEntityContainerInner.properties - = FeaturestoreEntityContainerProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedFeaturestoreEntityContainerInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedFeaturestoreEntityContainerInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityVersionInner.java deleted file mode 100644 index 1c8eee3d76d3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityVersionInner.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class FeaturestoreEntityVersionInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private FeaturestoreEntityVersionProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of FeaturestoreEntityVersionInner class. - */ - public FeaturestoreEntityVersionInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public FeaturestoreEntityVersionProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the FeaturestoreEntityVersionInner object itself. - */ - public FeaturestoreEntityVersionInner withProperties(FeaturestoreEntityVersionProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model FeaturestoreEntityVersionInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FeaturestoreEntityVersionInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeaturestoreEntityVersionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeaturestoreEntityVersionInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the FeaturestoreEntityVersionInner. - */ - public static FeaturestoreEntityVersionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeaturestoreEntityVersionInner deserializedFeaturestoreEntityVersionInner - = new FeaturestoreEntityVersionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedFeaturestoreEntityVersionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedFeaturestoreEntityVersionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedFeaturestoreEntityVersionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedFeaturestoreEntityVersionInner.properties - = FeaturestoreEntityVersionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedFeaturestoreEntityVersionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedFeaturestoreEntityVersionInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GetBlobReferenceSasResponseDtoInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GetBlobReferenceSasResponseDtoInner.java deleted file mode 100644 index fa2ad37f6857..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GetBlobReferenceSasResponseDtoInner.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceForConsumptionDto; -import java.io.IOException; - -/** - * BlobReferenceSASResponse for getBlobReferenceSAS API. - */ -@Fluent -public final class GetBlobReferenceSasResponseDtoInner - implements JsonSerializable { - /* - * Blob reference for consumption details - */ - private GetBlobReferenceForConsumptionDto blobReferenceForConsumption; - - /** - * Creates an instance of GetBlobReferenceSasResponseDtoInner class. - */ - public GetBlobReferenceSasResponseDtoInner() { - } - - /** - * Get the blobReferenceForConsumption property: Blob reference for consumption details. - * - * @return the blobReferenceForConsumption value. - */ - public GetBlobReferenceForConsumptionDto blobReferenceForConsumption() { - return this.blobReferenceForConsumption; - } - - /** - * Set the blobReferenceForConsumption property: Blob reference for consumption details. - * - * @param blobReferenceForConsumption the blobReferenceForConsumption value to set. - * @return the GetBlobReferenceSasResponseDtoInner object itself. - */ - public GetBlobReferenceSasResponseDtoInner - withBlobReferenceForConsumption(GetBlobReferenceForConsumptionDto blobReferenceForConsumption) { - this.blobReferenceForConsumption = blobReferenceForConsumption; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (blobReferenceForConsumption() != null) { - blobReferenceForConsumption().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("blobReferenceForConsumption", this.blobReferenceForConsumption); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GetBlobReferenceSasResponseDtoInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GetBlobReferenceSasResponseDtoInner if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the GetBlobReferenceSasResponseDtoInner. - */ - public static GetBlobReferenceSasResponseDtoInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GetBlobReferenceSasResponseDtoInner deserializedGetBlobReferenceSasResponseDtoInner - = new GetBlobReferenceSasResponseDtoInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("blobReferenceForConsumption".equals(fieldName)) { - deserializedGetBlobReferenceSasResponseDtoInner.blobReferenceForConsumption - = GetBlobReferenceForConsumptionDto.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedGetBlobReferenceSasResponseDtoInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java deleted file mode 100644 index f9f23857c3dc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class JobBaseInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private JobBaseProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of JobBaseInner class. - */ - public JobBaseInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public JobBaseProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the JobBaseInner object itself. - */ - public JobBaseInner withProperties(JobBaseProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property properties in model JobBaseInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JobBaseInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobBaseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobBaseInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JobBaseInner. - */ - public static JobBaseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobBaseInner deserializedJobBaseInner = new JobBaseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedJobBaseInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedJobBaseInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedJobBaseInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedJobBaseInner.properties = JobBaseProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedJobBaseInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedJobBaseInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.java deleted file mode 100644 index e6f115efc86a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ListNotebookKeysResult model. - */ -@Immutable -public final class ListNotebookKeysResultInner implements JsonSerializable { - /* - * The primaryAccessKey property. - */ - private String primaryAccessKey; - - /* - * The secondaryAccessKey property. - */ - private String secondaryAccessKey; - - /** - * Creates an instance of ListNotebookKeysResultInner class. - */ - public ListNotebookKeysResultInner() { - } - - /** - * Get the primaryAccessKey property: The primaryAccessKey property. - * - * @return the primaryAccessKey value. - */ - public String primaryAccessKey() { - return this.primaryAccessKey; - } - - /** - * Get the secondaryAccessKey property: The secondaryAccessKey property. - * - * @return the secondaryAccessKey value. - */ - public String secondaryAccessKey() { - return this.secondaryAccessKey; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ListNotebookKeysResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ListNotebookKeysResultInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ListNotebookKeysResultInner. - */ - public static ListNotebookKeysResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ListNotebookKeysResultInner deserializedListNotebookKeysResultInner = new ListNotebookKeysResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("primaryAccessKey".equals(fieldName)) { - deserializedListNotebookKeysResultInner.primaryAccessKey = reader.getString(); - } else if ("secondaryAccessKey".equals(fieldName)) { - deserializedListNotebookKeysResultInner.secondaryAccessKey = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedListNotebookKeysResultInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.java deleted file mode 100644 index 6a4fbb94a968..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ListStorageAccountKeysResult model. - */ -@Immutable -public final class ListStorageAccountKeysResultInner implements JsonSerializable { - /* - * The userStorageKey property. - */ - private String userStorageKey; - - /** - * Creates an instance of ListStorageAccountKeysResultInner class. - */ - public ListStorageAccountKeysResultInner() { - } - - /** - * Get the userStorageKey property: The userStorageKey property. - * - * @return the userStorageKey value. - */ - public String userStorageKey() { - return this.userStorageKey; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ListStorageAccountKeysResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ListStorageAccountKeysResultInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ListStorageAccountKeysResultInner. - */ - public static ListStorageAccountKeysResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ListStorageAccountKeysResultInner deserializedListStorageAccountKeysResultInner - = new ListStorageAccountKeysResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("userStorageKey".equals(fieldName)) { - deserializedListStorageAccountKeysResultInner.userStorageKey = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedListStorageAccountKeysResultInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.java deleted file mode 100644 index ce6ca9d857d1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.RegistryListCredentialsResult; -import java.io.IOException; - -/** - * The ListWorkspaceKeysResult model. - */ -@Immutable -public final class ListWorkspaceKeysResultInner implements JsonSerializable { - /* - * The userStorageKey property. - */ - private String userStorageKey; - - /* - * The userStorageResourceId property. - */ - private String userStorageResourceId; - - /* - * The appInsightsInstrumentationKey property. - */ - private String appInsightsInstrumentationKey; - - /* - * The containerRegistryCredentials property. - */ - private RegistryListCredentialsResult containerRegistryCredentials; - - /* - * The notebookAccessKeys property. - */ - private ListNotebookKeysResultInner notebookAccessKeys; - - /** - * Creates an instance of ListWorkspaceKeysResultInner class. - */ - public ListWorkspaceKeysResultInner() { - } - - /** - * Get the userStorageKey property: The userStorageKey property. - * - * @return the userStorageKey value. - */ - public String userStorageKey() { - return this.userStorageKey; - } - - /** - * Get the userStorageResourceId property: The userStorageResourceId property. - * - * @return the userStorageResourceId value. - */ - public String userStorageResourceId() { - return this.userStorageResourceId; - } - - /** - * Get the appInsightsInstrumentationKey property: The appInsightsInstrumentationKey property. - * - * @return the appInsightsInstrumentationKey value. - */ - public String appInsightsInstrumentationKey() { - return this.appInsightsInstrumentationKey; - } - - /** - * Get the containerRegistryCredentials property: The containerRegistryCredentials property. - * - * @return the containerRegistryCredentials value. - */ - public RegistryListCredentialsResult containerRegistryCredentials() { - return this.containerRegistryCredentials; - } - - /** - * Get the notebookAccessKeys property: The notebookAccessKeys property. - * - * @return the notebookAccessKeys value. - */ - public ListNotebookKeysResultInner notebookAccessKeys() { - return this.notebookAccessKeys; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (containerRegistryCredentials() != null) { - containerRegistryCredentials().validate(); - } - if (notebookAccessKeys() != null) { - notebookAccessKeys().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ListWorkspaceKeysResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ListWorkspaceKeysResultInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ListWorkspaceKeysResultInner. - */ - public static ListWorkspaceKeysResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ListWorkspaceKeysResultInner deserializedListWorkspaceKeysResultInner = new ListWorkspaceKeysResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("userStorageKey".equals(fieldName)) { - deserializedListWorkspaceKeysResultInner.userStorageKey = reader.getString(); - } else if ("userStorageResourceId".equals(fieldName)) { - deserializedListWorkspaceKeysResultInner.userStorageResourceId = reader.getString(); - } else if ("appInsightsInstrumentationKey".equals(fieldName)) { - deserializedListWorkspaceKeysResultInner.appInsightsInstrumentationKey = reader.getString(); - } else if ("containerRegistryCredentials".equals(fieldName)) { - deserializedListWorkspaceKeysResultInner.containerRegistryCredentials - = RegistryListCredentialsResult.fromJson(reader); - } else if ("notebookAccessKeys".equals(fieldName)) { - deserializedListWorkspaceKeysResultInner.notebookAccessKeys - = ListNotebookKeysResultInner.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedListWorkspaceKeysResultInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkProvisionStatusInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkProvisionStatusInner.java deleted file mode 100644 index a4d6b08c3e63..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkProvisionStatusInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; -import java.io.IOException; - -/** - * Status of the Provisioning for the managed network of a machine learning workspace. - */ -@Fluent -public final class ManagedNetworkProvisionStatusInner implements JsonSerializable { - /* - * The sparkReady property. - */ - private Boolean sparkReady; - - /* - * Status for the managed network of a machine learning workspace. - */ - private ManagedNetworkStatus status; - - /** - * Creates an instance of ManagedNetworkProvisionStatusInner class. - */ - public ManagedNetworkProvisionStatusInner() { - } - - /** - * Get the sparkReady property: The sparkReady property. - * - * @return the sparkReady value. - */ - public Boolean sparkReady() { - return this.sparkReady; - } - - /** - * Set the sparkReady property: The sparkReady property. - * - * @param sparkReady the sparkReady value to set. - * @return the ManagedNetworkProvisionStatusInner object itself. - */ - public ManagedNetworkProvisionStatusInner withSparkReady(Boolean sparkReady) { - this.sparkReady = sparkReady; - return this; - } - - /** - * Get the status property: Status for the managed network of a machine learning workspace. - * - * @return the status value. - */ - public ManagedNetworkStatus status() { - return this.status; - } - - /** - * Set the status property: Status for the managed network of a machine learning workspace. - * - * @param status the status value to set. - * @return the ManagedNetworkProvisionStatusInner object itself. - */ - public ManagedNetworkProvisionStatusInner withStatus(ManagedNetworkStatus status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("sparkReady", this.sparkReady); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedNetworkProvisionStatusInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedNetworkProvisionStatusInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedNetworkProvisionStatusInner. - */ - public static ManagedNetworkProvisionStatusInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedNetworkProvisionStatusInner deserializedManagedNetworkProvisionStatusInner - = new ManagedNetworkProvisionStatusInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sparkReady".equals(fieldName)) { - deserializedManagedNetworkProvisionStatusInner.sparkReady - = reader.getNullable(JsonReader::getBoolean); - } else if ("status".equals(fieldName)) { - deserializedManagedNetworkProvisionStatusInner.status - = ManagedNetworkStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedNetworkProvisionStatusInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsInner.java deleted file mode 100644 index 288819df29d0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsInner.java +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.IsolationMode; -import com.azure.resourcemanager.machinelearning.models.OutboundRule; -import java.io.IOException; -import java.util.Map; - -/** - * Managed Network settings for a machine learning workspace. - */ -@Fluent -public final class ManagedNetworkSettingsInner implements JsonSerializable { - /* - * Isolation mode for the managed network of a machine learning workspace. - */ - private IsolationMode isolationMode; - - /* - * The networkId property. - */ - private String networkId; - - /* - * Dictionary of - */ - private Map outboundRules; - - /* - * Status of the Provisioning for the managed network of a machine learning workspace. - */ - private ManagedNetworkProvisionStatusInner status; - - /** - * Creates an instance of ManagedNetworkSettingsInner class. - */ - public ManagedNetworkSettingsInner() { - } - - /** - * Get the isolationMode property: Isolation mode for the managed network of a machine learning workspace. - * - * @return the isolationMode value. - */ - public IsolationMode isolationMode() { - return this.isolationMode; - } - - /** - * Set the isolationMode property: Isolation mode for the managed network of a machine learning workspace. - * - * @param isolationMode the isolationMode value to set. - * @return the ManagedNetworkSettingsInner object itself. - */ - public ManagedNetworkSettingsInner withIsolationMode(IsolationMode isolationMode) { - this.isolationMode = isolationMode; - return this; - } - - /** - * Get the networkId property: The networkId property. - * - * @return the networkId value. - */ - public String networkId() { - return this.networkId; - } - - /** - * Get the outboundRules property: Dictionary of <OutboundRule>. - * - * @return the outboundRules value. - */ - public Map outboundRules() { - return this.outboundRules; - } - - /** - * Set the outboundRules property: Dictionary of <OutboundRule>. - * - * @param outboundRules the outboundRules value to set. - * @return the ManagedNetworkSettingsInner object itself. - */ - public ManagedNetworkSettingsInner withOutboundRules(Map outboundRules) { - this.outboundRules = outboundRules; - return this; - } - - /** - * Get the status property: Status of the Provisioning for the managed network of a machine learning workspace. - * - * @return the status value. - */ - public ManagedNetworkProvisionStatusInner status() { - return this.status; - } - - /** - * Set the status property: Status of the Provisioning for the managed network of a machine learning workspace. - * - * @param status the status value to set. - * @return the ManagedNetworkSettingsInner object itself. - */ - public ManagedNetworkSettingsInner withStatus(ManagedNetworkProvisionStatusInner status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (outboundRules() != null) { - outboundRules().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (status() != null) { - status().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("isolationMode", this.isolationMode == null ? null : this.isolationMode.toString()); - jsonWriter.writeMapField("outboundRules", this.outboundRules, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("status", this.status); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedNetworkSettingsInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedNetworkSettingsInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedNetworkSettingsInner. - */ - public static ManagedNetworkSettingsInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedNetworkSettingsInner deserializedManagedNetworkSettingsInner = new ManagedNetworkSettingsInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("isolationMode".equals(fieldName)) { - deserializedManagedNetworkSettingsInner.isolationMode - = IsolationMode.fromString(reader.getString()); - } else if ("networkId".equals(fieldName)) { - deserializedManagedNetworkSettingsInner.networkId = reader.getString(); - } else if ("outboundRules".equals(fieldName)) { - Map outboundRules = reader.readMap(reader1 -> OutboundRule.fromJson(reader1)); - deserializedManagedNetworkSettingsInner.outboundRules = outboundRules; - } else if ("status".equals(fieldName)) { - deserializedManagedNetworkSettingsInner.status - = ManagedNetworkProvisionStatusInner.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedNetworkSettingsInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/MarketplaceSubscriptionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/MarketplaceSubscriptionInner.java deleted file mode 100644 index 600c30acbe36..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/MarketplaceSubscriptionInner.java +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class MarketplaceSubscriptionInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private MarketplaceSubscriptionProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of MarketplaceSubscriptionInner class. - */ - public MarketplaceSubscriptionInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public MarketplaceSubscriptionProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the MarketplaceSubscriptionInner object itself. - */ - public MarketplaceSubscriptionInner withProperties(MarketplaceSubscriptionProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model MarketplaceSubscriptionInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MarketplaceSubscriptionInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MarketplaceSubscriptionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MarketplaceSubscriptionInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MarketplaceSubscriptionInner. - */ - public static MarketplaceSubscriptionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MarketplaceSubscriptionInner deserializedMarketplaceSubscriptionInner = new MarketplaceSubscriptionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedMarketplaceSubscriptionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedMarketplaceSubscriptionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedMarketplaceSubscriptionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedMarketplaceSubscriptionInner.properties - = MarketplaceSubscriptionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedMarketplaceSubscriptionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMarketplaceSubscriptionInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java deleted file mode 100644 index 1bd535de9b53..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class ModelContainerInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private ModelContainerProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of ModelContainerInner class. - */ - public ModelContainerInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public ModelContainerProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the ModelContainerInner object itself. - */ - public ModelContainerInner withProperties(ModelContainerProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property properties in model ModelContainerInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ModelContainerInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ModelContainerInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ModelContainerInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ModelContainerInner. - */ - public static ModelContainerInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ModelContainerInner deserializedModelContainerInner = new ModelContainerInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedModelContainerInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedModelContainerInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedModelContainerInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedModelContainerInner.properties = ModelContainerProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedModelContainerInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedModelContainerInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java deleted file mode 100644 index 7f2f08e98758..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class ModelVersionInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private ModelVersionProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of ModelVersionInner class. - */ - public ModelVersionInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public ModelVersionProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the ModelVersionInner object itself. - */ - public ModelVersionInner withProperties(ModelVersionProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property properties in model ModelVersionInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ModelVersionInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ModelVersionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ModelVersionInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ModelVersionInner. - */ - public static ModelVersionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ModelVersionInner deserializedModelVersionInner = new ModelVersionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedModelVersionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedModelVersionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedModelVersionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedModelVersionInner.properties = ModelVersionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedModelVersionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedModelVersionInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.java deleted file mode 100644 index 92e2d3d03636..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The NotebookAccessTokenResult model. - */ -@Immutable -public final class NotebookAccessTokenResultInner implements JsonSerializable { - /* - * The notebookResourceId property. - */ - private String notebookResourceId; - - /* - * The hostName property. - */ - private String hostname; - - /* - * The publicDns property. - */ - private String publicDns; - - /* - * The accessToken property. - */ - private String accessToken; - - /* - * The tokenType property. - */ - private String tokenType; - - /* - * The expiresIn property. - */ - private Integer expiresIn; - - /* - * The refreshToken property. - */ - private String refreshToken; - - /* - * The scope property. - */ - private String scope; - - /** - * Creates an instance of NotebookAccessTokenResultInner class. - */ - public NotebookAccessTokenResultInner() { - } - - /** - * Get the notebookResourceId property: The notebookResourceId property. - * - * @return the notebookResourceId value. - */ - public String notebookResourceId() { - return this.notebookResourceId; - } - - /** - * Get the hostname property: The hostName property. - * - * @return the hostname value. - */ - public String hostname() { - return this.hostname; - } - - /** - * Get the publicDns property: The publicDns property. - * - * @return the publicDns value. - */ - public String publicDns() { - return this.publicDns; - } - - /** - * Get the accessToken property: The accessToken property. - * - * @return the accessToken value. - */ - public String accessToken() { - return this.accessToken; - } - - /** - * Get the tokenType property: The tokenType property. - * - * @return the tokenType value. - */ - public String tokenType() { - return this.tokenType; - } - - /** - * Get the expiresIn property: The expiresIn property. - * - * @return the expiresIn value. - */ - public Integer expiresIn() { - return this.expiresIn; - } - - /** - * Get the refreshToken property: The refreshToken property. - * - * @return the refreshToken value. - */ - public String refreshToken() { - return this.refreshToken; - } - - /** - * Get the scope property: The scope property. - * - * @return the scope value. - */ - public String scope() { - return this.scope; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NotebookAccessTokenResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NotebookAccessTokenResultInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NotebookAccessTokenResultInner. - */ - public static NotebookAccessTokenResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NotebookAccessTokenResultInner deserializedNotebookAccessTokenResultInner - = new NotebookAccessTokenResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("notebookResourceId".equals(fieldName)) { - deserializedNotebookAccessTokenResultInner.notebookResourceId = reader.getString(); - } else if ("hostName".equals(fieldName)) { - deserializedNotebookAccessTokenResultInner.hostname = reader.getString(); - } else if ("publicDns".equals(fieldName)) { - deserializedNotebookAccessTokenResultInner.publicDns = reader.getString(); - } else if ("accessToken".equals(fieldName)) { - deserializedNotebookAccessTokenResultInner.accessToken = reader.getString(); - } else if ("tokenType".equals(fieldName)) { - deserializedNotebookAccessTokenResultInner.tokenType = reader.getString(); - } else if ("expiresIn".equals(fieldName)) { - deserializedNotebookAccessTokenResultInner.expiresIn = reader.getNullable(JsonReader::getInt); - } else if ("refreshToken".equals(fieldName)) { - deserializedNotebookAccessTokenResultInner.refreshToken = reader.getString(); - } else if ("scope".equals(fieldName)) { - deserializedNotebookAccessTokenResultInner.scope = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNotebookAccessTokenResultInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookResourceInfoInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookResourceInfoInner.java deleted file mode 100644 index eaec582a6eb3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookResourceInfoInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.NotebookPreparationError; -import java.io.IOException; - -/** - * The NotebookResourceInfo model. - */ -@Fluent -public final class NotebookResourceInfoInner implements JsonSerializable { - /* - * The fqdn property. - */ - private String fqdn; - - /* - * the data plane resourceId that used to initialize notebook component - */ - private String resourceId; - - /* - * The error that occurs when preparing notebook. - */ - private NotebookPreparationError notebookPreparationError; - - /** - * Creates an instance of NotebookResourceInfoInner class. - */ - public NotebookResourceInfoInner() { - } - - /** - * Get the fqdn property: The fqdn property. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Set the fqdn property: The fqdn property. - * - * @param fqdn the fqdn value to set. - * @return the NotebookResourceInfoInner object itself. - */ - public NotebookResourceInfoInner withFqdn(String fqdn) { - this.fqdn = fqdn; - return this; - } - - /** - * Get the resourceId property: the data plane resourceId that used to initialize notebook component. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: the data plane resourceId that used to initialize notebook component. - * - * @param resourceId the resourceId value to set. - * @return the NotebookResourceInfoInner object itself. - */ - public NotebookResourceInfoInner withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the notebookPreparationError property: The error that occurs when preparing notebook. - * - * @return the notebookPreparationError value. - */ - public NotebookPreparationError notebookPreparationError() { - return this.notebookPreparationError; - } - - /** - * Set the notebookPreparationError property: The error that occurs when preparing notebook. - * - * @param notebookPreparationError the notebookPreparationError value to set. - * @return the NotebookResourceInfoInner object itself. - */ - public NotebookResourceInfoInner withNotebookPreparationError(NotebookPreparationError notebookPreparationError) { - this.notebookPreparationError = notebookPreparationError; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (notebookPreparationError() != null) { - notebookPreparationError().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("fqdn", this.fqdn); - jsonWriter.writeStringField("resourceId", this.resourceId); - jsonWriter.writeJsonField("notebookPreparationError", this.notebookPreparationError); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NotebookResourceInfoInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NotebookResourceInfoInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NotebookResourceInfoInner. - */ - public static NotebookResourceInfoInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NotebookResourceInfoInner deserializedNotebookResourceInfoInner = new NotebookResourceInfoInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fqdn".equals(fieldName)) { - deserializedNotebookResourceInfoInner.fqdn = reader.getString(); - } else if ("resourceId".equals(fieldName)) { - deserializedNotebookResourceInfoInner.resourceId = reader.getString(); - } else if ("notebookPreparationError".equals(fieldName)) { - deserializedNotebookResourceInfoInner.notebookPreparationError - = NotebookPreparationError.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNotebookResourceInfoInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentInner.java deleted file mode 100644 index f65e2d1dc6ff..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentInner.java +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentProperties; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.io.IOException; -import java.util.Map; - -/** - * The OnlineDeployment model. - */ -@Fluent -public final class OnlineDeploymentInner extends Resource { - /* - * [Required] Additional attributes of the entity. - */ - private OnlineDeploymentProperties properties; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - */ - private String kind; - - /* - * Managed service identity (system assigned and/or user assigned identities) - */ - private ManagedServiceIdentity identity; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of OnlineDeploymentInner class. - */ - public OnlineDeploymentInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public OnlineDeploymentProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the OnlineDeploymentInner object itself. - */ - public OnlineDeploymentInner withProperties(OnlineDeploymentProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @param kind the kind value to set. - * @return the OnlineDeploymentInner object itself. - */ - public OnlineDeploymentInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the OnlineDeploymentInner object itself. - */ - public OnlineDeploymentInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the OnlineDeploymentInner object itself. - */ - public OnlineDeploymentInner withSku(Sku sku) { - this.sku = sku; - 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public OnlineDeploymentInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OnlineDeploymentInner 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model OnlineDeploymentInner")); - } else { - properties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OnlineDeploymentInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("kind", this.kind); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeJsonField("sku", this.sku); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OnlineDeploymentInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OnlineDeploymentInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OnlineDeploymentInner. - */ - public static OnlineDeploymentInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OnlineDeploymentInner deserializedOnlineDeploymentInner = new OnlineDeploymentInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedOnlineDeploymentInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedOnlineDeploymentInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedOnlineDeploymentInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedOnlineDeploymentInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedOnlineDeploymentInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedOnlineDeploymentInner.properties = OnlineDeploymentProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedOnlineDeploymentInner.kind = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedOnlineDeploymentInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("sku".equals(fieldName)) { - deserializedOnlineDeploymentInner.sku = Sku.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedOnlineDeploymentInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOnlineDeploymentInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java deleted file mode 100644 index 7170897d2235..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.io.IOException; -import java.util.Map; - -/** - * The OnlineEndpoint model. - */ -@Fluent -public final class OnlineEndpointInner extends Resource { - /* - * [Required] Additional attributes of the entity. - */ - private OnlineEndpointProperties properties; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - */ - private String kind; - - /* - * Managed service identity (system assigned and/or user assigned identities) - */ - private ManagedServiceIdentity identity; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of OnlineEndpointInner class. - */ - public OnlineEndpointInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public OnlineEndpointProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the OnlineEndpointInner object itself. - */ - public OnlineEndpointInner withProperties(OnlineEndpointProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @param kind the kind value to set. - * @return the OnlineEndpointInner object itself. - */ - public OnlineEndpointInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the OnlineEndpointInner object itself. - */ - public OnlineEndpointInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the OnlineEndpointInner object itself. - */ - public OnlineEndpointInner withSku(Sku sku) { - this.sku = sku; - 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public OnlineEndpointInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OnlineEndpointInner 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property properties in model OnlineEndpointInner")); - } else { - properties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OnlineEndpointInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("kind", this.kind); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeJsonField("sku", this.sku); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OnlineEndpointInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OnlineEndpointInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OnlineEndpointInner. - */ - public static OnlineEndpointInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OnlineEndpointInner deserializedOnlineEndpointInner = new OnlineEndpointInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedOnlineEndpointInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedOnlineEndpointInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedOnlineEndpointInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedOnlineEndpointInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedOnlineEndpointInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedOnlineEndpointInner.properties = OnlineEndpointProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedOnlineEndpointInner.kind = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedOnlineEndpointInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("sku".equals(fieldName)) { - deserializedOnlineEndpointInner.sku = Sku.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedOnlineEndpointInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOnlineEndpointInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OperationInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OperationInner.java deleted file mode 100644 index 84135d31bcfa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OperationInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.ActionType; -import com.azure.resourcemanager.machinelearning.models.OperationDisplay; -import com.azure.resourcemanager.machinelearning.models.Origin; -import java.io.IOException; - -/** - * REST API Operation - * - * Details of a REST API operation, returned from the Resource Provider Operations API. - */ -@Fluent -public final class OperationInner implements JsonSerializable { - /* - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" - */ - private String name; - - /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for - * ARM/control-plane operations. - */ - private Boolean isDataAction; - - /* - * Localized display information for this particular operation. - */ - private OperationDisplay display; - - /* - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default - * value is "user,system" - */ - private Origin origin; - - /* - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ - private ActionType actionType; - - /** - * Creates an instance of OperationInner class. - */ - public OperationInner() { - } - - /** - * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Get the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display property: Localized display information for this particular operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - - /** - * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - public Origin origin() { - return this.origin; - } - - /** - * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. - * - * @return the actionType value. - */ - public ActionType actionType() { - return this.actionType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("display", this.display); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationInner. - */ - public static OperationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationInner deserializedOperationInner = new OperationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOperationInner.name = reader.getString(); - } else if ("isDataAction".equals(fieldName)) { - deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean); - } else if ("display".equals(fieldName)) { - deserializedOperationInner.display = OperationDisplay.fromJson(reader); - } else if ("origin".equals(fieldName)) { - deserializedOperationInner.origin = Origin.fromString(reader.getString()); - } else if ("actionType".equals(fieldName)) { - deserializedOperationInner.actionType = ActionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OutboundRuleBasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OutboundRuleBasicResourceInner.java deleted file mode 100644 index 6795602d33bb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OutboundRuleBasicResourceInner.java +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.OutboundRule; -import java.io.IOException; - -/** - * Outbound Rule Basic Resource for the managed network of a machine learning workspace. - */ -@Fluent -public final class OutboundRuleBasicResourceInner extends ProxyResource { - /* - * Outbound Rule for the managed network of a machine learning workspace. - */ - private OutboundRule properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of OutboundRuleBasicResourceInner class. - */ - public OutboundRuleBasicResourceInner() { - } - - /** - * Get the properties property: Outbound Rule for the managed network of a machine learning workspace. - * - * @return the properties value. - */ - public OutboundRule properties() { - return this.properties; - } - - /** - * Set the properties property: Outbound Rule for the managed network of a machine learning workspace. - * - * @param properties the properties value to set. - * @return the OutboundRuleBasicResourceInner object itself. - */ - public OutboundRuleBasicResourceInner withProperties(OutboundRule 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model OutboundRuleBasicResourceInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OutboundRuleBasicResourceInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OutboundRuleBasicResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OutboundRuleBasicResourceInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OutboundRuleBasicResourceInner. - */ - public static OutboundRuleBasicResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OutboundRuleBasicResourceInner deserializedOutboundRuleBasicResourceInner - = new OutboundRuleBasicResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedOutboundRuleBasicResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedOutboundRuleBasicResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedOutboundRuleBasicResourceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedOutboundRuleBasicResourceInner.properties = OutboundRule.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedOutboundRuleBasicResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOutboundRuleBasicResourceInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PendingUploadResponseDtoInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PendingUploadResponseDtoInner.java deleted file mode 100644 index c5a5b5cf9b8f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PendingUploadResponseDtoInner.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.BlobReferenceForConsumptionDto; -import com.azure.resourcemanager.machinelearning.models.PendingUploadType; -import java.io.IOException; - -/** - * The PendingUploadResponseDto model. - */ -@Fluent -public final class PendingUploadResponseDtoInner implements JsonSerializable { - /* - * Container level read, write, list SAS - */ - private BlobReferenceForConsumptionDto blobReferenceForConsumption; - - /* - * ID for this upload request - */ - private String pendingUploadId; - - /* - * TemporaryBlobReference is the only supported type - */ - private PendingUploadType pendingUploadType; - - /** - * Creates an instance of PendingUploadResponseDtoInner class. - */ - public PendingUploadResponseDtoInner() { - } - - /** - * Get the blobReferenceForConsumption property: Container level read, write, list SAS. - * - * @return the blobReferenceForConsumption value. - */ - public BlobReferenceForConsumptionDto blobReferenceForConsumption() { - return this.blobReferenceForConsumption; - } - - /** - * Set the blobReferenceForConsumption property: Container level read, write, list SAS. - * - * @param blobReferenceForConsumption the blobReferenceForConsumption value to set. - * @return the PendingUploadResponseDtoInner object itself. - */ - public PendingUploadResponseDtoInner - withBlobReferenceForConsumption(BlobReferenceForConsumptionDto blobReferenceForConsumption) { - this.blobReferenceForConsumption = blobReferenceForConsumption; - return this; - } - - /** - * Get the pendingUploadId property: ID for this upload request. - * - * @return the pendingUploadId value. - */ - public String pendingUploadId() { - return this.pendingUploadId; - } - - /** - * Set the pendingUploadId property: ID for this upload request. - * - * @param pendingUploadId the pendingUploadId value to set. - * @return the PendingUploadResponseDtoInner object itself. - */ - public PendingUploadResponseDtoInner withPendingUploadId(String pendingUploadId) { - this.pendingUploadId = pendingUploadId; - return this; - } - - /** - * Get the pendingUploadType property: TemporaryBlobReference is the only supported type. - * - * @return the pendingUploadType value. - */ - public PendingUploadType pendingUploadType() { - return this.pendingUploadType; - } - - /** - * Set the pendingUploadType property: TemporaryBlobReference is the only supported type. - * - * @param pendingUploadType the pendingUploadType value to set. - * @return the PendingUploadResponseDtoInner object itself. - */ - public PendingUploadResponseDtoInner withPendingUploadType(PendingUploadType pendingUploadType) { - this.pendingUploadType = pendingUploadType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (blobReferenceForConsumption() != null) { - blobReferenceForConsumption().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("blobReferenceForConsumption", this.blobReferenceForConsumption); - jsonWriter.writeStringField("pendingUploadId", this.pendingUploadId); - jsonWriter.writeStringField("pendingUploadType", - this.pendingUploadType == null ? null : this.pendingUploadType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PendingUploadResponseDtoInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PendingUploadResponseDtoInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PendingUploadResponseDtoInner. - */ - public static PendingUploadResponseDtoInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PendingUploadResponseDtoInner deserializedPendingUploadResponseDtoInner - = new PendingUploadResponseDtoInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("blobReferenceForConsumption".equals(fieldName)) { - deserializedPendingUploadResponseDtoInner.blobReferenceForConsumption - = BlobReferenceForConsumptionDto.fromJson(reader); - } else if ("pendingUploadId".equals(fieldName)) { - deserializedPendingUploadResponseDtoInner.pendingUploadId = reader.getString(); - } else if ("pendingUploadType".equals(fieldName)) { - deserializedPendingUploadResponseDtoInner.pendingUploadType - = PendingUploadType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPendingUploadResponseDtoInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionInner.java deleted file mode 100644 index a18d97bb627a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionInner.java +++ /dev/null @@ -1,339 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.io.IOException; -import java.util.Map; - -/** - * The Private Endpoint Connection resource. - */ -@Fluent -public final class PrivateEndpointConnectionInner extends ProxyResource { - /* - * Resource properties. - */ - private PrivateEndpointConnectionProperties innerProperties; - - /* - * The identity of the resource. - */ - private ManagedServiceIdentity identity; - - /* - * Specifies the location of the resource. - */ - private String location; - - /* - * Contains resource tags defined as key/value pairs. - */ - private Map tags; - - /* - * The sku of the workspace. - */ - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of PrivateEndpointConnectionInner class. - */ - public PrivateEndpointConnectionInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private PrivateEndpointConnectionProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the location property: Specifies the location of the resource. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Specifies the location of the resource. - * - * @param location the location value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the tags property: Contains resource tags defined as key/value pairs. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Contains resource tags defined as key/value pairs. - * - * @param tags the tags value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the sku property: The sku of the workspace. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner withSku(Sku sku) { - this.sku = sku; - 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the privateEndpoint property: The resource of private end point. - * - * @return the privateEndpoint value. - */ - public PrivateEndpoint privateEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); - } - - /** - * Set the privateEndpoint property: The resource of private end point. - * - * @param privateEndpoint the privateEndpoint value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateEndpoint(privateEndpoint); - return this; - } - - /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); - } - - /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner - withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); - return this; - } - - /** - * Get the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @return the provisioningState value. - */ - public PrivateEndpointConnectionProvisioningState 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(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("sku", this.sku); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateEndpointConnectionInner. - */ - public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionInner deserializedPrivateEndpointConnectionInner - = new PrivateEndpointConnectionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.innerProperties - = PrivateEndpointConnectionProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.location = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPrivateEndpointConnectionInner.tags = tags; - } else if ("sku".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.sku = Sku.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionProperties.java deleted file mode 100644 index 73c00d781c1c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionProperties.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import java.io.IOException; - -/** - * Properties of the PrivateEndpointConnectProperties. - */ -@Fluent -public final class PrivateEndpointConnectionProperties - implements JsonSerializable { - /* - * The resource of private end point. - */ - private PrivateEndpoint privateEndpoint; - - /* - * A collection of information about the state of the connection between service consumer and provider. - */ - private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; - - /* - * The provisioning state of the private endpoint connection resource. - */ - private PrivateEndpointConnectionProvisioningState provisioningState; - - /** - * Creates an instance of PrivateEndpointConnectionProperties class. - */ - public PrivateEndpointConnectionProperties() { - } - - /** - * Get the privateEndpoint property: The resource of private end point. - * - * @return the privateEndpoint value. - */ - public PrivateEndpoint privateEndpoint() { - return this.privateEndpoint; - } - - /** - * Set the privateEndpoint property: The resource of private end point. - * - * @param privateEndpoint the privateEndpoint value to set. - * @return the PrivateEndpointConnectionProperties object itself. - */ - public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.privateEndpoint = privateEndpoint; - return this; - } - - /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.privateLinkServiceConnectionState; - } - - /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. - * @return the PrivateEndpointConnectionProperties object itself. - */ - public PrivateEndpointConnectionProperties - withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; - return this; - } - - /** - * Get the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @return the provisioningState value. - */ - public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property privateLinkServiceConnectionState in model PrivateEndpointConnectionProperties")); - } else { - privateLinkServiceConnectionState().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); - jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateEndpointConnectionProperties. - */ - public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionProperties deserializedPrivateEndpointConnectionProperties - = new PrivateEndpointConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("privateLinkServiceConnectionState".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState - = PrivateLinkServiceConnectionState.fromJson(reader); - } else if ("privateEndpoint".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.provisioningState - = PrivateEndpointConnectionProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.java deleted file mode 100644 index 7c0b27237e55..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; -import java.io.IOException; -import java.util.List; - -/** - * A list of private link resources. - */ -@Fluent -public final class PrivateLinkResourceListResultInner implements JsonSerializable { - /* - * Array of private link resources - */ - private List value; - - /** - * Creates an instance of PrivateLinkResourceListResultInner class. - */ - public PrivateLinkResourceListResultInner() { - } - - /** - * Get the value property: Array of private link resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of private link resources. - * - * @param value the value value to set. - * @return the PrivateLinkResourceListResultInner object itself. - */ - public PrivateLinkResourceListResultInner 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) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResourceListResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResourceListResultInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateLinkResourceListResultInner. - */ - public static PrivateLinkResourceListResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResourceListResultInner deserializedPrivateLinkResourceListResultInner - = new PrivateLinkResourceListResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> PrivateLinkResource.fromJson(reader1)); - deserializedPrivateLinkResourceListResultInner.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResourceListResultInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java deleted file mode 100644 index 856715b8d766..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Properties of a private link resource. - */ -@Fluent -public final class PrivateLinkResourceProperties implements JsonSerializable { - /* - * The private link resource group id. - */ - private String groupId; - - /* - * The private link resource required member names. - */ - private List requiredMembers; - - /* - * The private link resource Private link DNS zone name. - */ - private List requiredZoneNames; - - /** - * Creates an instance of PrivateLinkResourceProperties class. - */ - public PrivateLinkResourceProperties() { - } - - /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - public String groupId() { - return this.groupId; - } - - /** - * Get the requiredMembers property: The private link resource required member names. - * - * @return the requiredMembers value. - */ - public List requiredMembers() { - return this.requiredMembers; - } - - /** - * Get the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @return the requiredZoneNames value. - */ - public List requiredZoneNames() { - return this.requiredZoneNames; - } - - /** - * Set the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResourceProperties object itself. - */ - public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) { - this.requiredZoneNames = requiredZoneNames; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("requiredZoneNames", this.requiredZoneNames, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResourceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResourceProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateLinkResourceProperties. - */ - public static PrivateLinkResourceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResourceProperties deserializedPrivateLinkResourceProperties - = new PrivateLinkResourceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("groupId".equals(fieldName)) { - deserializedPrivateLinkResourceProperties.groupId = reader.getString(); - } else if ("requiredMembers".equals(fieldName)) { - List requiredMembers = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateLinkResourceProperties.requiredMembers = requiredMembers; - } else if ("requiredZoneNames".equals(fieldName)) { - List requiredZoneNames = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateLinkResourceProperties.requiredZoneNames = requiredZoneNames; - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResourceProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryInner.java deleted file mode 100644 index 446a0a7f6dcf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryInner.java +++ /dev/null @@ -1,450 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * The Registry model. - */ -@Fluent -public final class RegistryInner extends Resource { - /* - * Managed service identity (system assigned and/or user assigned identities) - */ - private ManagedServiceIdentity identity; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - */ - private String kind; - - /* - * [Required] Additional attributes of the entity. - */ - private RegistryProperties innerProperties = new RegistryProperties(); - - /* - * Sku details required for ARM contract for Autoscaling. - */ - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of RegistryInner class. - */ - public RegistryInner() { - } - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the RegistryInner object itself. - */ - public RegistryInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @param kind the kind value to set. - * @return the RegistryInner object itself. - */ - public RegistryInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the innerProperties property: [Required] Additional attributes of the entity. - * - * @return the innerProperties value. - */ - private RegistryProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the RegistryInner object itself. - */ - public RegistryInner withSku(Sku sku) { - this.sku = sku; - 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public RegistryInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RegistryInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the discoveryUrl property: Discovery URL for the Registry. - * - * @return the discoveryUrl value. - */ - public String discoveryUrl() { - return this.innerProperties() == null ? null : this.innerProperties().discoveryUrl(); - } - - /** - * Set the discoveryUrl property: Discovery URL for the Registry. - * - * @param discoveryUrl the discoveryUrl value to set. - * @return the RegistryInner object itself. - */ - public RegistryInner withDiscoveryUrl(String discoveryUrl) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryProperties(); - } - this.innerProperties().withDiscoveryUrl(discoveryUrl); - return this; - } - - /** - * Get the intellectualPropertyPublisher property: IntellectualPropertyPublisher for the registry. - * - * @return the intellectualPropertyPublisher value. - */ - public String intellectualPropertyPublisher() { - return this.innerProperties() == null ? null : this.innerProperties().intellectualPropertyPublisher(); - } - - /** - * Set the intellectualPropertyPublisher property: IntellectualPropertyPublisher for the registry. - * - * @param intellectualPropertyPublisher the intellectualPropertyPublisher value to set. - * @return the RegistryInner object itself. - */ - public RegistryInner withIntellectualPropertyPublisher(String intellectualPropertyPublisher) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryProperties(); - } - this.innerProperties().withIntellectualPropertyPublisher(intellectualPropertyPublisher); - return this; - } - - /** - * Get the managedResourceGroup property: ResourceId of the managed RG if the registry has system created resources. - * - * @return the managedResourceGroup value. - */ - public ArmResourceId managedResourceGroup() { - return this.innerProperties() == null ? null : this.innerProperties().managedResourceGroup(); - } - - /** - * Set the managedResourceGroup property: ResourceId of the managed RG if the registry has system created resources. - * - * @param managedResourceGroup the managedResourceGroup value to set. - * @return the RegistryInner object itself. - */ - public RegistryInner withManagedResourceGroup(ArmResourceId managedResourceGroup) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryProperties(); - } - this.innerProperties().withManagedResourceGroup(managedResourceGroup); - return this; - } - - /** - * Get the mlFlowRegistryUri property: MLFlow Registry URI for the Registry. - * - * @return the mlFlowRegistryUri value. - */ - public String mlFlowRegistryUri() { - return this.innerProperties() == null ? null : this.innerProperties().mlFlowRegistryUri(); - } - - /** - * Set the mlFlowRegistryUri property: MLFlow Registry URI for the Registry. - * - * @param mlFlowRegistryUri the mlFlowRegistryUri value to set. - * @return the RegistryInner object itself. - */ - public RegistryInner withMlFlowRegistryUri(String mlFlowRegistryUri) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryProperties(); - } - this.innerProperties().withMlFlowRegistryUri(mlFlowRegistryUri); - return this; - } - - /** - * Get the registryPrivateEndpointConnections property: Private endpoint connections info used for pending - * connections in private link portal. - * - * @return the registryPrivateEndpointConnections value. - */ - public List registryPrivateEndpointConnections() { - return this.innerProperties() == null ? null : this.innerProperties().registryPrivateEndpointConnections(); - } - - /** - * Set the registryPrivateEndpointConnections property: Private endpoint connections info used for pending - * connections in private link portal. - * - * @param registryPrivateEndpointConnections the registryPrivateEndpointConnections value to set. - * @return the RegistryInner object itself. - */ - public RegistryInner withRegistryPrivateEndpointConnections( - List registryPrivateEndpointConnections) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryProperties(); - } - this.innerProperties().withRegistryPrivateEndpointConnections(registryPrivateEndpointConnections); - return this; - } - - /** - * Get the publicNetworkAccess property: Is the Registry accessible from the internet? - * Possible values: "Enabled" or "Disabled". - * - * @return the publicNetworkAccess value. - */ - public String publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); - } - - /** - * Set the publicNetworkAccess property: Is the Registry accessible from the internet? - * Possible values: "Enabled" or "Disabled". - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the RegistryInner object itself. - */ - public RegistryInner withPublicNetworkAccess(String publicNetworkAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryProperties(); - } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); - return this; - } - - /** - * Get the regionDetails property: Details of each region the registry is in. - * - * @return the regionDetails value. - */ - public List regionDetails() { - return this.innerProperties() == null ? null : this.innerProperties().regionDetails(); - } - - /** - * Set the regionDetails property: Details of each region the registry is in. - * - * @param regionDetails the regionDetails value to set. - * @return the RegistryInner object itself. - */ - public RegistryInner withRegionDetails(List regionDetails) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryProperties(); - } - this.innerProperties().withRegionDetails(regionDetails); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property innerProperties in model RegistryInner")); - } else { - innerProperties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RegistryInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeStringField("kind", this.kind); - jsonWriter.writeJsonField("sku", this.sku); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RegistryInner. - */ - public static RegistryInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryInner deserializedRegistryInner = new RegistryInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedRegistryInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedRegistryInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedRegistryInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedRegistryInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedRegistryInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedRegistryInner.innerProperties = RegistryProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedRegistryInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedRegistryInner.kind = reader.getString(); - } else if ("sku".equals(fieldName)) { - deserializedRegistryInner.sku = Sku.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedRegistryInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryPrivateEndpointConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryPrivateEndpointConnectionProperties.java deleted file mode 100644 index 3c3f8d242062..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryPrivateEndpointConnectionProperties.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; -import java.io.IOException; -import java.util.List; - -/** - * Properties of the Private Endpoint Connection. - */ -@Fluent -public final class RegistryPrivateEndpointConnectionProperties - implements JsonSerializable { - /* - * The group ids - */ - private List groupIds; - - /* - * The PE network resource that is linked to this PE connection. - */ - private PrivateEndpointResource privateEndpoint; - - /* - * The connection state. - */ - private RegistryPrivateLinkServiceConnectionState registryPrivateLinkServiceConnectionState; - - /* - * One of null, "Succeeded", "Provisioning", "Failed". While not approved, it's null. - */ - private String provisioningState; - - /** - * Creates an instance of RegistryPrivateEndpointConnectionProperties class. - */ - public RegistryPrivateEndpointConnectionProperties() { - } - - /** - * Get the groupIds property: The group ids. - * - * @return the groupIds value. - */ - public List groupIds() { - return this.groupIds; - } - - /** - * Set the groupIds property: The group ids. - * - * @param groupIds the groupIds value to set. - * @return the RegistryPrivateEndpointConnectionProperties object itself. - */ - public RegistryPrivateEndpointConnectionProperties withGroupIds(List groupIds) { - this.groupIds = groupIds; - return this; - } - - /** - * Get the privateEndpoint property: The PE network resource that is linked to this PE connection. - * - * @return the privateEndpoint value. - */ - public PrivateEndpointResource privateEndpoint() { - return this.privateEndpoint; - } - - /** - * Set the privateEndpoint property: The PE network resource that is linked to this PE connection. - * - * @param privateEndpoint the privateEndpoint value to set. - * @return the RegistryPrivateEndpointConnectionProperties object itself. - */ - public RegistryPrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpointResource privateEndpoint) { - this.privateEndpoint = privateEndpoint; - return this; - } - - /** - * Get the registryPrivateLinkServiceConnectionState property: The connection state. - * - * @return the registryPrivateLinkServiceConnectionState value. - */ - public RegistryPrivateLinkServiceConnectionState registryPrivateLinkServiceConnectionState() { - return this.registryPrivateLinkServiceConnectionState; - } - - /** - * Set the registryPrivateLinkServiceConnectionState property: The connection state. - * - * @param registryPrivateLinkServiceConnectionState the registryPrivateLinkServiceConnectionState value to set. - * @return the RegistryPrivateEndpointConnectionProperties object itself. - */ - public RegistryPrivateEndpointConnectionProperties withRegistryPrivateLinkServiceConnectionState( - RegistryPrivateLinkServiceConnectionState registryPrivateLinkServiceConnectionState) { - this.registryPrivateLinkServiceConnectionState = registryPrivateLinkServiceConnectionState; - return this; - } - - /** - * Get the provisioningState property: One of null, "Succeeded", "Provisioning", "Failed". While not approved, it's - * null. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: One of null, "Succeeded", "Provisioning", "Failed". While not approved, it's - * null. - * - * @param provisioningState the provisioningState value to set. - * @return the RegistryPrivateEndpointConnectionProperties object itself. - */ - public RegistryPrivateEndpointConnectionProperties withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (registryPrivateLinkServiceConnectionState() != null) { - registryPrivateLinkServiceConnectionState().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("groupIds", this.groupIds, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint); - jsonWriter.writeJsonField("registryPrivateLinkServiceConnectionState", - this.registryPrivateLinkServiceConnectionState); - jsonWriter.writeStringField("provisioningState", this.provisioningState); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryPrivateEndpointConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryPrivateEndpointConnectionProperties if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryPrivateEndpointConnectionProperties. - */ - public static RegistryPrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryPrivateEndpointConnectionProperties deserializedRegistryPrivateEndpointConnectionProperties - = new RegistryPrivateEndpointConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("groupIds".equals(fieldName)) { - List groupIds = reader.readArray(reader1 -> reader1.getString()); - deserializedRegistryPrivateEndpointConnectionProperties.groupIds = groupIds; - } else if ("privateEndpoint".equals(fieldName)) { - deserializedRegistryPrivateEndpointConnectionProperties.privateEndpoint - = PrivateEndpointResource.fromJson(reader); - } else if ("registryPrivateLinkServiceConnectionState".equals(fieldName)) { - deserializedRegistryPrivateEndpointConnectionProperties.registryPrivateLinkServiceConnectionState - = RegistryPrivateLinkServiceConnectionState.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedRegistryPrivateEndpointConnectionProperties.provisioningState = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryPrivateEndpointConnectionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryProperties.java deleted file mode 100644 index 6ddc52a4f052..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryProperties.java +++ /dev/null @@ -1,286 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; -import java.io.IOException; -import java.util.List; - -/** - * Details of the Registry. - */ -@Fluent -public final class RegistryProperties implements JsonSerializable { - /* - * Discovery URL for the Registry - */ - private String discoveryUrl; - - /* - * IntellectualPropertyPublisher for the registry - */ - private String intellectualPropertyPublisher; - - /* - * ResourceId of the managed RG if the registry has system created resources - */ - private ArmResourceId managedResourceGroup; - - /* - * MLFlow Registry URI for the Registry - */ - private String mlFlowRegistryUri; - - /* - * Private endpoint connections info used for pending connections in private link portal - */ - private List registryPrivateEndpointConnections; - - /* - * Is the Registry accessible from the internet? - * Possible values: "Enabled" or "Disabled" - */ - private String publicNetworkAccess; - - /* - * Details of each region the registry is in - */ - private List regionDetails; - - /** - * Creates an instance of RegistryProperties class. - */ - public RegistryProperties() { - } - - /** - * Get the discoveryUrl property: Discovery URL for the Registry. - * - * @return the discoveryUrl value. - */ - public String discoveryUrl() { - return this.discoveryUrl; - } - - /** - * Set the discoveryUrl property: Discovery URL for the Registry. - * - * @param discoveryUrl the discoveryUrl value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withDiscoveryUrl(String discoveryUrl) { - this.discoveryUrl = discoveryUrl; - return this; - } - - /** - * Get the intellectualPropertyPublisher property: IntellectualPropertyPublisher for the registry. - * - * @return the intellectualPropertyPublisher value. - */ - public String intellectualPropertyPublisher() { - return this.intellectualPropertyPublisher; - } - - /** - * Set the intellectualPropertyPublisher property: IntellectualPropertyPublisher for the registry. - * - * @param intellectualPropertyPublisher the intellectualPropertyPublisher value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withIntellectualPropertyPublisher(String intellectualPropertyPublisher) { - this.intellectualPropertyPublisher = intellectualPropertyPublisher; - return this; - } - - /** - * Get the managedResourceGroup property: ResourceId of the managed RG if the registry has system created resources. - * - * @return the managedResourceGroup value. - */ - public ArmResourceId managedResourceGroup() { - return this.managedResourceGroup; - } - - /** - * Set the managedResourceGroup property: ResourceId of the managed RG if the registry has system created resources. - * - * @param managedResourceGroup the managedResourceGroup value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withManagedResourceGroup(ArmResourceId managedResourceGroup) { - this.managedResourceGroup = managedResourceGroup; - return this; - } - - /** - * Get the mlFlowRegistryUri property: MLFlow Registry URI for the Registry. - * - * @return the mlFlowRegistryUri value. - */ - public String mlFlowRegistryUri() { - return this.mlFlowRegistryUri; - } - - /** - * Set the mlFlowRegistryUri property: MLFlow Registry URI for the Registry. - * - * @param mlFlowRegistryUri the mlFlowRegistryUri value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withMlFlowRegistryUri(String mlFlowRegistryUri) { - this.mlFlowRegistryUri = mlFlowRegistryUri; - return this; - } - - /** - * Get the registryPrivateEndpointConnections property: Private endpoint connections info used for pending - * connections in private link portal. - * - * @return the registryPrivateEndpointConnections value. - */ - public List registryPrivateEndpointConnections() { - return this.registryPrivateEndpointConnections; - } - - /** - * Set the registryPrivateEndpointConnections property: Private endpoint connections info used for pending - * connections in private link portal. - * - * @param registryPrivateEndpointConnections the registryPrivateEndpointConnections value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withRegistryPrivateEndpointConnections( - List registryPrivateEndpointConnections) { - this.registryPrivateEndpointConnections = registryPrivateEndpointConnections; - return this; - } - - /** - * Get the publicNetworkAccess property: Is the Registry accessible from the internet? - * Possible values: "Enabled" or "Disabled". - * - * @return the publicNetworkAccess value. - */ - public String publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Is the Registry accessible from the internet? - * Possible values: "Enabled" or "Disabled". - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withPublicNetworkAccess(String publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Get the regionDetails property: Details of each region the registry is in. - * - * @return the regionDetails value. - */ - public List regionDetails() { - return this.regionDetails; - } - - /** - * Set the regionDetails property: Details of each region the registry is in. - * - * @param regionDetails the regionDetails value to set. - * @return the RegistryProperties object itself. - */ - public RegistryProperties withRegionDetails(List regionDetails) { - this.regionDetails = regionDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (managedResourceGroup() != null) { - managedResourceGroup().validate(); - } - if (registryPrivateEndpointConnections() != null) { - registryPrivateEndpointConnections().forEach(e -> e.validate()); - } - if (regionDetails() != null) { - regionDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("discoveryUrl", this.discoveryUrl); - jsonWriter.writeStringField("intellectualPropertyPublisher", this.intellectualPropertyPublisher); - jsonWriter.writeJsonField("managedResourceGroup", this.managedResourceGroup); - jsonWriter.writeStringField("mlFlowRegistryUri", this.mlFlowRegistryUri); - jsonWriter.writeArrayField("registryPrivateEndpointConnections", this.registryPrivateEndpointConnections, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("publicNetworkAccess", this.publicNetworkAccess); - jsonWriter.writeArrayField("regionDetails", this.regionDetails, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryProperties. - */ - public static RegistryProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryProperties deserializedRegistryProperties = new RegistryProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("discoveryUrl".equals(fieldName)) { - deserializedRegistryProperties.discoveryUrl = reader.getString(); - } else if ("intellectualPropertyPublisher".equals(fieldName)) { - deserializedRegistryProperties.intellectualPropertyPublisher = reader.getString(); - } else if ("managedResourceGroup".equals(fieldName)) { - deserializedRegistryProperties.managedResourceGroup = ArmResourceId.fromJson(reader); - } else if ("mlFlowRegistryUri".equals(fieldName)) { - deserializedRegistryProperties.mlFlowRegistryUri = reader.getString(); - } else if ("registryPrivateEndpointConnections".equals(fieldName)) { - List registryPrivateEndpointConnections - = reader.readArray(reader1 -> RegistryPrivateEndpointConnection.fromJson(reader1)); - deserializedRegistryProperties.registryPrivateEndpointConnections - = registryPrivateEndpointConnections; - } else if ("publicNetworkAccess".equals(fieldName)) { - deserializedRegistryProperties.publicNetworkAccess = reader.getString(); - } else if ("regionDetails".equals(fieldName)) { - List regionDetails - = reader.readArray(reader1 -> RegistryRegionArmDetails.fromJson(reader1)); - deserializedRegistryProperties.regionDetails = regionDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ResourceQuotaInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ResourceQuotaInner.java deleted file mode 100644 index bfe2dbbb5075..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ResourceQuotaInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.QuotaUnit; -import com.azure.resourcemanager.machinelearning.models.ResourceName; -import java.io.IOException; - -/** - * The quota assigned to a resource. - */ -@Immutable -public final class ResourceQuotaInner implements JsonSerializable { - /* - * Specifies the resource ID. - */ - private String id; - - /* - * Region of the AML workspace in the id. - */ - private String amlWorkspaceLocation; - - /* - * Specifies the resource type. - */ - private String type; - - /* - * Name of the resource. - */ - private ResourceName name; - - /* - * The maximum permitted quota of the resource. - */ - private Long limit; - - /* - * An enum describing the unit of quota measurement. - */ - private QuotaUnit unit; - - /** - * Creates an instance of ResourceQuotaInner class. - */ - public ResourceQuotaInner() { - } - - /** - * Get the id property: Specifies the resource ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the amlWorkspaceLocation property: Region of the AML workspace in the id. - * - * @return the amlWorkspaceLocation value. - */ - public String amlWorkspaceLocation() { - return this.amlWorkspaceLocation; - } - - /** - * Get the type property: Specifies the resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the name property: Name of the resource. - * - * @return the name value. - */ - public ResourceName name() { - return this.name; - } - - /** - * Get the limit property: The maximum permitted quota of the resource. - * - * @return the limit value. - */ - public Long limit() { - return this.limit; - } - - /** - * Get the unit property: An enum describing the unit of quota measurement. - * - * @return the unit value. - */ - public QuotaUnit unit() { - return this.unit; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() != null) { - name().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResourceQuotaInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResourceQuotaInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ResourceQuotaInner. - */ - public static ResourceQuotaInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResourceQuotaInner deserializedResourceQuotaInner = new ResourceQuotaInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedResourceQuotaInner.id = reader.getString(); - } else if ("amlWorkspaceLocation".equals(fieldName)) { - deserializedResourceQuotaInner.amlWorkspaceLocation = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedResourceQuotaInner.type = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedResourceQuotaInner.name = ResourceName.fromJson(reader); - } else if ("limit".equals(fieldName)) { - deserializedResourceQuotaInner.limit = reader.getNullable(JsonReader::getLong); - } else if ("unit".equals(fieldName)) { - deserializedResourceQuotaInner.unit = QuotaUnit.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedResourceQuotaInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ScheduleInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ScheduleInner.java deleted file mode 100644 index 0073aa67f710..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ScheduleInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -import java.io.IOException; - -/** - * Azure Resource Manager resource envelope. - */ -@Fluent -public final class ScheduleInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - private ScheduleProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of ScheduleInner class. - */ - public ScheduleInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public ScheduleProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the ScheduleInner object itself. - */ - public ScheduleInner withProperties(ScheduleProperties 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property properties in model ScheduleInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ScheduleInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScheduleInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScheduleInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScheduleInner. - */ - public static ScheduleInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScheduleInner deserializedScheduleInner = new ScheduleInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedScheduleInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedScheduleInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedScheduleInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedScheduleInner.properties = ScheduleProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedScheduleInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScheduleInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ServerlessEndpointInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ServerlessEndpointInner.java deleted file mode 100644 index 9c5eba632085..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ServerlessEndpointInner.java +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.io.IOException; -import java.util.Map; - -/** - * The ServerlessEndpoint model. - */ -@Fluent -public final class ServerlessEndpointInner extends Resource { - /* - * [Required] Additional attributes of the entity. - */ - private ServerlessEndpointProperties properties; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - */ - private String kind; - - /* - * Managed service identity (system assigned and/or user assigned identities) - */ - private ManagedServiceIdentity identity; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of ServerlessEndpointInner class. - */ - public ServerlessEndpointInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public ServerlessEndpointProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the ServerlessEndpointInner object itself. - */ - public ServerlessEndpointInner withProperties(ServerlessEndpointProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @param kind the kind value to set. - * @return the ServerlessEndpointInner object itself. - */ - public ServerlessEndpointInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the ServerlessEndpointInner object itself. - */ - public ServerlessEndpointInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the ServerlessEndpointInner object itself. - */ - public ServerlessEndpointInner withSku(Sku sku) { - this.sku = sku; - 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public ServerlessEndpointInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServerlessEndpointInner 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model ServerlessEndpointInner")); - } else { - properties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ServerlessEndpointInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("kind", this.kind); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeJsonField("sku", this.sku); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServerlessEndpointInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServerlessEndpointInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ServerlessEndpointInner. - */ - public static ServerlessEndpointInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServerlessEndpointInner deserializedServerlessEndpointInner = new ServerlessEndpointInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedServerlessEndpointInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedServerlessEndpointInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedServerlessEndpointInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedServerlessEndpointInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedServerlessEndpointInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedServerlessEndpointInner.properties = ServerlessEndpointProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedServerlessEndpointInner.kind = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedServerlessEndpointInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("sku".equals(fieldName)) { - deserializedServerlessEndpointInner.sku = Sku.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedServerlessEndpointInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedServerlessEndpointInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SharedPrivateLinkResourceProperty.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SharedPrivateLinkResourceProperty.java deleted file mode 100644 index cb38303f4796..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SharedPrivateLinkResourceProperty.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import java.io.IOException; - -/** - * Properties of a shared private link resource. - */ -@Fluent -public final class SharedPrivateLinkResourceProperty implements JsonSerializable { - /* - * The resource id that private link links to. - */ - private String privateLinkResourceId; - - /* - * The private link resource group id. - */ - private String groupId; - - /* - * Request message. - */ - private String requestMessage; - - /* - * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. - */ - private PrivateEndpointServiceConnectionStatus status; - - /** - * Creates an instance of SharedPrivateLinkResourceProperty class. - */ - public SharedPrivateLinkResourceProperty() { - } - - /** - * Get the privateLinkResourceId property: The resource id that private link links to. - * - * @return the privateLinkResourceId value. - */ - public String privateLinkResourceId() { - return this.privateLinkResourceId; - } - - /** - * Set the privateLinkResourceId property: The resource id that private link links to. - * - * @param privateLinkResourceId the privateLinkResourceId value to set. - * @return the SharedPrivateLinkResourceProperty object itself. - */ - public SharedPrivateLinkResourceProperty withPrivateLinkResourceId(String privateLinkResourceId) { - this.privateLinkResourceId = privateLinkResourceId; - return this; - } - - /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - public String groupId() { - return this.groupId; - } - - /** - * Set the groupId property: The private link resource group id. - * - * @param groupId the groupId value to set. - * @return the SharedPrivateLinkResourceProperty object itself. - */ - public SharedPrivateLinkResourceProperty withGroupId(String groupId) { - this.groupId = groupId; - return this; - } - - /** - * Get the requestMessage property: Request message. - * - * @return the requestMessage value. - */ - public String requestMessage() { - return this.requestMessage; - } - - /** - * Set the requestMessage property: Request message. - * - * @param requestMessage the requestMessage value to set. - * @return the SharedPrivateLinkResourceProperty object itself. - */ - public SharedPrivateLinkResourceProperty withRequestMessage(String requestMessage) { - this.requestMessage = requestMessage; - return this; - } - - /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @return the status value. - */ - public PrivateEndpointServiceConnectionStatus status() { - return this.status; - } - - /** - * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @param status the status value to set. - * @return the SharedPrivateLinkResourceProperty object itself. - */ - public SharedPrivateLinkResourceProperty withStatus(PrivateEndpointServiceConnectionStatus status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("privateLinkResourceId", this.privateLinkResourceId); - jsonWriter.writeStringField("groupId", this.groupId); - jsonWriter.writeStringField("requestMessage", this.requestMessage); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SharedPrivateLinkResourceProperty from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SharedPrivateLinkResourceProperty if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SharedPrivateLinkResourceProperty. - */ - public static SharedPrivateLinkResourceProperty fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SharedPrivateLinkResourceProperty deserializedSharedPrivateLinkResourceProperty - = new SharedPrivateLinkResourceProperty(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("privateLinkResourceId".equals(fieldName)) { - deserializedSharedPrivateLinkResourceProperty.privateLinkResourceId = reader.getString(); - } else if ("groupId".equals(fieldName)) { - deserializedSharedPrivateLinkResourceProperty.groupId = reader.getString(); - } else if ("requestMessage".equals(fieldName)) { - deserializedSharedPrivateLinkResourceProperty.requestMessage = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedSharedPrivateLinkResourceProperty.status - = PrivateEndpointServiceConnectionStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSharedPrivateLinkResourceProperty; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java deleted file mode 100644 index e3de72408417..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.SkuCapacity; -import com.azure.resourcemanager.machinelearning.models.SkuSetting; -import java.io.IOException; - -/** - * Fulfills ARM Contract requirement to list all available SKUS for a resource. - */ -@Fluent -public final class SkuResourceInner implements JsonSerializable { - /* - * The resource type name. - */ - private String resourceType; - - /* - * Gets or sets the Sku. - */ - private SkuSetting sku; - - /* - * Gets or sets the Sku Capacity. - */ - private SkuCapacity capacity; - - /** - * Creates an instance of SkuResourceInner class. - */ - public SkuResourceInner() { - } - - /** - * Get the resourceType property: The resource type name. - * - * @return the resourceType value. - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Get the sku property: Gets or sets the Sku. - * - * @return the sku value. - */ - public SkuSetting sku() { - return this.sku; - } - - /** - * Set the sku property: Gets or sets the Sku. - * - * @param sku the sku value to set. - * @return the SkuResourceInner object itself. - */ - public SkuResourceInner withSku(SkuSetting sku) { - this.sku = sku; - return this; - } - - /** - * Get the capacity property: Gets or sets the Sku Capacity. - * - * @return the capacity value. - */ - public SkuCapacity capacity() { - return this.capacity; - } - - /** - * Set the capacity property: Gets or sets the Sku Capacity. - * - * @param capacity the capacity value to set. - * @return the SkuResourceInner object itself. - */ - public SkuResourceInner withCapacity(SkuCapacity capacity) { - this.capacity = capacity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() != null) { - sku().validate(); - } - if (capacity() != null) { - capacity().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("sku", this.sku); - jsonWriter.writeJsonField("capacity", this.capacity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SkuResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SkuResourceInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SkuResourceInner. - */ - public static SkuResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SkuResourceInner deserializedSkuResourceInner = new SkuResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceType".equals(fieldName)) { - deserializedSkuResourceInner.resourceType = reader.getString(); - } else if ("sku".equals(fieldName)) { - deserializedSkuResourceInner.sku = SkuSetting.fromJson(reader); - } else if ("capacity".equals(fieldName)) { - deserializedSkuResourceInner.capacity = SkuCapacity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSkuResourceInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UpdateWorkspaceQuotasResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UpdateWorkspaceQuotasResultInner.java deleted file mode 100644 index b2771b0c32ca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UpdateWorkspaceQuotasResultInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotas; -import java.io.IOException; -import java.util.List; - -/** - * The result of update workspace quota. - */ -@Immutable -public final class UpdateWorkspaceQuotasResultInner implements JsonSerializable { - /* - * The list of workspace quota update result. - */ - private List value; - - /* - * The URI to fetch the next page of workspace quota update result. Call ListNext() with this to fetch the next page - * of Workspace Quota update result. - */ - private String nextLink; - - /** - * Creates an instance of UpdateWorkspaceQuotasResultInner class. - */ - public UpdateWorkspaceQuotasResultInner() { - } - - /** - * Get the value property: The list of workspace quota update result. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI to fetch the next page of workspace quota update result. Call ListNext() with - * this to fetch the next page of Workspace Quota update result. - * - * @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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateWorkspaceQuotasResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateWorkspaceQuotasResultInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateWorkspaceQuotasResultInner. - */ - public static UpdateWorkspaceQuotasResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateWorkspaceQuotasResultInner deserializedUpdateWorkspaceQuotasResultInner - = new UpdateWorkspaceQuotasResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> UpdateWorkspaceQuotas.fromJson(reader1)); - deserializedUpdateWorkspaceQuotasResultInner.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedUpdateWorkspaceQuotasResultInner.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateWorkspaceQuotasResultInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.java deleted file mode 100644 index fe0db708401b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.UsageName; -import com.azure.resourcemanager.machinelearning.models.UsageUnit; -import java.io.IOException; - -/** - * Describes AML Resource Usage. - */ -@Immutable -public final class UsageInner implements JsonSerializable { - /* - * Specifies the resource ID. - */ - private String id; - - /* - * Region of the AML workspace in the id. - */ - private String amlWorkspaceLocation; - - /* - * Specifies the resource type. - */ - private String type; - - /* - * An enum describing the unit of usage measurement. - */ - private UsageUnit unit; - - /* - * The current usage of the resource. - */ - private Long currentValue; - - /* - * The maximum permitted usage of the resource. - */ - private Long limit; - - /* - * The name of the type of usage. - */ - private UsageName name; - - /** - * Creates an instance of UsageInner class. - */ - public UsageInner() { - } - - /** - * Get the id property: Specifies the resource ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the amlWorkspaceLocation property: Region of the AML workspace in the id. - * - * @return the amlWorkspaceLocation value. - */ - public String amlWorkspaceLocation() { - return this.amlWorkspaceLocation; - } - - /** - * Get the type property: Specifies the resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the unit property: An enum describing the unit of usage measurement. - * - * @return the unit value. - */ - public UsageUnit unit() { - return this.unit; - } - - /** - * Get the currentValue property: The current usage of the resource. - * - * @return the currentValue value. - */ - public Long currentValue() { - return this.currentValue; - } - - /** - * Get the limit property: The maximum permitted usage of the resource. - * - * @return the limit value. - */ - public Long limit() { - return this.limit; - } - - /** - * Get the name property: The name of the type of usage. - * - * @return the name value. - */ - public UsageName name() { - return this.name; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() != null) { - name().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UsageInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UsageInner if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the UsageInner. - */ - public static UsageInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UsageInner deserializedUsageInner = new UsageInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedUsageInner.id = reader.getString(); - } else if ("amlWorkspaceLocation".equals(fieldName)) { - deserializedUsageInner.amlWorkspaceLocation = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedUsageInner.type = reader.getString(); - } else if ("unit".equals(fieldName)) { - deserializedUsageInner.unit = UsageUnit.fromString(reader.getString()); - } else if ("currentValue".equals(fieldName)) { - deserializedUsageInner.currentValue = reader.getNullable(JsonReader::getLong); - } else if ("limit".equals(fieldName)) { - deserializedUsageInner.limit = reader.getNullable(JsonReader::getLong); - } else if ("name".equals(fieldName)) { - deserializedUsageInner.name = UsageName.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUsageInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.java deleted file mode 100644 index b6f1536ddcf8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSize; -import java.io.IOException; -import java.util.List; - -/** - * The List Virtual Machine size operation response. - */ -@Fluent -public final class VirtualMachineSizeListResultInner implements JsonSerializable { - /* - * The list of virtual machine sizes supported by AmlCompute. - */ - private List value; - - /** - * Creates an instance of VirtualMachineSizeListResultInner class. - */ - public VirtualMachineSizeListResultInner() { - } - - /** - * Get the value property: The list of virtual machine sizes supported by AmlCompute. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of virtual machine sizes supported by AmlCompute. - * - * @param value the value value to set. - * @return the VirtualMachineSizeListResultInner object itself. - */ - public VirtualMachineSizeListResultInner 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) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineSizeListResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineSizeListResultInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualMachineSizeListResultInner. - */ - public static VirtualMachineSizeListResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineSizeListResultInner deserializedVirtualMachineSizeListResultInner - = new VirtualMachineSizeListResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> VirtualMachineSize.fromJson(reader1)); - deserializedVirtualMachineSizeListResultInner.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineSizeListResultInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java deleted file mode 100644 index 372b93698a8c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; -import java.io.IOException; - -/** - * The WorkspaceConnectionPropertiesV2BasicResource model. - */ -@Fluent -public final class WorkspaceConnectionPropertiesV2BasicResourceInner extends ProxyResource { - /* - * The properties property. - */ - private WorkspaceConnectionPropertiesV2 properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of WorkspaceConnectionPropertiesV2BasicResourceInner class. - */ - public WorkspaceConnectionPropertiesV2BasicResourceInner() { - } - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public WorkspaceConnectionPropertiesV2 properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the WorkspaceConnectionPropertiesV2BasicResourceInner object itself. - */ - public WorkspaceConnectionPropertiesV2BasicResourceInner - withProperties(WorkspaceConnectionPropertiesV2 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model WorkspaceConnectionPropertiesV2BasicResourceInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER - = new ClientLogger(WorkspaceConnectionPropertiesV2BasicResourceInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceConnectionPropertiesV2BasicResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceConnectionPropertiesV2BasicResourceInner if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the WorkspaceConnectionPropertiesV2BasicResourceInner. - */ - public static WorkspaceConnectionPropertiesV2BasicResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceConnectionPropertiesV2BasicResourceInner deserializedWorkspaceConnectionPropertiesV2BasicResourceInner - = new WorkspaceConnectionPropertiesV2BasicResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2BasicResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2BasicResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2BasicResourceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2BasicResourceInner.properties - = WorkspaceConnectionPropertiesV2.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2BasicResourceInner.systemData - = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceConnectionPropertiesV2BasicResourceInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java deleted file mode 100644 index b335ff448efc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java +++ /dev/null @@ -1,942 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; -import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ProvisioningState; -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; -import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; -import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; -import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * An object that represents a machine learning workspace. - */ -@Fluent -public final class WorkspaceInner extends ProxyResource { - /* - * The properties of the machine learning workspace. - */ - private WorkspacePropertiesInner innerProperties; - - /* - * The identity of the resource. - */ - private ManagedServiceIdentity identity; - - /* - * The kind property. - */ - private String kind; - - /* - * Specifies the location of the resource. - */ - private String location; - - /* - * Contains resource tags defined as key/value pairs. - */ - private Map tags; - - /* - * The sku of the workspace. - */ - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of WorkspaceInner class. - */ - public WorkspaceInner() { - } - - /** - * Get the innerProperties property: The properties of the machine learning workspace. - * - * @return the innerProperties value. - */ - private WorkspacePropertiesInner innerProperties() { - return this.innerProperties; - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the kind property: The kind property. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: The kind property. - * - * @param kind the kind value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the location property: Specifies the location of the resource. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Specifies the location of the resource. - * - * @param location the location value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the tags property: Contains resource tags defined as key/value pairs. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Contains resource tags defined as key/value pairs. - * - * @param tags the tags value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the sku property: The sku of the workspace. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withSku(Sku sku) { - this.sku = sku; - 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the workspaceId property: The immutable id associated with this workspace. - * - * @return the workspaceId value. - */ - public String workspaceId() { - return this.innerProperties() == null ? null : this.innerProperties().workspaceId(); - } - - /** - * Get the description property: The description of this workspace. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The description of this workspace. - * - * @param description the description value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Set the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @param friendlyName the friendlyName value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withFriendlyName(String friendlyName) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withFriendlyName(friendlyName); - return this; - } - - /** - * Get the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. - * - * @return the keyVault value. - */ - public String keyVault() { - return this.innerProperties() == null ? null : this.innerProperties().keyVault(); - } - - /** - * Set the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. - * - * @param keyVault the keyVault value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withKeyVault(String keyVault) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withKeyVault(keyVault); - return this; - } - - /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @return the applicationInsights value. - */ - public String applicationInsights() { - return this.innerProperties() == null ? null : this.innerProperties().applicationInsights(); - } - - /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @param applicationInsights the applicationInsights value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withApplicationInsights(String applicationInsights) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withApplicationInsights(applicationInsights); - return this; - } - - /** - * Get the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @return the containerRegistry value. - */ - public String containerRegistry() { - return this.innerProperties() == null ? null : this.innerProperties().containerRegistry(); - } - - /** - * Set the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @param containerRegistry the containerRegistry value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withContainerRegistry(String containerRegistry) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withContainerRegistry(containerRegistry); - return this; - } - - /** - * Get the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @return the storageAccount value. - */ - public String storageAccount() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccount(); - } - - /** - * Set the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @param storageAccount the storageAccount value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withStorageAccount(String storageAccount) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withStorageAccount(storageAccount); - return this; - } - - /** - * Get the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning - * experimentation services. - * - * @return the discoveryUrl value. - */ - public String discoveryUrl() { - return this.innerProperties() == null ? null : this.innerProperties().discoveryUrl(); - } - - /** - * Set the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning - * experimentation services. - * - * @param discoveryUrl the discoveryUrl value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withDiscoveryUrl(String discoveryUrl) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withDiscoveryUrl(discoveryUrl); - return this; - } - - /** - * Get the provisioningState property: The current deployment state of workspace resource. The provisioningState is - * to indicate states for resource provisioning. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the encryption property: The encryption settings of Azure ML workspace. - * - * @return the encryption value. - */ - public EncryptionProperty encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); - } - - /** - * Set the encryption property: The encryption settings of Azure ML workspace. - * - * @param encryption the encryption value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withEncryption(EncryptionProperty encryption) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withEncryption(encryption); - return this; - } - - /** - * Get the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. - * - * @return the hbiWorkspace value. - */ - public Boolean hbiWorkspace() { - return this.innerProperties() == null ? null : this.innerProperties().hbiWorkspace(); - } - - /** - * Set the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. - * - * @param hbiWorkspace the hbiWorkspace value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withHbiWorkspace(Boolean hbiWorkspace) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withHbiWorkspace(hbiWorkspace); - return this; - } - - /** - * Get the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. - * - * @return the serviceProvisionedResourceGroup value. - */ - public String serviceProvisionedResourceGroup() { - return this.innerProperties() == null ? null : this.innerProperties().serviceProvisionedResourceGroup(); - } - - /** - * Get the privateLinkCount property: Count of private connections in the workspace. - * - * @return the privateLinkCount value. - */ - public Integer privateLinkCount() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkCount(); - } - - /** - * Get the imageBuildCompute property: The compute name for image build. - * - * @return the imageBuildCompute value. - */ - public String imageBuildCompute() { - return this.innerProperties() == null ? null : this.innerProperties().imageBuildCompute(); - } - - /** - * Set the imageBuildCompute property: The compute name for image build. - * - * @param imageBuildCompute the imageBuildCompute value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withImageBuildCompute(String imageBuildCompute) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withImageBuildCompute(imageBuildCompute); - return this; - } - - /** - * Get the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. - * - * @return the allowPublicAccessWhenBehindVnet value. - */ - public Boolean allowPublicAccessWhenBehindVnet() { - return this.innerProperties() == null ? null : this.innerProperties().allowPublicAccessWhenBehindVnet(); - } - - /** - * Set the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. - * - * @param allowPublicAccessWhenBehindVnet the allowPublicAccessWhenBehindVnet value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withAllowPublicAccessWhenBehindVnet(allowPublicAccessWhenBehindVnet); - return this; - } - - /** - * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); - } - - /** - * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); - return this; - } - - /** - * Get the privateEndpointConnections property: The list of private endpoint connections in the workspace. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); - } - - /** - * Get the serverlessComputeSettings property: Settings for serverless compute created in the workspace. - * - * @return the serverlessComputeSettings value. - */ - public ServerlessComputeSettings serverlessComputeSettings() { - return this.innerProperties() == null ? null : this.innerProperties().serverlessComputeSettings(); - } - - /** - * Set the serverlessComputeSettings property: Settings for serverless compute created in the workspace. - * - * @param serverlessComputeSettings the serverlessComputeSettings value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withServerlessComputeSettings(serverlessComputeSettings); - return this; - } - - /** - * Get the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. - * - * @return the sharedPrivateLinkResources value. - */ - public List sharedPrivateLinkResources() { - return this.innerProperties() == null ? null : this.innerProperties().sharedPrivateLinkResources(); - } - - /** - * Set the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. - * - * @param sharedPrivateLinkResources the sharedPrivateLinkResources value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withSharedPrivateLinkResources(List sharedPrivateLinkResources) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withSharedPrivateLinkResources(sharedPrivateLinkResources); - return this; - } - - /** - * Get the notebookInfo property: The notebook info of Azure ML workspace. - * - * @return the notebookInfo value. - */ - public NotebookResourceInfoInner notebookInfo() { - return this.innerProperties() == null ? null : this.innerProperties().notebookInfo(); - } - - /** - * Get the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @return the serviceManagedResourcesSettings value. - */ - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.innerProperties() == null ? null : this.innerProperties().serviceManagedResourcesSettings(); - } - - /** - * Set the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); - return this; - } - - /** - * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @return the primaryUserAssignedIdentity value. - */ - public String primaryUserAssignedIdentity() { - return this.innerProperties() == null ? null : this.innerProperties().primaryUserAssignedIdentity(); - } - - /** - * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); - return this; - } - - /** - * Get the tenantId property: The tenant id associated with this workspace. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Get the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) - * enabled. - * - * @return the storageHnsEnabled value. - */ - public Boolean storageHnsEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().storageHnsEnabled(); - } - - /** - * Get the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point - * at to set up tracking. - * - * @return the mlFlowTrackingUri value. - */ - public String mlFlowTrackingUri() { - return this.innerProperties() == null ? null : this.innerProperties().mlFlowTrackingUri(); - } - - /** - * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @return the v1LegacyMode value. - */ - public Boolean v1LegacyMode() { - return this.innerProperties() == null ? null : this.innerProperties().v1LegacyMode(); - } - - /** - * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @param v1LegacyMode the v1LegacyMode value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withV1LegacyMode(Boolean v1LegacyMode) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withV1LegacyMode(v1LegacyMode); - return this; - } - - /** - * Get the managedNetwork property: Managed Network settings for a machine learning workspace. - * - * @return the managedNetwork value. - */ - public ManagedNetworkSettingsInner managedNetwork() { - return this.innerProperties() == null ? null : this.innerProperties().managedNetwork(); - } - - /** - * Set the managedNetwork property: Managed Network settings for a machine learning workspace. - * - * @param managedNetwork the managedNetwork value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withManagedNetwork(managedNetwork); - return this; - } - - /** - * Get the featureStoreSettings property: Settings for feature store type workspace. - * - * @return the featureStoreSettings value. - */ - public FeatureStoreSettings featureStoreSettings() { - return this.innerProperties() == null ? null : this.innerProperties().featureStoreSettings(); - } - - /** - * Set the featureStoreSettings property: Settings for feature store type workspace. - * - * @param featureStoreSettings the featureStoreSettings value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withFeatureStoreSettings(featureStoreSettings); - return this; - } - - /** - * Get the associatedWorkspaces property: The associatedWorkspaces property. - * - * @return the associatedWorkspaces value. - */ - public List associatedWorkspaces() { - return this.innerProperties() == null ? null : this.innerProperties().associatedWorkspaces(); - } - - /** - * Set the associatedWorkspaces property: The associatedWorkspaces property. - * - * @param associatedWorkspaces the associatedWorkspaces value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withAssociatedWorkspaces(List associatedWorkspaces) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withAssociatedWorkspaces(associatedWorkspaces); - return this; - } - - /** - * Get the enableDataIsolation property: The enableDataIsolation property. - * - * @return the enableDataIsolation value. - */ - public Boolean enableDataIsolation() { - return this.innerProperties() == null ? null : this.innerProperties().enableDataIsolation(); - } - - /** - * Set the enableDataIsolation property: The enableDataIsolation property. - * - * @param enableDataIsolation the enableDataIsolation value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withEnableDataIsolation(Boolean enableDataIsolation) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withEnableDataIsolation(enableDataIsolation); - return this; - } - - /** - * Get the hubResourceId property: The hubResourceId property. - * - * @return the hubResourceId value. - */ - public String hubResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().hubResourceId(); - } - - /** - * Set the hubResourceId property: The hubResourceId property. - * - * @param hubResourceId the hubResourceId value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withHubResourceId(String hubResourceId) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withHubResourceId(hubResourceId); - return this; - } - - /** - * Get the workspaceHubConfig property: WorkspaceHub's configuration object. - * - * @return the workspaceHubConfig value. - */ - public WorkspaceHubConfig workspaceHubConfig() { - return this.innerProperties() == null ? null : this.innerProperties().workspaceHubConfig(); - } - - /** - * Set the workspaceHubConfig property: WorkspaceHub's configuration object. - * - * @param workspaceHubConfig the workspaceHubConfig value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withWorkspaceHubConfig(WorkspaceHubConfig workspaceHubConfig) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withWorkspaceHubConfig(workspaceHubConfig); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeStringField("kind", this.kind); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("sku", this.sku); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the WorkspaceInner. - */ - public static WorkspaceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceInner deserializedWorkspaceInner = new WorkspaceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedWorkspaceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedWorkspaceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedWorkspaceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedWorkspaceInner.innerProperties = WorkspacePropertiesInner.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedWorkspaceInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedWorkspaceInner.kind = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedWorkspaceInner.location = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedWorkspaceInner.tags = tags; - } else if ("sku".equals(fieldName)) { - deserializedWorkspaceInner.sku = Sku.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedWorkspaceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesInner.java deleted file mode 100644 index 76f9377dcb92..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesInner.java +++ /dev/null @@ -1,927 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; -import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; -import com.azure.resourcemanager.machinelearning.models.ProvisioningState; -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; -import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; -import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; -import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig; -import java.io.IOException; -import java.util.List; - -/** - * The properties of a machine learning workspace. - */ -@Fluent -public final class WorkspacePropertiesInner implements JsonSerializable { - /* - * The immutable id associated with this workspace. - */ - private String workspaceId; - - /* - * The description of this workspace. - */ - private String description; - - /* - * The friendly name for this workspace. This name in mutable - */ - private String friendlyName; - - /* - * ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been - * created - */ - private String keyVault; - - /* - * ARM id of the application insights associated with this workspace. - */ - private String applicationInsights; - - /* - * ARM id of the container registry associated with this workspace. - */ - private String containerRegistry; - - /* - * ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been - * created - */ - private String storageAccount; - - /* - * Url for the discovery service to identify regional endpoints for machine learning experimentation services - */ - private String discoveryUrl; - - /* - * The current deployment state of workspace resource. The provisioningState is to indicate states for resource - * provisioning. - */ - private ProvisioningState provisioningState; - - /* - * The encryption settings of Azure ML workspace. - */ - private EncryptionProperty encryption; - - /* - * The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service - */ - private Boolean hbiWorkspace; - - /* - * The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK - * workspace - */ - private String serviceProvisionedResourceGroup; - - /* - * Count of private connections in the workspace - */ - private Integer privateLinkCount; - - /* - * The compute name for image build - */ - private String imageBuildCompute; - - /* - * The flag to indicate whether to allow public access when behind VNet. - */ - private Boolean allowPublicAccessWhenBehindVnet; - - /* - * Whether requests from Public Network are allowed. - */ - private PublicNetworkAccess publicNetworkAccess; - - /* - * The list of private endpoint connections in the workspace. - */ - private List privateEndpointConnections; - - /* - * Settings for serverless compute created in the workspace - */ - private ServerlessComputeSettings serverlessComputeSettings; - - /* - * The list of shared private link resources in this workspace. - */ - private List sharedPrivateLinkResources; - - /* - * The notebook info of Azure ML workspace. - */ - private NotebookResourceInfoInner notebookInfo; - - /* - * The service managed resource settings. - */ - private ServiceManagedResourcesSettings serviceManagedResourcesSettings; - - /* - * The user assigned identity resource id that represents the workspace identity. - */ - private String primaryUserAssignedIdentity; - - /* - * The tenant id associated with this workspace. - */ - private String tenantId; - - /* - * If the storage associated with the workspace has hierarchical namespace(HNS) enabled. - */ - private Boolean storageHnsEnabled; - - /* - * The URI associated with this workspace that machine learning flow must point at to set up tracking. - */ - private String mlFlowTrackingUri; - - /* - * Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. - */ - private Boolean v1LegacyMode; - - /* - * Managed Network settings for a machine learning workspace. - */ - private ManagedNetworkSettingsInner managedNetwork; - - /* - * Settings for feature store type workspace. - */ - private FeatureStoreSettings featureStoreSettings; - - /* - * The associatedWorkspaces property. - */ - private List associatedWorkspaces; - - /* - * The enableDataIsolation property. - */ - private Boolean enableDataIsolation; - - /* - * The hubResourceId property. - */ - private String hubResourceId; - - /* - * WorkspaceHub's configuration object. - */ - private WorkspaceHubConfig workspaceHubConfig; - - /** - * Creates an instance of WorkspacePropertiesInner class. - */ - public WorkspacePropertiesInner() { - } - - /** - * Get the workspaceId property: The immutable id associated with this workspace. - * - * @return the workspaceId value. - */ - public String workspaceId() { - return this.workspaceId; - } - - /** - * Get the description property: The description of this workspace. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of this workspace. - * - * @param description the description value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @param friendlyName the friendlyName value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withFriendlyName(String friendlyName) { - this.friendlyName = friendlyName; - return this; - } - - /** - * Get the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. - * - * @return the keyVault value. - */ - public String keyVault() { - return this.keyVault; - } - - /** - * Set the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. - * - * @param keyVault the keyVault value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withKeyVault(String keyVault) { - this.keyVault = keyVault; - return this; - } - - /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @return the applicationInsights value. - */ - public String applicationInsights() { - return this.applicationInsights; - } - - /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @param applicationInsights the applicationInsights value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withApplicationInsights(String applicationInsights) { - this.applicationInsights = applicationInsights; - return this; - } - - /** - * Get the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @return the containerRegistry value. - */ - public String containerRegistry() { - return this.containerRegistry; - } - - /** - * Set the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @param containerRegistry the containerRegistry value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withContainerRegistry(String containerRegistry) { - this.containerRegistry = containerRegistry; - return this; - } - - /** - * Get the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @return the storageAccount value. - */ - public String storageAccount() { - return this.storageAccount; - } - - /** - * Set the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @param storageAccount the storageAccount value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withStorageAccount(String storageAccount) { - this.storageAccount = storageAccount; - return this; - } - - /** - * Get the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning - * experimentation services. - * - * @return the discoveryUrl value. - */ - public String discoveryUrl() { - return this.discoveryUrl; - } - - /** - * Set the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning - * experimentation services. - * - * @param discoveryUrl the discoveryUrl value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withDiscoveryUrl(String discoveryUrl) { - this.discoveryUrl = discoveryUrl; - return this; - } - - /** - * Get the provisioningState property: The current deployment state of workspace resource. The provisioningState is - * to indicate states for resource provisioning. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the encryption property: The encryption settings of Azure ML workspace. - * - * @return the encryption value. - */ - public EncryptionProperty encryption() { - return this.encryption; - } - - /** - * Set the encryption property: The encryption settings of Azure ML workspace. - * - * @param encryption the encryption value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withEncryption(EncryptionProperty encryption) { - this.encryption = encryption; - return this; - } - - /** - * Get the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. - * - * @return the hbiWorkspace value. - */ - public Boolean hbiWorkspace() { - return this.hbiWorkspace; - } - - /** - * Set the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. - * - * @param hbiWorkspace the hbiWorkspace value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withHbiWorkspace(Boolean hbiWorkspace) { - this.hbiWorkspace = hbiWorkspace; - return this; - } - - /** - * Get the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. - * - * @return the serviceProvisionedResourceGroup value. - */ - public String serviceProvisionedResourceGroup() { - return this.serviceProvisionedResourceGroup; - } - - /** - * Get the privateLinkCount property: Count of private connections in the workspace. - * - * @return the privateLinkCount value. - */ - public Integer privateLinkCount() { - return this.privateLinkCount; - } - - /** - * Get the imageBuildCompute property: The compute name for image build. - * - * @return the imageBuildCompute value. - */ - public String imageBuildCompute() { - return this.imageBuildCompute; - } - - /** - * Set the imageBuildCompute property: The compute name for image build. - * - * @param imageBuildCompute the imageBuildCompute value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withImageBuildCompute(String imageBuildCompute) { - this.imageBuildCompute = imageBuildCompute; - return this; - } - - /** - * Get the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. - * - * @return the allowPublicAccessWhenBehindVnet value. - */ - public Boolean allowPublicAccessWhenBehindVnet() { - return this.allowPublicAccessWhenBehindVnet; - } - - /** - * Set the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. - * - * @param allowPublicAccessWhenBehindVnet the allowPublicAccessWhenBehindVnet value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { - this.allowPublicAccessWhenBehindVnet = allowPublicAccessWhenBehindVnet; - return this; - } - - /** - * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Get the privateEndpointConnections property: The list of private endpoint connections in the workspace. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** - * Get the serverlessComputeSettings property: Settings for serverless compute created in the workspace. - * - * @return the serverlessComputeSettings value. - */ - public ServerlessComputeSettings serverlessComputeSettings() { - return this.serverlessComputeSettings; - } - - /** - * Set the serverlessComputeSettings property: Settings for serverless compute created in the workspace. - * - * @param serverlessComputeSettings the serverlessComputeSettings value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { - this.serverlessComputeSettings = serverlessComputeSettings; - return this; - } - - /** - * Get the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. - * - * @return the sharedPrivateLinkResources value. - */ - public List sharedPrivateLinkResources() { - return this.sharedPrivateLinkResources; - } - - /** - * Set the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. - * - * @param sharedPrivateLinkResources the sharedPrivateLinkResources value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner - withSharedPrivateLinkResources(List sharedPrivateLinkResources) { - this.sharedPrivateLinkResources = sharedPrivateLinkResources; - return this; - } - - /** - * Get the notebookInfo property: The notebook info of Azure ML workspace. - * - * @return the notebookInfo value. - */ - public NotebookResourceInfoInner notebookInfo() { - return this.notebookInfo; - } - - /** - * Get the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @return the serviceManagedResourcesSettings value. - */ - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.serviceManagedResourcesSettings; - } - - /** - * Set the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { - this.serviceManagedResourcesSettings = serviceManagedResourcesSettings; - return this; - } - - /** - * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @return the primaryUserAssignedIdentity value. - */ - public String primaryUserAssignedIdentity() { - return this.primaryUserAssignedIdentity; - } - - /** - * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; - return this; - } - - /** - * Get the tenantId property: The tenant id associated with this workspace. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) - * enabled. - * - * @return the storageHnsEnabled value. - */ - public Boolean storageHnsEnabled() { - return this.storageHnsEnabled; - } - - /** - * Get the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point - * at to set up tracking. - * - * @return the mlFlowTrackingUri value. - */ - public String mlFlowTrackingUri() { - return this.mlFlowTrackingUri; - } - - /** - * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @return the v1LegacyMode value. - */ - public Boolean v1LegacyMode() { - return this.v1LegacyMode; - } - - /** - * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @param v1LegacyMode the v1LegacyMode value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withV1LegacyMode(Boolean v1LegacyMode) { - this.v1LegacyMode = v1LegacyMode; - return this; - } - - /** - * Get the managedNetwork property: Managed Network settings for a machine learning workspace. - * - * @return the managedNetwork value. - */ - public ManagedNetworkSettingsInner managedNetwork() { - return this.managedNetwork; - } - - /** - * Set the managedNetwork property: Managed Network settings for a machine learning workspace. - * - * @param managedNetwork the managedNetwork value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { - this.managedNetwork = managedNetwork; - return this; - } - - /** - * Get the featureStoreSettings property: Settings for feature store type workspace. - * - * @return the featureStoreSettings value. - */ - public FeatureStoreSettings featureStoreSettings() { - return this.featureStoreSettings; - } - - /** - * Set the featureStoreSettings property: Settings for feature store type workspace. - * - * @param featureStoreSettings the featureStoreSettings value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { - this.featureStoreSettings = featureStoreSettings; - return this; - } - - /** - * Get the associatedWorkspaces property: The associatedWorkspaces property. - * - * @return the associatedWorkspaces value. - */ - public List associatedWorkspaces() { - return this.associatedWorkspaces; - } - - /** - * Set the associatedWorkspaces property: The associatedWorkspaces property. - * - * @param associatedWorkspaces the associatedWorkspaces value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withAssociatedWorkspaces(List associatedWorkspaces) { - this.associatedWorkspaces = associatedWorkspaces; - return this; - } - - /** - * Get the enableDataIsolation property: The enableDataIsolation property. - * - * @return the enableDataIsolation value. - */ - public Boolean enableDataIsolation() { - return this.enableDataIsolation; - } - - /** - * Set the enableDataIsolation property: The enableDataIsolation property. - * - * @param enableDataIsolation the enableDataIsolation value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withEnableDataIsolation(Boolean enableDataIsolation) { - this.enableDataIsolation = enableDataIsolation; - return this; - } - - /** - * Get the hubResourceId property: The hubResourceId property. - * - * @return the hubResourceId value. - */ - public String hubResourceId() { - return this.hubResourceId; - } - - /** - * Set the hubResourceId property: The hubResourceId property. - * - * @param hubResourceId the hubResourceId value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withHubResourceId(String hubResourceId) { - this.hubResourceId = hubResourceId; - return this; - } - - /** - * Get the workspaceHubConfig property: WorkspaceHub's configuration object. - * - * @return the workspaceHubConfig value. - */ - public WorkspaceHubConfig workspaceHubConfig() { - return this.workspaceHubConfig; - } - - /** - * Set the workspaceHubConfig property: WorkspaceHub's configuration object. - * - * @param workspaceHubConfig the workspaceHubConfig value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withWorkspaceHubConfig(WorkspaceHubConfig workspaceHubConfig) { - this.workspaceHubConfig = workspaceHubConfig; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (encryption() != null) { - encryption().validate(); - } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - if (serverlessComputeSettings() != null) { - serverlessComputeSettings().validate(); - } - if (sharedPrivateLinkResources() != null) { - sharedPrivateLinkResources().forEach(e -> e.validate()); - } - if (notebookInfo() != null) { - notebookInfo().validate(); - } - if (serviceManagedResourcesSettings() != null) { - serviceManagedResourcesSettings().validate(); - } - if (managedNetwork() != null) { - managedNetwork().validate(); - } - if (featureStoreSettings() != null) { - featureStoreSettings().validate(); - } - if (workspaceHubConfig() != null) { - workspaceHubConfig().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("keyVault", this.keyVault); - jsonWriter.writeStringField("applicationInsights", this.applicationInsights); - jsonWriter.writeStringField("containerRegistry", this.containerRegistry); - jsonWriter.writeStringField("storageAccount", this.storageAccount); - jsonWriter.writeStringField("discoveryUrl", this.discoveryUrl); - jsonWriter.writeJsonField("encryption", this.encryption); - jsonWriter.writeBooleanField("hbiWorkspace", this.hbiWorkspace); - jsonWriter.writeStringField("imageBuildCompute", this.imageBuildCompute); - jsonWriter.writeBooleanField("allowPublicAccessWhenBehindVnet", this.allowPublicAccessWhenBehindVnet); - jsonWriter.writeStringField("publicNetworkAccess", - this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); - jsonWriter.writeJsonField("serverlessComputeSettings", this.serverlessComputeSettings); - jsonWriter.writeArrayField("sharedPrivateLinkResources", this.sharedPrivateLinkResources, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("serviceManagedResourcesSettings", this.serviceManagedResourcesSettings); - jsonWriter.writeStringField("primaryUserAssignedIdentity", this.primaryUserAssignedIdentity); - jsonWriter.writeBooleanField("v1LegacyMode", this.v1LegacyMode); - jsonWriter.writeJsonField("managedNetwork", this.managedNetwork); - jsonWriter.writeJsonField("featureStoreSettings", this.featureStoreSettings); - jsonWriter.writeArrayField("associatedWorkspaces", this.associatedWorkspaces, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("enableDataIsolation", this.enableDataIsolation); - jsonWriter.writeStringField("hubResourceId", this.hubResourceId); - jsonWriter.writeJsonField("workspaceHubConfig", this.workspaceHubConfig); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspacePropertiesInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspacePropertiesInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkspacePropertiesInner. - */ - public static WorkspacePropertiesInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspacePropertiesInner deserializedWorkspacePropertiesInner = new WorkspacePropertiesInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("workspaceId".equals(fieldName)) { - deserializedWorkspacePropertiesInner.workspaceId = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedWorkspacePropertiesInner.description = reader.getString(); - } else if ("friendlyName".equals(fieldName)) { - deserializedWorkspacePropertiesInner.friendlyName = reader.getString(); - } else if ("keyVault".equals(fieldName)) { - deserializedWorkspacePropertiesInner.keyVault = reader.getString(); - } else if ("applicationInsights".equals(fieldName)) { - deserializedWorkspacePropertiesInner.applicationInsights = reader.getString(); - } else if ("containerRegistry".equals(fieldName)) { - deserializedWorkspacePropertiesInner.containerRegistry = reader.getString(); - } else if ("storageAccount".equals(fieldName)) { - deserializedWorkspacePropertiesInner.storageAccount = reader.getString(); - } else if ("discoveryUrl".equals(fieldName)) { - deserializedWorkspacePropertiesInner.discoveryUrl = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedWorkspacePropertiesInner.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("encryption".equals(fieldName)) { - deserializedWorkspacePropertiesInner.encryption = EncryptionProperty.fromJson(reader); - } else if ("hbiWorkspace".equals(fieldName)) { - deserializedWorkspacePropertiesInner.hbiWorkspace = reader.getNullable(JsonReader::getBoolean); - } else if ("serviceProvisionedResourceGroup".equals(fieldName)) { - deserializedWorkspacePropertiesInner.serviceProvisionedResourceGroup = reader.getString(); - } else if ("privateLinkCount".equals(fieldName)) { - deserializedWorkspacePropertiesInner.privateLinkCount = reader.getNullable(JsonReader::getInt); - } else if ("imageBuildCompute".equals(fieldName)) { - deserializedWorkspacePropertiesInner.imageBuildCompute = reader.getString(); - } else if ("allowPublicAccessWhenBehindVnet".equals(fieldName)) { - deserializedWorkspacePropertiesInner.allowPublicAccessWhenBehindVnet - = reader.getNullable(JsonReader::getBoolean); - } else if ("publicNetworkAccess".equals(fieldName)) { - deserializedWorkspacePropertiesInner.publicNetworkAccess - = PublicNetworkAccess.fromString(reader.getString()); - } else if ("privateEndpointConnections".equals(fieldName)) { - List privateEndpointConnections - = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); - deserializedWorkspacePropertiesInner.privateEndpointConnections = privateEndpointConnections; - } else if ("serverlessComputeSettings".equals(fieldName)) { - deserializedWorkspacePropertiesInner.serverlessComputeSettings - = ServerlessComputeSettings.fromJson(reader); - } else if ("sharedPrivateLinkResources".equals(fieldName)) { - List sharedPrivateLinkResources - = reader.readArray(reader1 -> SharedPrivateLinkResource.fromJson(reader1)); - deserializedWorkspacePropertiesInner.sharedPrivateLinkResources = sharedPrivateLinkResources; - } else if ("notebookInfo".equals(fieldName)) { - deserializedWorkspacePropertiesInner.notebookInfo = NotebookResourceInfoInner.fromJson(reader); - } else if ("serviceManagedResourcesSettings".equals(fieldName)) { - deserializedWorkspacePropertiesInner.serviceManagedResourcesSettings - = ServiceManagedResourcesSettings.fromJson(reader); - } else if ("primaryUserAssignedIdentity".equals(fieldName)) { - deserializedWorkspacePropertiesInner.primaryUserAssignedIdentity = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedWorkspacePropertiesInner.tenantId = reader.getString(); - } else if ("storageHnsEnabled".equals(fieldName)) { - deserializedWorkspacePropertiesInner.storageHnsEnabled = reader.getNullable(JsonReader::getBoolean); - } else if ("mlFlowTrackingUri".equals(fieldName)) { - deserializedWorkspacePropertiesInner.mlFlowTrackingUri = reader.getString(); - } else if ("v1LegacyMode".equals(fieldName)) { - deserializedWorkspacePropertiesInner.v1LegacyMode = reader.getNullable(JsonReader::getBoolean); - } else if ("managedNetwork".equals(fieldName)) { - deserializedWorkspacePropertiesInner.managedNetwork = ManagedNetworkSettingsInner.fromJson(reader); - } else if ("featureStoreSettings".equals(fieldName)) { - deserializedWorkspacePropertiesInner.featureStoreSettings = FeatureStoreSettings.fromJson(reader); - } else if ("associatedWorkspaces".equals(fieldName)) { - List associatedWorkspaces = reader.readArray(reader1 -> reader1.getString()); - deserializedWorkspacePropertiesInner.associatedWorkspaces = associatedWorkspaces; - } else if ("enableDataIsolation".equals(fieldName)) { - deserializedWorkspacePropertiesInner.enableDataIsolation - = reader.getNullable(JsonReader::getBoolean); - } else if ("hubResourceId".equals(fieldName)) { - deserializedWorkspacePropertiesInner.hubResourceId = reader.getString(); - } else if ("workspaceHubConfig".equals(fieldName)) { - deserializedWorkspacePropertiesInner.workspaceHubConfig = WorkspaceHubConfig.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspacePropertiesInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParametersInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParametersInner.java deleted file mode 100644 index b032dc624ca5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParametersInner.java +++ /dev/null @@ -1,497 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.EncryptionUpdateProperties; -import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; -import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; -import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; -import java.io.IOException; - -/** - * The parameters for updating the properties of a machine learning workspace. - */ -@Fluent -public final class WorkspacePropertiesUpdateParametersInner - implements JsonSerializable { - /* - * The description of this workspace. - */ - private String description; - - /* - * The friendly name for this workspace. - */ - private String friendlyName; - - /* - * The compute name for image build - */ - private String imageBuildCompute; - - /* - * The service managed resource settings. - */ - private ServiceManagedResourcesSettings serviceManagedResourcesSettings; - - /* - * The user assigned identity resource id that represents the workspace identity. - */ - private String primaryUserAssignedIdentity; - - /* - * Settings for serverless compute created in the workspace - */ - private ServerlessComputeSettings serverlessComputeSettings; - - /* - * Whether requests from Public Network are allowed. - */ - private PublicNetworkAccess publicNetworkAccess; - - /* - * ARM id of the application insights associated with this workspace. - */ - private String applicationInsights; - - /* - * ARM id of the container registry associated with this workspace. - */ - private String containerRegistry; - - /* - * Settings for feature store type workspace. - */ - private FeatureStoreSettings featureStoreSettings; - - /* - * Managed Network settings for a machine learning workspace. - */ - private ManagedNetworkSettingsInner managedNetwork; - - /* - * The enableDataIsolation property. - */ - private Boolean enableDataIsolation; - - /* - * Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. - */ - private Boolean v1LegacyMode; - - /* - * The encryption property. - */ - private EncryptionUpdateProperties encryption; - - /** - * Creates an instance of WorkspacePropertiesUpdateParametersInner class. - */ - public WorkspacePropertiesUpdateParametersInner() { - } - - /** - * Get the description property: The description of this workspace. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of this workspace. - * - * @param description the description value to set. - * @return the WorkspacePropertiesUpdateParametersInner object itself. - */ - public WorkspacePropertiesUpdateParametersInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the friendlyName property: The friendly name for this workspace. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: The friendly name for this workspace. - * - * @param friendlyName the friendlyName value to set. - * @return the WorkspacePropertiesUpdateParametersInner object itself. - */ - public WorkspacePropertiesUpdateParametersInner withFriendlyName(String friendlyName) { - this.friendlyName = friendlyName; - return this; - } - - /** - * Get the imageBuildCompute property: The compute name for image build. - * - * @return the imageBuildCompute value. - */ - public String imageBuildCompute() { - return this.imageBuildCompute; - } - - /** - * Set the imageBuildCompute property: The compute name for image build. - * - * @param imageBuildCompute the imageBuildCompute value to set. - * @return the WorkspacePropertiesUpdateParametersInner object itself. - */ - public WorkspacePropertiesUpdateParametersInner withImageBuildCompute(String imageBuildCompute) { - this.imageBuildCompute = imageBuildCompute; - return this; - } - - /** - * Get the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @return the serviceManagedResourcesSettings value. - */ - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.serviceManagedResourcesSettings; - } - - /** - * Set the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. - * @return the WorkspacePropertiesUpdateParametersInner object itself. - */ - public WorkspacePropertiesUpdateParametersInner - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { - this.serviceManagedResourcesSettings = serviceManagedResourcesSettings; - return this; - } - - /** - * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @return the primaryUserAssignedIdentity value. - */ - public String primaryUserAssignedIdentity() { - return this.primaryUserAssignedIdentity; - } - - /** - * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. - * @return the WorkspacePropertiesUpdateParametersInner object itself. - */ - public WorkspacePropertiesUpdateParametersInner - withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; - return this; - } - - /** - * Get the serverlessComputeSettings property: Settings for serverless compute created in the workspace. - * - * @return the serverlessComputeSettings value. - */ - public ServerlessComputeSettings serverlessComputeSettings() { - return this.serverlessComputeSettings; - } - - /** - * Set the serverlessComputeSettings property: Settings for serverless compute created in the workspace. - * - * @param serverlessComputeSettings the serverlessComputeSettings value to set. - * @return the WorkspacePropertiesUpdateParametersInner object itself. - */ - public WorkspacePropertiesUpdateParametersInner - withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { - this.serverlessComputeSettings = serverlessComputeSettings; - return this; - } - - /** - * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the WorkspacePropertiesUpdateParametersInner object itself. - */ - public WorkspacePropertiesUpdateParametersInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @return the applicationInsights value. - */ - public String applicationInsights() { - return this.applicationInsights; - } - - /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @param applicationInsights the applicationInsights value to set. - * @return the WorkspacePropertiesUpdateParametersInner object itself. - */ - public WorkspacePropertiesUpdateParametersInner withApplicationInsights(String applicationInsights) { - this.applicationInsights = applicationInsights; - return this; - } - - /** - * Get the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @return the containerRegistry value. - */ - public String containerRegistry() { - return this.containerRegistry; - } - - /** - * Set the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @param containerRegistry the containerRegistry value to set. - * @return the WorkspacePropertiesUpdateParametersInner object itself. - */ - public WorkspacePropertiesUpdateParametersInner withContainerRegistry(String containerRegistry) { - this.containerRegistry = containerRegistry; - return this; - } - - /** - * Get the featureStoreSettings property: Settings for feature store type workspace. - * - * @return the featureStoreSettings value. - */ - public FeatureStoreSettings featureStoreSettings() { - return this.featureStoreSettings; - } - - /** - * Set the featureStoreSettings property: Settings for feature store type workspace. - * - * @param featureStoreSettings the featureStoreSettings value to set. - * @return the WorkspacePropertiesUpdateParametersInner object itself. - */ - public WorkspacePropertiesUpdateParametersInner - withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { - this.featureStoreSettings = featureStoreSettings; - return this; - } - - /** - * Get the managedNetwork property: Managed Network settings for a machine learning workspace. - * - * @return the managedNetwork value. - */ - public ManagedNetworkSettingsInner managedNetwork() { - return this.managedNetwork; - } - - /** - * Set the managedNetwork property: Managed Network settings for a machine learning workspace. - * - * @param managedNetwork the managedNetwork value to set. - * @return the WorkspacePropertiesUpdateParametersInner object itself. - */ - public WorkspacePropertiesUpdateParametersInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { - this.managedNetwork = managedNetwork; - return this; - } - - /** - * Get the enableDataIsolation property: The enableDataIsolation property. - * - * @return the enableDataIsolation value. - */ - public Boolean enableDataIsolation() { - return this.enableDataIsolation; - } - - /** - * Set the enableDataIsolation property: The enableDataIsolation property. - * - * @param enableDataIsolation the enableDataIsolation value to set. - * @return the WorkspacePropertiesUpdateParametersInner object itself. - */ - public WorkspacePropertiesUpdateParametersInner withEnableDataIsolation(Boolean enableDataIsolation) { - this.enableDataIsolation = enableDataIsolation; - return this; - } - - /** - * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @return the v1LegacyMode value. - */ - public Boolean v1LegacyMode() { - return this.v1LegacyMode; - } - - /** - * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @param v1LegacyMode the v1LegacyMode value to set. - * @return the WorkspacePropertiesUpdateParametersInner object itself. - */ - public WorkspacePropertiesUpdateParametersInner withV1LegacyMode(Boolean v1LegacyMode) { - this.v1LegacyMode = v1LegacyMode; - return this; - } - - /** - * Get the encryption property: The encryption property. - * - * @return the encryption value. - */ - public EncryptionUpdateProperties encryption() { - return this.encryption; - } - - /** - * Set the encryption property: The encryption property. - * - * @param encryption the encryption value to set. - * @return the WorkspacePropertiesUpdateParametersInner object itself. - */ - public WorkspacePropertiesUpdateParametersInner withEncryption(EncryptionUpdateProperties encryption) { - this.encryption = encryption; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serviceManagedResourcesSettings() != null) { - serviceManagedResourcesSettings().validate(); - } - if (serverlessComputeSettings() != null) { - serverlessComputeSettings().validate(); - } - if (featureStoreSettings() != null) { - featureStoreSettings().validate(); - } - if (managedNetwork() != null) { - managedNetwork().validate(); - } - if (encryption() != null) { - encryption().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("imageBuildCompute", this.imageBuildCompute); - jsonWriter.writeJsonField("serviceManagedResourcesSettings", this.serviceManagedResourcesSettings); - jsonWriter.writeStringField("primaryUserAssignedIdentity", this.primaryUserAssignedIdentity); - jsonWriter.writeJsonField("serverlessComputeSettings", this.serverlessComputeSettings); - jsonWriter.writeStringField("publicNetworkAccess", - this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); - jsonWriter.writeStringField("applicationInsights", this.applicationInsights); - jsonWriter.writeStringField("containerRegistry", this.containerRegistry); - jsonWriter.writeJsonField("featureStoreSettings", this.featureStoreSettings); - jsonWriter.writeJsonField("managedNetwork", this.managedNetwork); - jsonWriter.writeBooleanField("enableDataIsolation", this.enableDataIsolation); - jsonWriter.writeBooleanField("v1LegacyMode", this.v1LegacyMode); - jsonWriter.writeJsonField("encryption", this.encryption); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspacePropertiesUpdateParametersInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspacePropertiesUpdateParametersInner if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkspacePropertiesUpdateParametersInner. - */ - public static WorkspacePropertiesUpdateParametersInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspacePropertiesUpdateParametersInner deserializedWorkspacePropertiesUpdateParametersInner - = new WorkspacePropertiesUpdateParametersInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.description = reader.getString(); - } else if ("friendlyName".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.friendlyName = reader.getString(); - } else if ("imageBuildCompute".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.imageBuildCompute = reader.getString(); - } else if ("serviceManagedResourcesSettings".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.serviceManagedResourcesSettings - = ServiceManagedResourcesSettings.fromJson(reader); - } else if ("primaryUserAssignedIdentity".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.primaryUserAssignedIdentity - = reader.getString(); - } else if ("serverlessComputeSettings".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.serverlessComputeSettings - = ServerlessComputeSettings.fromJson(reader); - } else if ("publicNetworkAccess".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.publicNetworkAccess - = PublicNetworkAccess.fromString(reader.getString()); - } else if ("applicationInsights".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.applicationInsights = reader.getString(); - } else if ("containerRegistry".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.containerRegistry = reader.getString(); - } else if ("featureStoreSettings".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.featureStoreSettings - = FeatureStoreSettings.fromJson(reader); - } else if ("managedNetwork".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.managedNetwork - = ManagedNetworkSettingsInner.fromJson(reader); - } else if ("enableDataIsolation".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.enableDataIsolation - = reader.getNullable(JsonReader::getBoolean); - } else if ("v1LegacyMode".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.v1LegacyMode - = reader.getNullable(JsonReader::getBoolean); - } else if ("encryption".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.encryption - = EncryptionUpdateProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspacePropertiesUpdateParametersInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java deleted file mode 100644 index d9c8caf695b0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the inner data models for AzureMachineLearningWorkspaces. - * These APIs allow end users to operate on Azure Machine Learning Workspace resources. - */ -package com.azure.resourcemanager.machinelearning.fluent.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java deleted file mode 100644 index f2f5bd32c612..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the service clients for AzureMachineLearningWorkspaces. - * These APIs allow end users to operate on Azure Machine Learning Workspace resources. - */ -package com.azure.resourcemanager.machinelearning.fluent; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlUserFeatureImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlUserFeatureImpl.java deleted file mode 100644 index ac8f925a38ad..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlUserFeatureImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner; -import com.azure.resourcemanager.machinelearning.models.AmlUserFeature; - -public final class AmlUserFeatureImpl implements AmlUserFeature { - private AmlUserFeatureInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - AmlUserFeatureImpl(AmlUserFeatureInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String displayName() { - return this.innerModel().displayName(); - } - - public String description() { - return this.innerModel().description(); - } - - public AmlUserFeatureInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesBuilder.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesBuilder.java deleted file mode 100644 index 35b7529d50c6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesBuilder.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.machinelearning.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 AzureMachineLearningWorkspacesImpl type. - */ -@ServiceClientBuilder(serviceClients = { AzureMachineLearningWorkspacesImpl.class }) -public final class AzureMachineLearningWorkspacesBuilder { - /* - * The ID of the target subscription. - */ - private String subscriptionId; - - /** - * Sets The ID of the target subscription. - * - * @param subscriptionId the subscriptionId value. - * @return the AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder 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 AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder 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 AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder 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 AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder 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 AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of AzureMachineLearningWorkspacesImpl with the provided parameters. - * - * @return an instance of AzureMachineLearningWorkspacesImpl. - */ - public AzureMachineLearningWorkspacesImpl 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(); - AzureMachineLearningWorkspacesImpl client = new AzureMachineLearningWorkspacesImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); - return client; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java deleted file mode 100644 index 9fb3b79b1f9b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java +++ /dev/null @@ -1,1040 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.ServiceClient; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.management.polling.PollResult; -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.machinelearning.fluent.AzureMachineLearningWorkspaces; -import com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient; -import com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient; -import com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.ComputesClient; -import com.azure.resourcemanager.machinelearning.fluent.DataContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.DatastoresClient; -import com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.FeaturesClient; -import com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.JobsClient; -import com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkProvisionsClient; -import com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient; -import com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient; -import com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient; -import com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient; -import com.azure.resourcemanager.machinelearning.fluent.OperationsClient; -import com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.machinelearning.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.machinelearning.fluent.QuotasClient; -import com.azure.resourcemanager.machinelearning.fluent.RegistriesClient; -import com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.RegistryDataReferencesClient; -import com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.SchedulesClient; -import com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient; -import com.azure.resourcemanager.machinelearning.fluent.UsagesClient; -import com.azure.resourcemanager.machinelearning.fluent.VirtualMachineSizesClient; -import com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient; -import com.azure.resourcemanager.machinelearning.fluent.WorkspaceFeaturesClient; -import com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient; -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 AzureMachineLearningWorkspacesImpl type. - */ -@ServiceClient(builder = AzureMachineLearningWorkspacesBuilder.class) -public final class AzureMachineLearningWorkspacesImpl implements AzureMachineLearningWorkspaces { - /** - * 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 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 WorkspacesClient object to access its operations. - */ - private final WorkspacesClient workspaces; - - /** - * Gets the WorkspacesClient object to access its operations. - * - * @return the WorkspacesClient object. - */ - public WorkspacesClient getWorkspaces() { - return this.workspaces; - } - - /** - * The UsagesClient object to access its operations. - */ - private final UsagesClient usages; - - /** - * Gets the UsagesClient object to access its operations. - * - * @return the UsagesClient object. - */ - public UsagesClient getUsages() { - return this.usages; - } - - /** - * The VirtualMachineSizesClient object to access its operations. - */ - private final VirtualMachineSizesClient virtualMachineSizes; - - /** - * Gets the VirtualMachineSizesClient object to access its operations. - * - * @return the VirtualMachineSizesClient object. - */ - public VirtualMachineSizesClient getVirtualMachineSizes() { - return this.virtualMachineSizes; - } - - /** - * The QuotasClient object to access its operations. - */ - private final QuotasClient quotas; - - /** - * Gets the QuotasClient object to access its operations. - * - * @return the QuotasClient object. - */ - public QuotasClient getQuotas() { - return this.quotas; - } - - /** - * The ComputesClient object to access its operations. - */ - private final ComputesClient computes; - - /** - * Gets the ComputesClient object to access its operations. - * - * @return the ComputesClient object. - */ - public ComputesClient getComputes() { - return this.computes; - } - - /** - * The PrivateEndpointConnectionsClient object to access its operations. - */ - private final PrivateEndpointConnectionsClient privateEndpointConnections; - - /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. - * - * @return the PrivateEndpointConnectionsClient object. - */ - public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** - * The PrivateLinkResourcesClient object to access its operations. - */ - private final PrivateLinkResourcesClient privateLinkResources; - - /** - * Gets the PrivateLinkResourcesClient object to access its operations. - * - * @return the PrivateLinkResourcesClient object. - */ - public PrivateLinkResourcesClient getPrivateLinkResources() { - return this.privateLinkResources; - } - - /** - * The WorkspaceConnectionsClient object to access its operations. - */ - private final WorkspaceConnectionsClient workspaceConnections; - - /** - * Gets the WorkspaceConnectionsClient object to access its operations. - * - * @return the WorkspaceConnectionsClient object. - */ - public WorkspaceConnectionsClient getWorkspaceConnections() { - return this.workspaceConnections; - } - - /** - * The ManagedNetworkSettingsRulesClient object to access its operations. - */ - private final ManagedNetworkSettingsRulesClient managedNetworkSettingsRules; - - /** - * Gets the ManagedNetworkSettingsRulesClient object to access its operations. - * - * @return the ManagedNetworkSettingsRulesClient object. - */ - public ManagedNetworkSettingsRulesClient getManagedNetworkSettingsRules() { - return this.managedNetworkSettingsRules; - } - - /** - * The ManagedNetworkProvisionsClient object to access its operations. - */ - private final ManagedNetworkProvisionsClient managedNetworkProvisions; - - /** - * Gets the ManagedNetworkProvisionsClient object to access its operations. - * - * @return the ManagedNetworkProvisionsClient object. - */ - public ManagedNetworkProvisionsClient getManagedNetworkProvisions() { - return this.managedNetworkProvisions; - } - - /** - * The RegistryCodeContainersClient object to access its operations. - */ - private final RegistryCodeContainersClient registryCodeContainers; - - /** - * Gets the RegistryCodeContainersClient object to access its operations. - * - * @return the RegistryCodeContainersClient object. - */ - public RegistryCodeContainersClient getRegistryCodeContainers() { - return this.registryCodeContainers; - } - - /** - * The RegistryCodeVersionsClient object to access its operations. - */ - private final RegistryCodeVersionsClient registryCodeVersions; - - /** - * Gets the RegistryCodeVersionsClient object to access its operations. - * - * @return the RegistryCodeVersionsClient object. - */ - public RegistryCodeVersionsClient getRegistryCodeVersions() { - return this.registryCodeVersions; - } - - /** - * The RegistryComponentContainersClient object to access its operations. - */ - private final RegistryComponentContainersClient registryComponentContainers; - - /** - * Gets the RegistryComponentContainersClient object to access its operations. - * - * @return the RegistryComponentContainersClient object. - */ - public RegistryComponentContainersClient getRegistryComponentContainers() { - return this.registryComponentContainers; - } - - /** - * The RegistryComponentVersionsClient object to access its operations. - */ - private final RegistryComponentVersionsClient registryComponentVersions; - - /** - * Gets the RegistryComponentVersionsClient object to access its operations. - * - * @return the RegistryComponentVersionsClient object. - */ - public RegistryComponentVersionsClient getRegistryComponentVersions() { - return this.registryComponentVersions; - } - - /** - * The RegistryDataContainersClient object to access its operations. - */ - private final RegistryDataContainersClient registryDataContainers; - - /** - * Gets the RegistryDataContainersClient object to access its operations. - * - * @return the RegistryDataContainersClient object. - */ - public RegistryDataContainersClient getRegistryDataContainers() { - return this.registryDataContainers; - } - - /** - * The RegistryDataVersionsClient object to access its operations. - */ - private final RegistryDataVersionsClient registryDataVersions; - - /** - * Gets the RegistryDataVersionsClient object to access its operations. - * - * @return the RegistryDataVersionsClient object. - */ - public RegistryDataVersionsClient getRegistryDataVersions() { - return this.registryDataVersions; - } - - /** - * The RegistryDataReferencesClient object to access its operations. - */ - private final RegistryDataReferencesClient registryDataReferences; - - /** - * Gets the RegistryDataReferencesClient object to access its operations. - * - * @return the RegistryDataReferencesClient object. - */ - public RegistryDataReferencesClient getRegistryDataReferences() { - return this.registryDataReferences; - } - - /** - * The RegistryEnvironmentContainersClient object to access its operations. - */ - private final RegistryEnvironmentContainersClient registryEnvironmentContainers; - - /** - * Gets the RegistryEnvironmentContainersClient object to access its operations. - * - * @return the RegistryEnvironmentContainersClient object. - */ - public RegistryEnvironmentContainersClient getRegistryEnvironmentContainers() { - return this.registryEnvironmentContainers; - } - - /** - * The RegistryEnvironmentVersionsClient object to access its operations. - */ - private final RegistryEnvironmentVersionsClient registryEnvironmentVersions; - - /** - * Gets the RegistryEnvironmentVersionsClient object to access its operations. - * - * @return the RegistryEnvironmentVersionsClient object. - */ - public RegistryEnvironmentVersionsClient getRegistryEnvironmentVersions() { - return this.registryEnvironmentVersions; - } - - /** - * The RegistryModelContainersClient object to access its operations. - */ - private final RegistryModelContainersClient registryModelContainers; - - /** - * Gets the RegistryModelContainersClient object to access its operations. - * - * @return the RegistryModelContainersClient object. - */ - public RegistryModelContainersClient getRegistryModelContainers() { - return this.registryModelContainers; - } - - /** - * The RegistryModelVersionsClient object to access its operations. - */ - private final RegistryModelVersionsClient registryModelVersions; - - /** - * Gets the RegistryModelVersionsClient object to access its operations. - * - * @return the RegistryModelVersionsClient object. - */ - public RegistryModelVersionsClient getRegistryModelVersions() { - return this.registryModelVersions; - } - - /** - * The BatchEndpointsClient object to access its operations. - */ - private final BatchEndpointsClient batchEndpoints; - - /** - * Gets the BatchEndpointsClient object to access its operations. - * - * @return the BatchEndpointsClient object. - */ - public BatchEndpointsClient getBatchEndpoints() { - return this.batchEndpoints; - } - - /** - * The BatchDeploymentsClient object to access its operations. - */ - private final BatchDeploymentsClient batchDeployments; - - /** - * Gets the BatchDeploymentsClient object to access its operations. - * - * @return the BatchDeploymentsClient object. - */ - public BatchDeploymentsClient getBatchDeployments() { - return this.batchDeployments; - } - - /** - * The CodeContainersClient object to access its operations. - */ - private final CodeContainersClient codeContainers; - - /** - * Gets the CodeContainersClient object to access its operations. - * - * @return the CodeContainersClient object. - */ - public CodeContainersClient getCodeContainers() { - return this.codeContainers; - } - - /** - * The CodeVersionsClient object to access its operations. - */ - private final CodeVersionsClient codeVersions; - - /** - * Gets the CodeVersionsClient object to access its operations. - * - * @return the CodeVersionsClient object. - */ - public CodeVersionsClient getCodeVersions() { - return this.codeVersions; - } - - /** - * The ComponentContainersClient object to access its operations. - */ - private final ComponentContainersClient componentContainers; - - /** - * Gets the ComponentContainersClient object to access its operations. - * - * @return the ComponentContainersClient object. - */ - public ComponentContainersClient getComponentContainers() { - return this.componentContainers; - } - - /** - * The ComponentVersionsClient object to access its operations. - */ - private final ComponentVersionsClient componentVersions; - - /** - * Gets the ComponentVersionsClient object to access its operations. - * - * @return the ComponentVersionsClient object. - */ - public ComponentVersionsClient getComponentVersions() { - return this.componentVersions; - } - - /** - * The DataContainersClient object to access its operations. - */ - private final DataContainersClient dataContainers; - - /** - * Gets the DataContainersClient object to access its operations. - * - * @return the DataContainersClient object. - */ - public DataContainersClient getDataContainers() { - return this.dataContainers; - } - - /** - * The DataVersionsClient object to access its operations. - */ - private final DataVersionsClient dataVersions; - - /** - * Gets the DataVersionsClient object to access its operations. - * - * @return the DataVersionsClient object. - */ - public DataVersionsClient getDataVersions() { - return this.dataVersions; - } - - /** - * The DatastoresClient object to access its operations. - */ - private final DatastoresClient datastores; - - /** - * Gets the DatastoresClient object to access its operations. - * - * @return the DatastoresClient object. - */ - public DatastoresClient getDatastores() { - return this.datastores; - } - - /** - * The EnvironmentContainersClient object to access its operations. - */ - private final EnvironmentContainersClient environmentContainers; - - /** - * Gets the EnvironmentContainersClient object to access its operations. - * - * @return the EnvironmentContainersClient object. - */ - public EnvironmentContainersClient getEnvironmentContainers() { - return this.environmentContainers; - } - - /** - * The EnvironmentVersionsClient object to access its operations. - */ - private final EnvironmentVersionsClient environmentVersions; - - /** - * Gets the EnvironmentVersionsClient object to access its operations. - * - * @return the EnvironmentVersionsClient object. - */ - public EnvironmentVersionsClient getEnvironmentVersions() { - return this.environmentVersions; - } - - /** - * The FeaturesetContainersClient object to access its operations. - */ - private final FeaturesetContainersClient featuresetContainers; - - /** - * Gets the FeaturesetContainersClient object to access its operations. - * - * @return the FeaturesetContainersClient object. - */ - public FeaturesetContainersClient getFeaturesetContainers() { - return this.featuresetContainers; - } - - /** - * The FeaturesClient object to access its operations. - */ - private final FeaturesClient features; - - /** - * Gets the FeaturesClient object to access its operations. - * - * @return the FeaturesClient object. - */ - public FeaturesClient getFeatures() { - return this.features; - } - - /** - * The FeaturesetVersionsClient object to access its operations. - */ - private final FeaturesetVersionsClient featuresetVersions; - - /** - * Gets the FeaturesetVersionsClient object to access its operations. - * - * @return the FeaturesetVersionsClient object. - */ - public FeaturesetVersionsClient getFeaturesetVersions() { - return this.featuresetVersions; - } - - /** - * The FeaturestoreEntityContainersClient object to access its operations. - */ - private final FeaturestoreEntityContainersClient featurestoreEntityContainers; - - /** - * Gets the FeaturestoreEntityContainersClient object to access its operations. - * - * @return the FeaturestoreEntityContainersClient object. - */ - public FeaturestoreEntityContainersClient getFeaturestoreEntityContainers() { - return this.featurestoreEntityContainers; - } - - /** - * The FeaturestoreEntityVersionsClient object to access its operations. - */ - private final FeaturestoreEntityVersionsClient featurestoreEntityVersions; - - /** - * Gets the FeaturestoreEntityVersionsClient object to access its operations. - * - * @return the FeaturestoreEntityVersionsClient object. - */ - public FeaturestoreEntityVersionsClient getFeaturestoreEntityVersions() { - return this.featurestoreEntityVersions; - } - - /** - * The JobsClient object to access its operations. - */ - private final JobsClient jobs; - - /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. - */ - public JobsClient getJobs() { - return this.jobs; - } - - /** - * The MarketplaceSubscriptionsClient object to access its operations. - */ - private final MarketplaceSubscriptionsClient marketplaceSubscriptions; - - /** - * Gets the MarketplaceSubscriptionsClient object to access its operations. - * - * @return the MarketplaceSubscriptionsClient object. - */ - public MarketplaceSubscriptionsClient getMarketplaceSubscriptions() { - return this.marketplaceSubscriptions; - } - - /** - * The ModelContainersClient object to access its operations. - */ - private final ModelContainersClient modelContainers; - - /** - * Gets the ModelContainersClient object to access its operations. - * - * @return the ModelContainersClient object. - */ - public ModelContainersClient getModelContainers() { - return this.modelContainers; - } - - /** - * The ModelVersionsClient object to access its operations. - */ - private final ModelVersionsClient modelVersions; - - /** - * Gets the ModelVersionsClient object to access its operations. - * - * @return the ModelVersionsClient object. - */ - public ModelVersionsClient getModelVersions() { - return this.modelVersions; - } - - /** - * The OnlineEndpointsClient object to access its operations. - */ - private final OnlineEndpointsClient onlineEndpoints; - - /** - * Gets the OnlineEndpointsClient object to access its operations. - * - * @return the OnlineEndpointsClient object. - */ - public OnlineEndpointsClient getOnlineEndpoints() { - return this.onlineEndpoints; - } - - /** - * The OnlineDeploymentsClient object to access its operations. - */ - private final OnlineDeploymentsClient onlineDeployments; - - /** - * Gets the OnlineDeploymentsClient object to access its operations. - * - * @return the OnlineDeploymentsClient object. - */ - public OnlineDeploymentsClient getOnlineDeployments() { - return this.onlineDeployments; - } - - /** - * The SchedulesClient object to access its operations. - */ - private final SchedulesClient schedules; - - /** - * Gets the SchedulesClient object to access its operations. - * - * @return the SchedulesClient object. - */ - public SchedulesClient getSchedules() { - return this.schedules; - } - - /** - * The ServerlessEndpointsClient object to access its operations. - */ - private final ServerlessEndpointsClient serverlessEndpoints; - - /** - * Gets the ServerlessEndpointsClient object to access its operations. - * - * @return the ServerlessEndpointsClient object. - */ - public ServerlessEndpointsClient getServerlessEndpoints() { - return this.serverlessEndpoints; - } - - /** - * The RegistriesClient object to access its operations. - */ - private final RegistriesClient registries; - - /** - * Gets the RegistriesClient object to access its operations. - * - * @return the RegistriesClient object. - */ - public RegistriesClient getRegistries() { - return this.registries; - } - - /** - * The WorkspaceFeaturesClient object to access its operations. - */ - private final WorkspaceFeaturesClient workspaceFeatures; - - /** - * Gets the WorkspaceFeaturesClient object to access its operations. - * - * @return the WorkspaceFeaturesClient object. - */ - public WorkspaceFeaturesClient getWorkspaceFeatures() { - return this.workspaceFeatures; - } - - /** - * Initializes an instance of AzureMachineLearningWorkspaces 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. - */ - AzureMachineLearningWorkspacesImpl(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 = "2024-04-01"; - this.operations = new OperationsClientImpl(this); - this.workspaces = new WorkspacesClientImpl(this); - this.usages = new UsagesClientImpl(this); - this.virtualMachineSizes = new VirtualMachineSizesClientImpl(this); - this.quotas = new QuotasClientImpl(this); - this.computes = new ComputesClientImpl(this); - this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); - this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); - this.workspaceConnections = new WorkspaceConnectionsClientImpl(this); - this.managedNetworkSettingsRules = new ManagedNetworkSettingsRulesClientImpl(this); - this.managedNetworkProvisions = new ManagedNetworkProvisionsClientImpl(this); - this.registryCodeContainers = new RegistryCodeContainersClientImpl(this); - this.registryCodeVersions = new RegistryCodeVersionsClientImpl(this); - this.registryComponentContainers = new RegistryComponentContainersClientImpl(this); - this.registryComponentVersions = new RegistryComponentVersionsClientImpl(this); - this.registryDataContainers = new RegistryDataContainersClientImpl(this); - this.registryDataVersions = new RegistryDataVersionsClientImpl(this); - this.registryDataReferences = new RegistryDataReferencesClientImpl(this); - this.registryEnvironmentContainers = new RegistryEnvironmentContainersClientImpl(this); - this.registryEnvironmentVersions = new RegistryEnvironmentVersionsClientImpl(this); - this.registryModelContainers = new RegistryModelContainersClientImpl(this); - this.registryModelVersions = new RegistryModelVersionsClientImpl(this); - this.batchEndpoints = new BatchEndpointsClientImpl(this); - this.batchDeployments = new BatchDeploymentsClientImpl(this); - this.codeContainers = new CodeContainersClientImpl(this); - this.codeVersions = new CodeVersionsClientImpl(this); - this.componentContainers = new ComponentContainersClientImpl(this); - this.componentVersions = new ComponentVersionsClientImpl(this); - this.dataContainers = new DataContainersClientImpl(this); - this.dataVersions = new DataVersionsClientImpl(this); - this.datastores = new DatastoresClientImpl(this); - this.environmentContainers = new EnvironmentContainersClientImpl(this); - this.environmentVersions = new EnvironmentVersionsClientImpl(this); - this.featuresetContainers = new FeaturesetContainersClientImpl(this); - this.features = new FeaturesClientImpl(this); - this.featuresetVersions = new FeaturesetVersionsClientImpl(this); - this.featurestoreEntityContainers = new FeaturestoreEntityContainersClientImpl(this); - this.featurestoreEntityVersions = new FeaturestoreEntityVersionsClientImpl(this); - this.jobs = new JobsClientImpl(this); - this.marketplaceSubscriptions = new MarketplaceSubscriptionsClientImpl(this); - this.modelContainers = new ModelContainersClientImpl(this); - this.modelVersions = new ModelVersionsClientImpl(this); - this.onlineEndpoints = new OnlineEndpointsClientImpl(this); - this.onlineDeployments = new OnlineDeploymentsClientImpl(this); - this.schedules = new SchedulesClientImpl(this); - this.serverlessEndpoints = new ServerlessEndpointsClientImpl(this); - this.registries = new RegistriesClientImpl(this); - this.workspaceFeatures = new WorkspaceFeaturesClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - return CoreUtils.mergeContexts(this.getContext(), context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult(Mono>> activationResponse, - HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { - return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, activationResponse, context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), - lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = this.getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - LOGGER.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(HttpHeaderName.fromString(s)); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AzureMachineLearningWorkspacesImpl.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java deleted file mode 100644 index 438b2bd3c355..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; -import com.azure.resourcemanager.machinelearning.models.BatchDeployment; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentProperties; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.util.Collections; -import java.util.Map; - -public final class BatchDeploymentImpl implements BatchDeployment, BatchDeployment.Definition, BatchDeployment.Update { - private BatchDeploymentInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager 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 BatchDeploymentProperties properties() { - return this.innerModel().properties(); - } - - public String kind() { - return this.innerModel().kind(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public Sku sku() { - return this.innerModel().sku(); - } - - 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 BatchDeploymentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String endpointName; - - private String deploymentName; - - private PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties updateBody; - - public BatchDeploymentImpl withExistingBatchEndpoint(String resourceGroupName, String workspaceName, - String endpointName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.endpointName = endpointName; - return this; - } - - public BatchDeployment create() { - this.innerObject = serviceManager.serviceClient() - .getBatchDeployments() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), - Context.NONE); - return this; - } - - public BatchDeployment create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBatchDeployments() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), context); - return this; - } - - BatchDeploymentImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new BatchDeploymentInner(); - this.serviceManager = serviceManager; - this.deploymentName = name; - } - - public BatchDeploymentImpl update() { - this.updateBody = new PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties(); - return this; - } - - public BatchDeployment apply() { - this.innerObject = serviceManager.serviceClient() - .getBatchDeployments() - .update(resourceGroupName, workspaceName, endpointName, deploymentName, updateBody, Context.NONE); - return this; - } - - public BatchDeployment apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBatchDeployments() - .update(resourceGroupName, workspaceName, endpointName, deploymentName, updateBody, context); - return this; - } - - BatchDeploymentImpl(BatchDeploymentInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.endpointName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "batchEndpoints"); - this.deploymentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "deployments"); - } - - public BatchDeployment refresh() { - this.innerObject = serviceManager.serviceClient() - .getBatchDeployments() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE) - .getValue(); - return this; - } - - public BatchDeployment refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBatchDeployments() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .getValue(); - return this; - } - - public BatchDeploymentImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public BatchDeploymentImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public BatchDeploymentImpl withProperties(BatchDeploymentProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public BatchDeploymentImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public BatchDeploymentImpl withKind(String kind) { - this.innerModel().withKind(kind); - return this; - } - - public BatchDeploymentImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public BatchDeploymentImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public BatchDeploymentImpl withProperties(PartialBatchDeployment properties) { - this.updateBody.withProperties(properties); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java deleted file mode 100644 index e4285f70aec1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java +++ /dev/null @@ -1,1323 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.BatchDeploymentsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties; -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 BatchDeploymentsClient. - */ -public final class BatchDeploymentsClientImpl implements BatchDeploymentsClient { - /** - * The proxy service used to perform REST calls. - */ - private final BatchDeploymentsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of BatchDeploymentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BatchDeploymentsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(BatchDeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesBatchDeployments to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface BatchDeploymentsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BatchDeploymentInner body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchDeployment entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String endpointName, String orderBy, Integer top, String skip) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), orderBy, top, skip, 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 Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @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 a paginated list of BatchDeployment entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String endpointName, String orderBy, Integer top, String skip, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName 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, workspaceName, - endpointName, this.client.getApiVersion(), orderBy, top, skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String endpointName, String orderBy, Integer top, String skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String endpointName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @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 a paginated list of BatchDeployment entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String endpointName, String orderBy, Integer top, String skip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - String endpointName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip)); - } - - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @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 a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, - String orderBy, Integer top, String skip, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context)); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName 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, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).getSyncPoller(); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .getSyncPoller(); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).block(); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - Context context) { - deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); - } - - /** - * Gets a batch inference deployment by id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a batch inference deployment by id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @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 a batch inference deployment by id along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName 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, workspaceName, - endpointName, deploymentName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets a batch inference deployment by id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a batch inference deployment by id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @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 a batch inference deployment by id along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); - } - - /** - * Gets a batch inference deployment by id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner get(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName) { - return getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE).getValue(); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchDeploymentInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BatchDeploymentInner.class, BatchDeploymentInner.class, this.client.getContext()); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchDeploymentInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BatchDeploymentInner.class, BatchDeploymentInner.class, context); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .getSyncPoller(); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .getSyncPoller(); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - Context context) { - return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context).block(); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, BatchDeploymentInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, BatchDeploymentInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BatchDeploymentInner.class, BatchDeploymentInner.class, this.client.getContext()); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, - endpointName, deploymentName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BatchDeploymentInner.class, BatchDeploymentInner.class, context); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .getSyncPoller(); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentInner body, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .getSyncPoller(); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, BatchDeploymentInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, BatchDeploymentInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, BatchDeploymentInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, BatchDeploymentInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchDeployment entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchDeployment entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsImpl.java deleted file mode 100644 index b6a201a6a73d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsImpl.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.machinelearning.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.machinelearning.fluent.BatchDeploymentsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; -import com.azure.resourcemanager.machinelearning.models.BatchDeployment; -import com.azure.resourcemanager.machinelearning.models.BatchDeployments; - -public final class BatchDeploymentsImpl implements BatchDeployments { - private static final ClientLogger LOGGER = new ClientLogger(BatchDeploymentsImpl.class); - - private final BatchDeploymentsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public BatchDeploymentsImpl(BatchDeploymentsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, endpointName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchDeploymentImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, - String orderBy, Integer top, String skip, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchDeploymentImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BatchDeploymentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BatchDeployment get(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName) { - BatchDeploymentInner inner - = this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); - if (inner != null) { - return new BatchDeploymentImpl(inner, this.manager()); - } else { - return null; - } - } - - public BatchDeployment getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "batchEndpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); - } - String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); - if (deploymentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "batchEndpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); - } - String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); - if (deploymentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "batchEndpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); - } - String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); - if (deploymentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); - } - this.delete(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "batchEndpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); - } - String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); - if (deploymentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); - } - this.delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); - } - - private BatchDeploymentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public BatchDeploymentImpl define(String name) { - return new BatchDeploymentImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java deleted file mode 100644 index f9067b4de92c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.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.machinelearning.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.machinelearning.fluent.models.BatchEndpointInner; -import com.azure.resourcemanager.machinelearning.models.BatchEndpoint; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthKeys; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.util.Collections; -import java.util.Map; - -public final class BatchEndpointImpl implements BatchEndpoint, BatchEndpoint.Definition, BatchEndpoint.Update { - private BatchEndpointInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager 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 BatchEndpointProperties properties() { - return this.innerModel().properties(); - } - - public String kind() { - return this.innerModel().kind(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public Sku sku() { - return this.innerModel().sku(); - } - - 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 BatchEndpointInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String endpointName; - - private PartialMinimalTrackedResourceWithIdentity updateBody; - - public BatchEndpointImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public BatchEndpoint create() { - this.innerObject = serviceManager.serviceClient() - .getBatchEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), Context.NONE); - return this; - } - - public BatchEndpoint create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBatchEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), context); - return this; - } - - BatchEndpointImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new BatchEndpointInner(); - this.serviceManager = serviceManager; - this.endpointName = name; - } - - public BatchEndpointImpl update() { - this.updateBody = new PartialMinimalTrackedResourceWithIdentity(); - return this; - } - - public BatchEndpoint apply() { - this.innerObject = serviceManager.serviceClient() - .getBatchEndpoints() - .update(resourceGroupName, workspaceName, endpointName, updateBody, Context.NONE); - return this; - } - - public BatchEndpoint apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBatchEndpoints() - .update(resourceGroupName, workspaceName, endpointName, updateBody, context); - return this; - } - - BatchEndpointImpl(BatchEndpointInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.endpointName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "batchEndpoints"); - } - - public BatchEndpoint refresh() { - this.innerObject = serviceManager.serviceClient() - .getBatchEndpoints() - .getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE) - .getValue(); - return this; - } - - public BatchEndpoint refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBatchEndpoints() - .getWithResponse(resourceGroupName, workspaceName, endpointName, context) - .getValue(); - return this; - } - - public Response listKeysWithResponse(Context context) { - return serviceManager.batchEndpoints() - .listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); - } - - public EndpointAuthKeys listKeys() { - return serviceManager.batchEndpoints().listKeys(resourceGroupName, workspaceName, endpointName); - } - - public BatchEndpointImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public BatchEndpointImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public BatchEndpointImpl withProperties(BatchEndpointProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public BatchEndpointImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public BatchEndpointImpl withKind(String kind) { - this.innerModel().withKind(kind); - return this; - } - - public BatchEndpointImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public BatchEndpointImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public BatchEndpointImpl withIdentity(PartialManagedServiceIdentity identity) { - this.updateBody.withIdentity(identity); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java deleted file mode 100644 index e1bf9be205ea..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java +++ /dev/null @@ -1,1349 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.BatchEndpointsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; -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 BatchEndpointsClient. - */ -public final class BatchEndpointsClientImpl implements BatchEndpointsClient { - /** - * The proxy service used to perform REST calls. - */ - private final BatchEndpointsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of BatchEndpointsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BatchEndpointsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(BatchEndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesBatchEndpoints to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface BatchEndpointsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("count") Integer count, - @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialMinimalTrackedResourceWithIdentity body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") BatchEndpointInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/listkeys") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - Integer count, String skip) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), count, skip, 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 Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @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 a paginated list of BatchEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - Integer count, String skip, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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, workspaceName, - this.client.getApiVersion(), count, skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Integer count, - String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final Integer count = null; - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @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 a paginated list of BatchEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Integer count, - String skip, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final Integer count = null; - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, count, skip)); - } - - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @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 a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, Integer count, - String skip, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, count, skip, context)); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName 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, - workspaceName, endpointName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String endpointName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String endpointName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String endpointName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName).getSyncPoller(); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String endpointName, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context).getSyncPoller(); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName) { - deleteAsync(resourceGroupName, workspaceName, endpointName).block(); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName, Context context) { - deleteAsync(resourceGroupName, workspaceName, endpointName, context).block(); - } - - /** - * Gets a batch inference endpoint by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a batch inference endpoint by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @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 a batch inference endpoint by name along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName 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, workspaceName, - endpointName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets a batch inference endpoint by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a batch inference endpoint by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @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 a batch inference endpoint by name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String endpointName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); - } - - /** - * Gets a batch inference endpoint by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner get(String resourceGroupName, String workspaceName, String endpointName) { - return getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, PartialMinimalTrackedResourceWithIdentity body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, PartialMinimalTrackedResourceWithIdentity body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchEndpointInner> beginUpdateAsync(String resourceGroupName, - String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BatchEndpointInner.class, BatchEndpointInner.class, this.client.getContext()); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchEndpointInner> beginUpdateAsync(String resourceGroupName, - String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BatchEndpointInner.class, BatchEndpointInner.class, context); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchEndpointInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchEndpointInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).getSyncPoller(); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - return updateAsync(resourceGroupName, workspaceName, endpointName, body).block(); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body, Context context) { - return updateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, BatchEndpointInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, BatchEndpointInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BatchEndpointInner.class, BatchEndpointInner.class, this.client.getContext()); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BatchEndpointInner.class, BatchEndpointInner.class, context); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchEndpointInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, BatchEndpointInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchEndpointInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, BatchEndpointInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) - .getSyncPoller(); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String endpointName, BatchEndpointInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String endpointName, BatchEndpointInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - BatchEndpointInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).block(); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - BatchEndpointInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); - } - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @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 keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @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 keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), accept, context); - } - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @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 keys for endpoint authentication on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listKeysAsync(String resourceGroupName, String workspaceName, - String endpointName) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @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 keys for endpoint authentication along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, - String endpointName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); - } - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @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 keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName) { - return listKeysWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsImpl.java deleted file mode 100644 index f784fb27bdfd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsImpl.java +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.BatchEndpointsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.models.BatchEndpoint; -import com.azure.resourcemanager.machinelearning.models.BatchEndpoints; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthKeys; - -public final class BatchEndpointsImpl implements BatchEndpoints { - private static final ClientLogger LOGGER = new ClientLogger(BatchEndpointsImpl.class); - - private final BatchEndpointsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public BatchEndpointsImpl(BatchEndpointsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchEndpointImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, count, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchEndpointImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, context); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, endpointName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BatchEndpointImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BatchEndpoint get(String resourceGroupName, String workspaceName, String endpointName) { - BatchEndpointInner inner = this.serviceClient().get(resourceGroupName, workspaceName, endpointName); - if (inner != null) { - return new BatchEndpointImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, - String endpointName, Context context) { - Response inner - = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EndpointAuthKeysImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName) { - EndpointAuthKeysInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName, endpointName); - if (inner != null) { - return new EndpointAuthKeysImpl(inner, this.manager()); - } else { - return null; - } - } - - public BatchEndpoint getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "batchEndpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "batchEndpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, endpointName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "batchEndpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); - } - this.delete(resourceGroupName, workspaceName, endpointName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "batchEndpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); - } - this.delete(resourceGroupName, workspaceName, endpointName, context); - } - - private BatchEndpointsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public BatchEndpointImpl define(String name) { - return new BatchEndpointImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java deleted file mode 100644 index e8d4e9866fe9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.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.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; - -public final class CodeContainerImpl implements CodeContainer, CodeContainer.Definition, CodeContainer.Update { - private CodeContainerInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public CodeContainerProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public CodeContainerInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public CodeContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public CodeContainer create() { - this.innerObject = serviceManager.serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public CodeContainer create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - CodeContainerImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new CodeContainerInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public CodeContainerImpl update() { - return this; - } - - public CodeContainer apply() { - this.innerObject = serviceManager.serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public CodeContainer apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - CodeContainerImpl(CodeContainerInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "codes"); - } - - public CodeContainer refresh() { - this.innerObject = serviceManager.serviceClient() - .getCodeContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public CodeContainer refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCodeContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public CodeContainerImpl withProperties(CodeContainerProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java deleted file mode 100644 index ff26ff2c637a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java +++ /dev/null @@ -1,739 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainerResourceArmPaginatedResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in CodeContainersClient. - */ -public final class CodeContainersClientImpl implements CodeContainersClient { - /** - * The proxy service used to perform REST calls. - */ - private final CodeContainersService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of CodeContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - CodeContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(CodeContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesCodeContainers to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface CodeContainersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CodeContainerInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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, workspaceName, - this.client.getApiVersion(), skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, context)); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, workspaceName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeContainerInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, CodeContainerInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, CodeContainerInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - CodeContainerInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, CodeContainerInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - CodeContainerInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersImpl.java deleted file mode 100644 index 1e84c22d3534..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.CodeContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import com.azure.resourcemanager.machinelearning.models.CodeContainers; - -public final class CodeContainersImpl implements CodeContainers { - private static final ClientLogger LOGGER = new ClientLogger(CodeContainersImpl.class); - - private final CodeContainersClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public CodeContainersImpl(CodeContainersClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); - } - - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CodeContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CodeContainer get(String resourceGroupName, String workspaceName, String name) { - CodeContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new CodeContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public CodeContainer getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - private CodeContainersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public CodeContainerImpl define(String name) { - return new CodeContainerImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java deleted file mode 100644 index b6f4d8c32443..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; -import com.azure.resourcemanager.machinelearning.models.CodeVersion; -import com.azure.resourcemanager.machinelearning.models.CodeVersionProperties; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; -import com.azure.resourcemanager.machinelearning.models.PendingUploadResponseDto; - -public final class CodeVersionImpl implements CodeVersion, CodeVersion.Definition, CodeVersion.Update { - private CodeVersionInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public CodeVersionProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public CodeVersionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - private String version; - - public CodeVersionImpl withExistingCode(String resourceGroupName, String workspaceName, String name) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; - return this; - } - - public CodeVersion create() { - this.innerObject = serviceManager.serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public CodeVersion create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - CodeVersionImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new CodeVersionInner(); - this.serviceManager = serviceManager; - this.version = name; - } - - public CodeVersionImpl update() { - return this; - } - - public CodeVersion apply() { - this.innerObject = serviceManager.serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public CodeVersion apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - CodeVersionImpl(CodeVersionInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "codes"); - this.version = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "versions"); - } - - public CodeVersion refresh() { - this.innerObject = serviceManager.serviceClient() - .getCodeVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); - return this; - } - - public CodeVersion refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCodeVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); - return this; - } - - public void publish(DestinationAsset body) { - serviceManager.codeVersions().publish(resourceGroupName, workspaceName, name, version, body); - } - - public void publish(DestinationAsset body, Context context) { - serviceManager.codeVersions().publish(resourceGroupName, workspaceName, name, version, body, context); - } - - public Response createOrGetStartPendingUploadWithResponse(PendingUploadRequestDto body, - Context context) { - return serviceManager.codeVersions() - .createOrGetStartPendingUploadWithResponse(resourceGroupName, workspaceName, name, version, body, context); - } - - public PendingUploadResponseDto createOrGetStartPendingUpload(PendingUploadRequestDto body) { - return serviceManager.codeVersions() - .createOrGetStartPendingUpload(resourceGroupName, workspaceName, name, version, body); - } - - public CodeVersionImpl withProperties(CodeVersionProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java deleted file mode 100644 index 8a613f482344..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java +++ /dev/null @@ -1,1278 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.CodeVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; -import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.CodeVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; -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 CodeVersionsClient. - */ -public final class CodeVersionsClientImpl implements CodeVersionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final CodeVersionsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of CodeVersionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - CodeVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(CodeVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesCodeVersions to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface CodeVersionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, - @QueryParam("hash") String hash, @QueryParam("hashVersion") String hashVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") CodeVersionInner body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/publish") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> publish(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DestinationAsset body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/startPendingUpload") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrGetStartPendingUpload(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") PendingUploadRequestDto body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. - * @param hashVersion Hash algorithm version when listing by hash. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String name, String orderBy, Integer top, String skip, String hash, String hashVersion) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), orderBy, top, skip, hash, - hashVersion, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. - * @param hashVersion Hash algorithm version when listing by hash. - * @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 a paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String name, String orderBy, Integer top, String skip, String hash, String hashVersion, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, workspaceName, name, - this.client.getApiVersion(), orderBy, top, skip, hash, hashVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. - * @param hashVersion Hash algorithm version when listing by hash. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, String hash, String hashVersion) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final String hash = null; - final String hashVersion = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. - * @param hashVersion Hash algorithm version when listing by hash. - * @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 a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, String hash, String hashVersion, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, - hash, hashVersion, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final String hash = null; - final String hashVersion = null; - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. - * @param hashVersion Hash algorithm version when listing by hash. - * @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 a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, String hash, String hashVersion, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion, context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, - workspaceName, name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, workspaceName, - name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name, - String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, CodeVersionInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, CodeVersionInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - String version, CodeVersionInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, String version, CodeVersionInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - CodeVersionInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) - .getValue(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body) { - Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body, Context context) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono publishAsync(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body) { - return beginPublishAsync(resourceGroupName, workspaceName, name, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono publishAsync(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - return beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body) { - publishAsync(resourceGroupName, workspaceName, name, version, body).block(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - publishAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrGetStartPendingUploadWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, PendingUploadRequestDto body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrGetStartPendingUpload(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, - this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrGetStartPendingUploadWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, PendingUploadRequestDto body, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrGetStartPendingUpload(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrGetStartPendingUploadAsync(String resourceGroupName, - String workspaceName, String name, String version, PendingUploadRequestDto body) { - return createOrGetStartPendingUploadWithResponseAsync(resourceGroupName, workspaceName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, - String workspaceName, String name, String version, PendingUploadRequestDto body, Context context) { - return createOrGetStartPendingUploadWithResponseAsync(resourceGroupName, workspaceName, name, version, body, - context).block(); - } - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PendingUploadResponseDtoInner createOrGetStartPendingUpload(String resourceGroupName, String workspaceName, - String name, String version, PendingUploadRequestDto body) { - return createOrGetStartPendingUploadWithResponse(resourceGroupName, workspaceName, name, version, body, - Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeVersion entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsImpl.java deleted file mode 100644 index bb1942b7ee99..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsImpl.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.machinelearning.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.machinelearning.fluent.CodeVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; -import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.CodeVersion; -import com.azure.resourcemanager.machinelearning.models.CodeVersions; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; -import com.azure.resourcemanager.machinelearning.models.PendingUploadResponseDto; - -public final class CodeVersionsImpl implements CodeVersions { - private static final ClientLogger LOGGER = new ClientLogger(CodeVersionsImpl.class); - - private final CodeVersionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public CodeVersionsImpl(CodeVersionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, - Integer top, String skip, String hash, String hashVersion, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); - } - - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CodeVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CodeVersion get(String resourceGroupName, String workspaceName, String name, String version) { - CodeVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new CodeVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body) { - this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body); - } - - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body, context); - } - - public Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, - String workspaceName, String name, String version, PendingUploadRequestDto body, Context context) { - Response inner = this.serviceClient() - .createOrGetStartPendingUploadWithResponse(resourceGroupName, workspaceName, name, version, body, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PendingUploadResponseDtoImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PendingUploadResponseDto createOrGetStartPendingUpload(String resourceGroupName, String workspaceName, - String name, String version, PendingUploadRequestDto body) { - PendingUploadResponseDtoInner inner - = this.serviceClient().createOrGetStartPendingUpload(resourceGroupName, workspaceName, name, version, body); - if (inner != null) { - return new PendingUploadResponseDtoImpl(inner, this.manager()); - } else { - return null; - } - } - - public CodeVersion getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - private CodeVersionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public CodeVersionImpl define(String name) { - return new CodeVersionImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java deleted file mode 100644 index 5fab8426172d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; - -public final class ComponentContainerImpl - implements ComponentContainer, ComponentContainer.Definition, ComponentContainer.Update { - private ComponentContainerInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ComponentContainerProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ComponentContainerInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public ComponentContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public ComponentContainer create() { - this.innerObject = serviceManager.serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ComponentContainer create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - ComponentContainerImpl(String name, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ComponentContainerInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public ComponentContainerImpl update() { - return this; - } - - public ComponentContainer apply() { - this.innerObject = serviceManager.serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ComponentContainer apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - ComponentContainerImpl(ComponentContainerInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "components"); - } - - public ComponentContainer refresh() { - this.innerObject = serviceManager.serviceClient() - .getComponentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public ComponentContainer refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getComponentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public ComponentContainerImpl withProperties(ComponentContainerProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java deleted file mode 100644 index a8089666e0ec..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java +++ /dev/null @@ -1,749 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ComponentContainersClient. - */ -public final class ComponentContainersClientImpl implements ComponentContainersClient { - /** - * The proxy service used to perform REST calls. - */ - private final ComponentContainersService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of ComponentContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ComponentContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(ComponentContainersService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesComponentContainers to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface ComponentContainersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ComponentContainerInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, ListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, ListViewType listViewType, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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, workspaceName, - this.client.getApiVersion(), skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType)); - } - - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, context)); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, workspaceName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentContainerInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, ComponentContainerInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, ComponentContainerInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, ComponentContainerInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, ComponentContainerInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ComponentContainerInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersImpl.java deleted file mode 100644 index b5fddfcb84d1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersImpl.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.ComponentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import com.azure.resourcemanager.machinelearning.models.ComponentContainers; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -public final class ComponentContainersImpl implements ComponentContainers { - private static final ClientLogger LOGGER = new ClientLogger(ComponentContainersImpl.class); - - private final ComponentContainersClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public ComponentContainersImpl(ComponentContainersClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); - } - - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComponentContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ComponentContainer get(String resourceGroupName, String workspaceName, String name) { - ComponentContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new ComponentContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public ComponentContainer getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - private ComponentContainersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public ComponentContainerImpl define(String name) { - return new ComponentContainerImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java deleted file mode 100644 index e1092e8d81ec..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; - -public final class ComponentVersionImpl - implements ComponentVersion, ComponentVersion.Definition, ComponentVersion.Update { - private ComponentVersionInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ComponentVersionProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ComponentVersionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - private String version; - - public ComponentVersionImpl withExistingComponent(String resourceGroupName, String workspaceName, String name) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; - return this; - } - - public ComponentVersion create() { - this.innerObject = serviceManager.serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public ComponentVersion create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - ComponentVersionImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ComponentVersionInner(); - this.serviceManager = serviceManager; - this.version = name; - } - - public ComponentVersionImpl update() { - return this; - } - - public ComponentVersion apply() { - this.innerObject = serviceManager.serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public ComponentVersion apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - ComponentVersionImpl(ComponentVersionInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "components"); - this.version = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "versions"); - } - - public ComponentVersion refresh() { - this.innerObject = serviceManager.serviceClient() - .getComponentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); - return this; - } - - public ComponentVersion refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getComponentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); - return this; - } - - public void publish(DestinationAsset body) { - serviceManager.componentVersions().publish(resourceGroupName, workspaceName, name, version, body); - } - - public void publish(DestinationAsset body, Context context) { - serviceManager.componentVersions().publish(resourceGroupName, workspaceName, name, version, body, context); - } - - public ComponentVersionImpl withProperties(ComponentVersionProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.java deleted file mode 100644 index 0f38d5ff1acf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.java +++ /dev/null @@ -1,1098 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.ComponentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -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 ComponentVersionsClient. - */ -public final class ComponentVersionsClientImpl implements ComponentVersionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ComponentVersionsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of ComponentVersionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ComponentVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(ComponentVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesComponentVersions to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface ComponentVersionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ComponentVersionInner body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}/publish") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> publish(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DestinationAsset body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String orderBy, Integer top, String skip, ListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), orderBy, top, skip, listViewType, - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String orderBy, Integer top, String skip, ListViewType listViewType, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, workspaceName, name, - this.client.getApiVersion(), orderBy, top, skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, - listViewType, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType)); - } - - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, - workspaceName, name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, workspaceName, - name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name, - String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, ComponentVersionInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, ComponentVersionInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - String version, ComponentVersionInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, String version, ComponentVersionInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, ComponentVersionInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) - .getValue(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body) { - Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body, Context context) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono publishAsync(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body) { - return beginPublishAsync(resourceGroupName, workspaceName, name, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono publishAsync(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - return beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body) { - publishAsync(resourceGroupName, workspaceName, name, version, body).block(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - publishAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsImpl.java deleted file mode 100644 index e224fb8fd311..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsImpl.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.ComponentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import com.azure.resourcemanager.machinelearning.models.ComponentVersions; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -public final class ComponentVersionsImpl implements ComponentVersions { - private static final ClientLogger LOGGER = new ClientLogger(ComponentVersionsImpl.class); - - private final ComponentVersionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public ComponentVersionsImpl(ComponentVersionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); - } - - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComponentVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ComponentVersion get(String resourceGroupName, String workspaceName, String name, String version) { - ComponentVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new ComponentVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body) { - this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body); - } - - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body, context); - } - - public ComponentVersion getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - private ComponentVersionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public ComponentVersionImpl define(String name) { - return new ComponentVersionImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.java deleted file mode 100644 index 89ef140519cf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.http.rest.PagedIterable; -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.machinelearning.fluent.models.ComputeResourceInner; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; -import com.azure.resourcemanager.machinelearning.models.ClusterUpdateParameters; -import com.azure.resourcemanager.machinelearning.models.Compute; -import com.azure.resourcemanager.machinelearning.models.ComputeResource; -import com.azure.resourcemanager.machinelearning.models.ComputeSecrets; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.util.Collections; -import java.util.Map; - -public final class ComputeResourceImpl implements ComputeResource, ComputeResource.Definition, ComputeResource.Update { - private ComputeResourceInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - 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 Sku sku() { - return this.innerModel().sku(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Compute properties() { - return this.innerModel().properties(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ComputeResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String computeName; - - private ClusterUpdateParameters updateParameters; - - public ComputeResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public ComputeResource create() { - this.innerObject = serviceManager.serviceClient() - .getComputes() - .createOrUpdate(resourceGroupName, workspaceName, computeName, this.innerModel(), Context.NONE); - return this; - } - - public ComputeResource create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getComputes() - .createOrUpdate(resourceGroupName, workspaceName, computeName, this.innerModel(), context); - return this; - } - - ComputeResourceImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ComputeResourceInner(); - this.serviceManager = serviceManager; - this.computeName = name; - } - - public ComputeResourceImpl update() { - this.updateParameters = new ClusterUpdateParameters(); - return this; - } - - public ComputeResource apply() { - this.innerObject = serviceManager.serviceClient() - .getComputes() - .update(resourceGroupName, workspaceName, computeName, updateParameters, Context.NONE); - return this; - } - - public ComputeResource apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getComputes() - .update(resourceGroupName, workspaceName, computeName, updateParameters, context); - return this; - } - - ComputeResourceImpl(ComputeResourceInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.computeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "computes"); - } - - public ComputeResource refresh() { - this.innerObject = serviceManager.serviceClient() - .getComputes() - .getWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE) - .getValue(); - return this; - } - - public ComputeResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getComputes() - .getWithResponse(resourceGroupName, workspaceName, computeName, context) - .getValue(); - return this; - } - - public PagedIterable listNodes() { - return serviceManager.computes().listNodes(resourceGroupName, workspaceName, computeName); - } - - public PagedIterable listNodes(Context context) { - return serviceManager.computes().listNodes(resourceGroupName, workspaceName, computeName, context); - } - - public Response listKeysWithResponse(Context context) { - return serviceManager.computes().listKeysWithResponse(resourceGroupName, workspaceName, computeName, context); - } - - public ComputeSecrets listKeys() { - return serviceManager.computes().listKeys(resourceGroupName, workspaceName, computeName); - } - - public void start() { - serviceManager.computes().start(resourceGroupName, workspaceName, computeName); - } - - public void start(Context context) { - serviceManager.computes().start(resourceGroupName, workspaceName, computeName, context); - } - - public void stop() { - serviceManager.computes().stop(resourceGroupName, workspaceName, computeName); - } - - public void stop(Context context) { - serviceManager.computes().stop(resourceGroupName, workspaceName, computeName, context); - } - - public void restart() { - serviceManager.computes().restart(resourceGroupName, workspaceName, computeName); - } - - public void restart(Context context) { - serviceManager.computes().restart(resourceGroupName, workspaceName, computeName, context); - } - - public ComputeResourceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ComputeResourceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ComputeResourceImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public ComputeResourceImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public ComputeResourceImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public ComputeResourceImpl withProperties(Compute properties) { - this.innerModel().withProperties(properties); - return this; - } - - public ComputeResourceImpl withProperties(ScaleSettingsInformation properties) { - this.updateParameters.withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeSecretsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeSecretsImpl.java deleted file mode 100644 index d27df3a916c5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeSecretsImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; -import com.azure.resourcemanager.machinelearning.models.ComputeSecrets; -import com.azure.resourcemanager.machinelearning.models.ComputeType; - -public final class ComputeSecretsImpl implements ComputeSecrets { - private ComputeSecretsInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - ComputeSecretsImpl(ComputeSecretsInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public ComputeType computeType() { - return this.innerModel().computeType(); - } - - public ComputeSecretsInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesClientImpl.java deleted file mode 100644 index b08cb2b83e5c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesClientImpl.java +++ /dev/null @@ -1,2345 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.ComputesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodesInformation; -import com.azure.resourcemanager.machinelearning.models.ClusterUpdateParameters; -import com.azure.resourcemanager.machinelearning.models.PaginatedComputeResourcesList; -import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; -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 ComputesClient. - */ -public final class ComputesClientImpl implements ComputesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ComputesService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of ComputesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ComputesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(ComputesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesComputes to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface ComputesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ComputeResourceInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ClusterUpdateParameters parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @QueryParam("underlyingResourceAction") UnderlyingResourceAction underlyingResourceAction, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNodes(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stop(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restart(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNodesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 computes in specified workspace along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, 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())); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 computes in specified workspace along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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, workspaceName, - this.client.getApiVersion(), skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 computes in specified workspace as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 computes in specified workspace as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 computes in specified workspace as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 computes in specified workspace as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 computes in specified workspace as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, context)); - } - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 compute definition by its name along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 compute definition by its name along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName 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, workspaceName, - computeName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 compute definition by its name on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String computeName) { - return getWithResponseAsync(resourceGroupName, workspaceName, computeName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 compute definition by its name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, computeName, context).block(); - } - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 compute definition by its name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner get(String resourceGroupName, String workspaceName, String computeName) { - return getWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE).getValue(); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @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 machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String computeName, ComputeResourceInner parameters) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), parameters, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @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 machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String computeName, ComputeResourceInner parameters, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComputeResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ComputeResourceInner.class, ComputeResourceInner.class, this.client.getContext()); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComputeResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ComputeResourceInner.class, ComputeResourceInner.class, context); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).getSyncPoller(); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context) - .getSyncPoller(); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @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 machine Learning compute object wrapped into ARM resource envelope on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String computeName, ComputeResourceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @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 machine Learning compute object wrapped into ARM resource envelope on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String computeName, ComputeResourceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @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 machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String computeName, - ComputeResourceInner parameters) { - return createOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).block(); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @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 machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String computeName, - ComputeResourceInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context).block(); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @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 machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, ClusterUpdateParameters parameters) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @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 machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, ClusterUpdateParameters parameters, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComputeResourceInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ComputeResourceInner.class, ComputeResourceInner.class, this.client.getContext()); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComputeResourceInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ComputeResourceInner.class, ComputeResourceInner.class, context); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeResourceInner> beginUpdate(String resourceGroupName, - String workspaceName, String computeName, ClusterUpdateParameters parameters) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).getSyncPoller(); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeResourceInner> beginUpdate(String resourceGroupName, - String workspaceName, String computeName, ClusterUpdateParameters parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context) - .getSyncPoller(); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @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 machine Learning compute object wrapped into ARM resource envelope on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String computeName, - ClusterUpdateParameters parameters) { - return beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @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 machine Learning compute object wrapped into ARM resource envelope on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String computeName, - ClusterUpdateParameters parameters, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @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 machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner update(String resourceGroupName, String workspaceName, String computeName, - ClusterUpdateParameters parameters) { - return updateAsync(resourceGroupName, workspaceName, computeName, parameters).block(); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @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 machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner update(String resourceGroupName, String workspaceName, String computeName, - ClusterUpdateParameters parameters, Context context) { - return updateAsync(resourceGroupName, workspaceName, computeName, parameters, context).block(); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (underlyingResourceAction == null) { - return Mono.error( - new IllegalArgumentException("Parameter underlyingResourceAction is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), underlyingResourceAction, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (underlyingResourceAction == null) { - return Mono.error( - new IllegalArgumentException("Parameter underlyingResourceAction 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, - workspaceName, computeName, this.client.getApiVersion(), underlyingResourceAction, accept, context); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction) - .getSyncPoller(); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context) - .getSyncPoller(); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction) { - return beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction) { - deleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction).block(); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction, Context context) { - deleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context).block(); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 details (e.g IP address, port etc) of all the compute nodes in the compute along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNodesSinglePageAsync(String resourceGroupName, - String workspaceName, String computeName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNodes(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().nodes(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 details (e.g IP address, port etc) of all the compute nodes in the compute along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNodesSinglePageAsync(String resourceGroupName, - String workspaceName, String computeName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNodes(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - computeName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().nodes(), res.getValue().nextLink(), null)); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listNodesAsync(String resourceGroupName, String workspaceName, - String computeName) { - return new PagedFlux<>(() -> listNodesSinglePageAsync(resourceGroupName, workspaceName, computeName), - nextLink -> listNodesNextSinglePageAsync(nextLink)); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listNodesAsync(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return new PagedFlux<>(() -> listNodesSinglePageAsync(resourceGroupName, workspaceName, computeName, context), - nextLink -> listNodesNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listNodes(String resourceGroupName, String workspaceName, - String computeName) { - return new PagedIterable<>(listNodesAsync(resourceGroupName, workspaceName, computeName)); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listNodes(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return new PagedIterable<>(listNodesAsync(resourceGroupName, workspaceName, computeName, context)); - } - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 secrets related to Machine Learning compute (storage keys, service credentials, etc) along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String computeName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 secrets related to Machine Learning compute (storage keys, service credentials, etc) along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String computeName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 secrets related to Machine Learning compute (storage keys, service credentials, etc) on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listKeysAsync(String resourceGroupName, String workspaceName, - String computeName) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, computeName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 secrets related to Machine Learning compute (storage keys, service credentials, etc) along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, computeName, context).block(); - } - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeSecretsInner listKeys(String resourceGroupName, String workspaceName, String computeName) { - return listKeysWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE).getValue(); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.start(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.start(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), accept, context); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStartAsync(String resourceGroupName, String workspaceName, - String computeName) { - Mono>> mono = startWithResponseAsync(resourceGroupName, workspaceName, computeName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStartAsync(String resourceGroupName, String workspaceName, - String computeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = startWithResponseAsync(resourceGroupName, workspaceName, computeName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStart(String resourceGroupName, String workspaceName, - String computeName) { - return this.beginStartAsync(resourceGroupName, workspaceName, computeName).getSyncPoller(); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStart(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return this.beginStartAsync(resourceGroupName, workspaceName, computeName, context).getSyncPoller(); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String workspaceName, String computeName) { - return beginStartAsync(resourceGroupName, workspaceName, computeName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String workspaceName, String computeName, Context context) { - return beginStartAsync(resourceGroupName, workspaceName, computeName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String resourceGroupName, String workspaceName, String computeName) { - startAsync(resourceGroupName, workspaceName, computeName).block(); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String resourceGroupName, String workspaceName, String computeName, Context context) { - startAsync(resourceGroupName, workspaceName, computeName, context).block(); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), accept, context); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStopAsync(String resourceGroupName, String workspaceName, - String computeName) { - Mono>> mono = stopWithResponseAsync(resourceGroupName, workspaceName, computeName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStopAsync(String resourceGroupName, String workspaceName, - String computeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = stopWithResponseAsync(resourceGroupName, workspaceName, computeName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStop(String resourceGroupName, String workspaceName, - String computeName) { - return this.beginStopAsync(resourceGroupName, workspaceName, computeName).getSyncPoller(); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStop(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return this.beginStopAsync(resourceGroupName, workspaceName, computeName, context).getSyncPoller(); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceGroupName, String workspaceName, String computeName) { - return beginStopAsync(resourceGroupName, workspaceName, computeName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceGroupName, String workspaceName, String computeName, Context context) { - return beginStopAsync(resourceGroupName, workspaceName, computeName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String resourceGroupName, String workspaceName, String computeName) { - stopAsync(resourceGroupName, workspaceName, computeName).block(); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String resourceGroupName, String workspaceName, String computeName, Context context) { - stopAsync(resourceGroupName, workspaceName, computeName, context).block(); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restartWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restartWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.restart(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), accept, context); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestartAsync(String resourceGroupName, String workspaceName, - String computeName) { - Mono>> mono = restartWithResponseAsync(resourceGroupName, workspaceName, computeName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestartAsync(String resourceGroupName, String workspaceName, - String computeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = restartWithResponseAsync(resourceGroupName, workspaceName, computeName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestart(String resourceGroupName, String workspaceName, - String computeName) { - return this.beginRestartAsync(resourceGroupName, workspaceName, computeName).getSyncPoller(); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestart(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return this.beginRestartAsync(resourceGroupName, workspaceName, computeName, context).getSyncPoller(); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restartAsync(String resourceGroupName, String workspaceName, String computeName) { - return beginRestartAsync(resourceGroupName, workspaceName, computeName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restartAsync(String resourceGroupName, String workspaceName, String computeName, - Context context) { - return beginRestartAsync(resourceGroupName, workspaceName, computeName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void restart(String resourceGroupName, String workspaceName, String computeName) { - restartAsync(resourceGroupName, workspaceName, computeName).block(); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void restart(String resourceGroupName, String workspaceName, String computeName, Context context) { - restartAsync(resourceGroupName, workspaceName, computeName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Machine Learning compute objects wrapped in ARM resource envelope along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Machine Learning compute objects wrapped in ARM resource envelope 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)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of AmlCompute Nodes along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNodesNextSinglePageAsync(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.listNodesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().nodes(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of AmlCompute Nodes along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNodesNextSinglePageAsync(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.listNodesNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().nodes(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesImpl.java deleted file mode 100644 index ceab9a7511a8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesImpl.java +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.ComputesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; -import com.azure.resourcemanager.machinelearning.models.ComputeResource; -import com.azure.resourcemanager.machinelearning.models.Computes; -import com.azure.resourcemanager.machinelearning.models.ComputeSecrets; -import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; - -public final class ComputesImpl implements Computes { - private static final ClientLogger LOGGER = new ClientLogger(ComputesImpl.class); - - private final ComputesClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public ComputesImpl(ComputesClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComputeResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComputeResourceImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String computeName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, computeName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComputeResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ComputeResource get(String resourceGroupName, String workspaceName, String computeName) { - ComputeResourceInner inner = this.serviceClient().get(resourceGroupName, workspaceName, computeName); - if (inner != null) { - return new ComputeResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction) { - this.serviceClient().delete(resourceGroupName, workspaceName, computeName, underlyingResourceAction); - } - - public void delete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context); - } - - public PagedIterable listNodes(String resourceGroupName, String workspaceName, - String computeName) { - return this.serviceClient().listNodes(resourceGroupName, workspaceName, computeName); - } - - public PagedIterable listNodes(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return this.serviceClient().listNodes(resourceGroupName, workspaceName, computeName, context); - } - - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, - String computeName, Context context) { - Response inner - = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, computeName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComputeSecretsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ComputeSecrets listKeys(String resourceGroupName, String workspaceName, String computeName) { - ComputeSecretsInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName, computeName); - if (inner != null) { - return new ComputeSecretsImpl(inner, this.manager()); - } else { - return null; - } - } - - public void start(String resourceGroupName, String workspaceName, String computeName) { - this.serviceClient().start(resourceGroupName, workspaceName, computeName); - } - - public void start(String resourceGroupName, String workspaceName, String computeName, Context context) { - this.serviceClient().start(resourceGroupName, workspaceName, computeName, context); - } - - public void stop(String resourceGroupName, String workspaceName, String computeName) { - this.serviceClient().stop(resourceGroupName, workspaceName, computeName); - } - - public void stop(String resourceGroupName, String workspaceName, String computeName, Context context) { - this.serviceClient().stop(resourceGroupName, workspaceName, computeName, context); - } - - public void restart(String resourceGroupName, String workspaceName, String computeName) { - this.serviceClient().restart(resourceGroupName, workspaceName, computeName); - } - - public void restart(String resourceGroupName, String workspaceName, String computeName, Context context) { - this.serviceClient().restart(resourceGroupName, workspaceName, computeName, context); - } - - public ComputeResource getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String computeName = ResourceManagerUtils.getValueFromIdByName(id, "computes"); - if (computeName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'computes'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String computeName = ResourceManagerUtils.getValueFromIdByName(id, "computes"); - if (computeName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'computes'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, computeName, context); - } - - private ComputesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public ComputeResourceImpl define(String name) { - return new ComputeResourceImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java deleted file mode 100644 index c64667ba9a2e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.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.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; - -public final class DataContainerImpl implements DataContainer, DataContainer.Definition, DataContainer.Update { - private DataContainerInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public DataContainerProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DataContainerInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public DataContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public DataContainer create() { - this.innerObject = serviceManager.serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public DataContainer create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - DataContainerImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new DataContainerInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public DataContainerImpl update() { - return this; - } - - public DataContainer apply() { - this.innerObject = serviceManager.serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public DataContainer apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - DataContainerImpl(DataContainerInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "data"); - } - - public DataContainer refresh() { - this.innerObject = serviceManager.serviceClient() - .getDataContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public DataContainer refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDataContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public DataContainerImpl withProperties(DataContainerProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java deleted file mode 100644 index 685436988041..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java +++ /dev/null @@ -1,749 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.DataContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainerResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in DataContainersClient. - */ -public final class DataContainersClientImpl implements DataContainersClient { - /** - * The proxy service used to perform REST calls. - */ - private final DataContainersService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of DataContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DataContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(DataContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesDataContainers to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface DataContainersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DataContainerInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, ListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, ListViewType listViewType, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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, workspaceName, - this.client.getApiVersion(), skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType)); - } - - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, context)); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, workspaceName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataContainerInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, DataContainerInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, DataContainerInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - DataContainerInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, DataContainerInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - DataContainerInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersImpl.java deleted file mode 100644 index 863435b62704..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersImpl.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.DataContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataContainers; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -public final class DataContainersImpl implements DataContainers { - private static final ClientLogger LOGGER = new ClientLogger(DataContainersImpl.class); - - private final DataContainersClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public DataContainersImpl(DataContainersClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); - } - - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DataContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DataContainer get(String resourceGroupName, String workspaceName, String name) { - DataContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new DataContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public DataContainer getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "data"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "data"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "data"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "data"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - private DataContainersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public DataContainerImpl define(String name) { - return new DataContainerImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java deleted file mode 100644 index 816fc0dbc6f7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.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.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; - -public final class DataVersionBaseImpl implements DataVersionBase, DataVersionBase.Definition, DataVersionBase.Update { - private DataVersionBaseInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public DataVersionBaseProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DataVersionBaseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - private String version; - - public DataVersionBaseImpl withExistingData(String resourceGroupName, String workspaceName, String name) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; - return this; - } - - public DataVersionBase create() { - this.innerObject = serviceManager.serviceClient() - .getDataVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public DataVersionBase create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDataVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - DataVersionBaseImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new DataVersionBaseInner(); - this.serviceManager = serviceManager; - this.version = name; - } - - public DataVersionBaseImpl update() { - return this; - } - - public DataVersionBase apply() { - this.innerObject = serviceManager.serviceClient() - .getDataVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public DataVersionBase apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDataVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - DataVersionBaseImpl(DataVersionBaseInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "data"); - this.version = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "versions"); - } - - public DataVersionBase refresh() { - this.innerObject = serviceManager.serviceClient() - .getDataVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); - return this; - } - - public DataVersionBase refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDataVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); - return this; - } - - public void publish(DestinationAsset body) { - serviceManager.dataVersions().publish(resourceGroupName, workspaceName, name, version, body); - } - - public void publish(DestinationAsset body, Context context) { - serviceManager.dataVersions().publish(resourceGroupName, workspaceName, name, version, body, context); - } - - public DataVersionBaseImpl withProperties(DataVersionBaseProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java deleted file mode 100644 index b795ed9d26d6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java +++ /dev/null @@ -1,1117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.DataVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -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 DataVersionsClient. - */ -public final class DataVersionsClientImpl implements DataVersionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final DataVersionsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of DataVersionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DataVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(DataVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesDataVersions to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface DataVersionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, - @QueryParam("$tags") String tags, @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DataVersionBaseInner body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}/publish") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> publish(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DestinationAsset body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String orderBy, Integer top, String skip, String tags, - ListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), orderBy, top, skip, tags, - listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @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 a paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String orderBy, Integer top, String skip, String tags, - ListViewType listViewType, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, workspaceName, name, - this.client.getApiVersion(), orderBy, top, skip, tags, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @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 a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, - tags, listViewType, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @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 a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, - workspaceName, name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, workspaceName, - name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name, - String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataVersionBaseInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, DataVersionBaseInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, DataVersionBaseInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - String version, DataVersionBaseInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, String version, DataVersionBaseInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataVersionBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, DataVersionBaseInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) - .getValue(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body) { - Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body, Context context) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono publishAsync(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body) { - return beginPublishAsync(resourceGroupName, workspaceName, name, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono publishAsync(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - return beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body) { - publishAsync(resourceGroupName, workspaceName, name, version, body).block(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - publishAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsImpl.java deleted file mode 100644 index 3907bbab9123..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsImpl.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.DataVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import com.azure.resourcemanager.machinelearning.models.DataVersions; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -public final class DataVersionsImpl implements DataVersions { - private static final ClientLogger LOGGER = new ClientLogger(DataVersionsImpl.class); - - private final DataVersionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public DataVersionsImpl(DataVersionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); - } - - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DataVersionBaseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DataVersionBase get(String resourceGroupName, String workspaceName, String name, String version) { - DataVersionBaseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new DataVersionBaseImpl(inner, this.manager()); - } else { - return null; - } - } - - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body) { - this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body); - } - - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body, context); - } - - public DataVersionBase getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "data"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "data"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "data"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "data"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - private DataVersionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public DataVersionBaseImpl define(String name) { - return new DataVersionBaseImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java deleted file mode 100644 index 5aa80a944ac6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.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.machinelearning.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; -import com.azure.resourcemanager.machinelearning.models.Datastore; -import com.azure.resourcemanager.machinelearning.models.DatastoreProperties; -import com.azure.resourcemanager.machinelearning.models.DatastoreSecrets; - -public final class DatastoreImpl implements Datastore, Datastore.Definition, Datastore.Update { - private DatastoreInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public DatastoreProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DatastoreInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - private Boolean createSkipValidation; - - private Boolean updateSkipValidation; - - public DatastoreImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public Datastore create() { - this.innerObject = serviceManager.serviceClient() - .getDatastores() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), createSkipValidation, - Context.NONE) - .getValue(); - return this; - } - - public Datastore create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDatastores() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), createSkipValidation, - context) - .getValue(); - return this; - } - - DatastoreImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new DatastoreInner(); - this.serviceManager = serviceManager; - this.name = name; - this.createSkipValidation = null; - } - - public DatastoreImpl update() { - this.updateSkipValidation = null; - return this; - } - - public Datastore apply() { - this.innerObject = serviceManager.serviceClient() - .getDatastores() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), updateSkipValidation, - Context.NONE) - .getValue(); - return this; - } - - public Datastore apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDatastores() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), updateSkipValidation, - context) - .getValue(); - return this; - } - - DatastoreImpl(DatastoreInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "datastores"); - } - - public Datastore refresh() { - this.innerObject = serviceManager.serviceClient() - .getDatastores() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public Datastore refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDatastores() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public Response listSecretsWithResponse(Context context) { - return serviceManager.datastores().listSecretsWithResponse(resourceGroupName, workspaceName, name, context); - } - - public DatastoreSecrets listSecrets() { - return serviceManager.datastores().listSecrets(resourceGroupName, workspaceName, name); - } - - public DatastoreImpl withProperties(DatastoreProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public DatastoreImpl withSkipValidation(Boolean skipValidation) { - if (isInCreateMode()) { - this.createSkipValidation = skipValidation; - return this; - } else { - this.updateSkipValidation = skipValidation; - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreSecretsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreSecretsImpl.java deleted file mode 100644 index e54cb14dbd11..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreSecretsImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import com.azure.resourcemanager.machinelearning.models.DatastoreSecrets; -import com.azure.resourcemanager.machinelearning.models.SecretsType; - -public final class DatastoreSecretsImpl implements DatastoreSecrets { - private DatastoreSecretsInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - DatastoreSecretsImpl(DatastoreSecretsInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public SecretsType secretsType() { - return this.innerModel().secretsType(); - } - - public DatastoreSecretsInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresClientImpl.java deleted file mode 100644 index 98b657dec320..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresClientImpl.java +++ /dev/null @@ -1,955 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.DatastoresClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import com.azure.resourcemanager.machinelearning.models.DatastoreResourceArmPaginatedResult; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in DatastoresClient. - */ -public final class DatastoresClientImpl implements DatastoresClient { - /** - * The proxy service used to perform REST calls. - */ - private final DatastoresService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of DatastoresClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DatastoresClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(DatastoresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesDatastores to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface DatastoresService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("count") Integer count, @QueryParam("isDefault") Boolean isDefault, - @QueryParam("names") String names, @QueryParam("searchText") String searchText, - @QueryParam("orderBy") String orderBy, @QueryParam("orderByAsc") Boolean orderByAsc, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("skipValidation") Boolean skipValidation, @BodyParam("application/json") DatastoreInner body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSecrets(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, Integer count, Boolean isDefault, List names, String searchText, String orderBy, - Boolean orderByAsc) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - String namesConverted = (names == null) - ? null - : names.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, count, isDefault, namesConverted, - searchText, orderBy, orderByAsc, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @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 a paginated list of Datastore entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, Integer count, Boolean isDefault, List names, String searchText, String orderBy, - Boolean orderByAsc, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - String namesConverted = (names == null) - ? null - : names.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), skip, count, isDefault, namesConverted, searchText, orderBy, orderByAsc, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - Integer count, Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, isDefault, - names, searchText, orderBy, orderByAsc), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final Integer count = null; - final Boolean isDefault = null; - final List names = null; - final String searchText = null; - final String orderBy = null; - final Boolean orderByAsc = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, isDefault, - names, searchText, orderBy, orderByAsc), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @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 a paginated list of Datastore entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - Integer count, Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, isDefault, - names, searchText, orderBy, orderByAsc, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final Integer count = null; - final Boolean isDefault = null; - final List names = null; - final String searchText = null; - final String orderBy = null; - final Boolean orderByAsc = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count, isDefault, names, - searchText, orderBy, orderByAsc)); - } - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @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 a paginated list of Datastore entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Integer count, Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count, isDefault, names, - searchText, orderBy, orderByAsc, context)); - } - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, workspaceName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatastoreInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Create or update datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @param skipValidation Flag to skip validation. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, DatastoreInner body, Boolean skipValidation) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), skipValidation, body, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @param skipValidation Flag to skip validation. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, DatastoreInner body, Boolean skipValidation, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), skipValidation, body, accept, context); - } - - /** - * Create or update datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - DatastoreInner body) { - final Boolean skipValidation = null; - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, skipValidation) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @param skipValidation Flag to skip validation. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, DatastoreInner body, Boolean skipValidation, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, skipValidation, context) - .block(); - } - - /** - * Create or update datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatastoreInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - DatastoreInner body) { - final Boolean skipValidation = null; - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, skipValidation, Context.NONE) - .getValue(); - } - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore secrets along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync(String resourceGroupName, - String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore secrets along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync(String resourceGroupName, - String workspaceName, String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore secrets on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listSecretsAsync(String resourceGroupName, String workspaceName, String name) { - return listSecretsWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore secrets along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - return listSecretsWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore secrets. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatastoreSecretsInner listSecrets(String resourceGroupName, String workspaceName, String name) { - return listSecretsWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresImpl.java deleted file mode 100644 index fa7812fdde1c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresImpl.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.machinelearning.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.machinelearning.fluent.DatastoresClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import com.azure.resourcemanager.machinelearning.models.Datastore; -import com.azure.resourcemanager.machinelearning.models.Datastores; -import com.azure.resourcemanager.machinelearning.models.DatastoreSecrets; -import java.util.List; - -public final class DatastoresImpl implements Datastores { - private static final ClientLogger LOGGER = new ClientLogger(DatastoresImpl.class); - - private final DatastoresClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public DatastoresImpl(DatastoresClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, - Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, skip, count, isDefault, names, searchText, orderBy, orderByAsc, - context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); - } - - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DatastoreImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Datastore get(String resourceGroupName, String workspaceName, String name) { - DatastoreInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new DatastoreImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listSecretsWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - Response inner - = this.serviceClient().listSecretsWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DatastoreSecretsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DatastoreSecrets listSecrets(String resourceGroupName, String workspaceName, String name) { - DatastoreSecretsInner inner = this.serviceClient().listSecrets(resourceGroupName, workspaceName, name); - if (inner != null) { - return new DatastoreSecretsImpl(inner, this.manager()); - } else { - return null; - } - } - - public Datastore getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "datastores"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "datastores"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "datastores"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "datastores"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - private DatastoresClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public DatastoreImpl define(String name) { - return new DatastoreImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeploymentLogsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeploymentLogsImpl.java deleted file mode 100644 index c4e57feffea9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeploymentLogsImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogs; - -public final class DeploymentLogsImpl implements DeploymentLogs { - private DeploymentLogsInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - DeploymentLogsImpl(DeploymentLogsInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String content() { - return this.innerModel().content(); - } - - public DeploymentLogsInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DiagnoseResponseResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DiagnoseResponseResultImpl.java deleted file mode 100644 index 887a49f6b5cc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DiagnoseResponseResultImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.DiagnoseResponseResultInner; -import com.azure.resourcemanager.machinelearning.models.DiagnoseResponseResult; -import com.azure.resourcemanager.machinelearning.models.DiagnoseResponseResultValue; - -public final class DiagnoseResponseResultImpl implements DiagnoseResponseResult { - private DiagnoseResponseResultInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - DiagnoseResponseResultImpl(DiagnoseResponseResultInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public DiagnoseResponseResultValue value() { - return this.innerModel().value(); - } - - public DiagnoseResponseResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthKeysImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthKeysImpl.java deleted file mode 100644 index d407a063e1c6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthKeysImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthKeys; - -public final class EndpointAuthKeysImpl implements EndpointAuthKeys { - private EndpointAuthKeysInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - EndpointAuthKeysImpl(EndpointAuthKeysInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String primaryKey() { - return this.innerModel().primaryKey(); - } - - public String secondaryKey() { - return this.innerModel().secondaryKey(); - } - - public EndpointAuthKeysInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthTokenImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthTokenImpl.java deleted file mode 100644 index 9746d7e9d794..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthTokenImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthToken; - -public final class EndpointAuthTokenImpl implements EndpointAuthToken { - private EndpointAuthTokenInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - EndpointAuthTokenImpl(EndpointAuthTokenInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String accessToken() { - return this.innerModel().accessToken(); - } - - public String tokenType() { - return this.innerModel().tokenType(); - } - - public Long expiryTimeUtc() { - return this.innerModel().expiryTimeUtc(); - } - - public Long refreshAfterTimeUtc() { - return this.innerModel().refreshAfterTimeUtc(); - } - - public EndpointAuthTokenInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointPropertiesBaseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointPropertiesBaseImpl.java deleted file mode 100644 index a9770051f489..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointPropertiesBaseImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointPropertiesBaseInner; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthKeys; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.EndpointPropertiesBase; -import java.util.Collections; -import java.util.Map; - -public final class EndpointPropertiesBaseImpl implements EndpointPropertiesBase { - private EndpointPropertiesBaseInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - EndpointPropertiesBaseImpl(EndpointPropertiesBaseInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String description() { - return this.innerModel().description(); - } - - public Map properties() { - Map inner = this.innerModel().properties(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public String scoringUri() { - return this.innerModel().scoringUri(); - } - - public String swaggerUri() { - return this.innerModel().swaggerUri(); - } - - public EndpointAuthMode authMode() { - return this.innerModel().authMode(); - } - - public EndpointAuthKeys keys() { - EndpointAuthKeysInner inner = this.innerModel().keys(); - if (inner != null) { - return new EndpointAuthKeysImpl(inner, this.manager()); - } else { - return null; - } - } - - public EndpointPropertiesBaseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java deleted file mode 100644 index e41b0dc669e8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; - -public final class EnvironmentContainerImpl - implements EnvironmentContainer, EnvironmentContainer.Definition, EnvironmentContainer.Update { - private EnvironmentContainerInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public EnvironmentContainerProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public EnvironmentContainerInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public EnvironmentContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public EnvironmentContainer create() { - this.innerObject = serviceManager.serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public EnvironmentContainer create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - EnvironmentContainerImpl(String name, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new EnvironmentContainerInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public EnvironmentContainerImpl update() { - return this; - } - - public EnvironmentContainer apply() { - this.innerObject = serviceManager.serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public EnvironmentContainer apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - EnvironmentContainerImpl(EnvironmentContainerInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "environments"); - } - - public EnvironmentContainer refresh() { - this.innerObject = serviceManager.serviceClient() - .getEnvironmentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public EnvironmentContainer refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEnvironmentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public EnvironmentContainerImpl withProperties(EnvironmentContainerProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java deleted file mode 100644 index d2590aaddd14..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java +++ /dev/null @@ -1,749 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in EnvironmentContainersClient. - */ -public final class EnvironmentContainersClientImpl implements EnvironmentContainersClient { - /** - * The proxy service used to perform REST calls. - */ - private final EnvironmentContainersService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of EnvironmentContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EnvironmentContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(EnvironmentContainersService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesEnvironmentContainers to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface EnvironmentContainersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EnvironmentContainerInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, ListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, ListViewType listViewType, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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, workspaceName, - this.client.getApiVersion(), skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType)); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, context)); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, workspaceName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentContainerInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, EnvironmentContainerInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, EnvironmentContainerInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, EnvironmentContainerInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String workspaceName, String name, EnvironmentContainerInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - EnvironmentContainerInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersImpl.java deleted file mode 100644 index 688d360e5bed..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersImpl.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.EnvironmentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainers; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -public final class EnvironmentContainersImpl implements EnvironmentContainers { - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentContainersImpl.class); - - private final EnvironmentContainersClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public EnvironmentContainersImpl(EnvironmentContainersClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); - } - - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EnvironmentContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EnvironmentContainer get(String resourceGroupName, String workspaceName, String name) { - EnvironmentContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new EnvironmentContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public EnvironmentContainer getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - private EnvironmentContainersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public EnvironmentContainerImpl define(String name) { - return new EnvironmentContainerImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java deleted file mode 100644 index 4741ee27fdcb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.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.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; - -public final class EnvironmentVersionImpl - implements EnvironmentVersion, EnvironmentVersion.Definition, EnvironmentVersion.Update { - private EnvironmentVersionInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public EnvironmentVersionProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public EnvironmentVersionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - private String version; - - public EnvironmentVersionImpl withExistingEnvironment(String resourceGroupName, String workspaceName, String name) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; - return this; - } - - public EnvironmentVersion create() { - this.innerObject = serviceManager.serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public EnvironmentVersion create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - EnvironmentVersionImpl(String name, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new EnvironmentVersionInner(); - this.serviceManager = serviceManager; - this.version = name; - } - - public EnvironmentVersionImpl update() { - return this; - } - - public EnvironmentVersion apply() { - this.innerObject = serviceManager.serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public EnvironmentVersion apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - EnvironmentVersionImpl(EnvironmentVersionInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "environments"); - this.version = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "versions"); - } - - public EnvironmentVersion refresh() { - this.innerObject = serviceManager.serviceClient() - .getEnvironmentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); - return this; - } - - public EnvironmentVersion refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEnvironmentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); - return this; - } - - public void publish(DestinationAsset body) { - serviceManager.environmentVersions().publish(resourceGroupName, workspaceName, name, version, body); - } - - public void publish(DestinationAsset body, Context context) { - serviceManager.environmentVersions().publish(resourceGroupName, workspaceName, name, version, body, context); - } - - public EnvironmentVersionImpl withProperties(EnvironmentVersionProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsClientImpl.java deleted file mode 100644 index 0a9014a771ca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsClientImpl.java +++ /dev/null @@ -1,1098 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.EnvironmentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -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 EnvironmentVersionsClient. - */ -public final class EnvironmentVersionsClientImpl implements EnvironmentVersionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final EnvironmentVersionsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of EnvironmentVersionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EnvironmentVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(EnvironmentVersionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesEnvironmentVersions to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface EnvironmentVersionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") EnvironmentVersionInner body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}/publish") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> publish(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DestinationAsset body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String orderBy, Integer top, String skip, ListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), orderBy, top, skip, listViewType, - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String orderBy, Integer top, String skip, ListViewType listViewType, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, workspaceName, name, - this.client.getApiVersion(), orderBy, top, skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, - listViewType, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, - workspaceName, name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, workspaceName, - name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name, - String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String name, String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - /** - * Creates or updates an EnvironmentVersion. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, EnvironmentVersionInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates an EnvironmentVersion. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, EnvironmentVersionInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Creates or updates an EnvironmentVersion. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, String version, EnvironmentVersionInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates an EnvironmentVersion. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, String version, EnvironmentVersionInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Creates or updates an EnvironmentVersion. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, EnvironmentVersionInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) - .getValue(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body) { - Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body, Context context) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono publishAsync(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body) { - return beginPublishAsync(resourceGroupName, workspaceName, name, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono publishAsync(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - return beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body) { - publishAsync(resourceGroupName, workspaceName, name, version, body).block(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - publishAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsImpl.java deleted file mode 100644 index 67ec016573b2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsImpl.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.machinelearning.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.machinelearning.fluent.EnvironmentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersions; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -public final class EnvironmentVersionsImpl implements EnvironmentVersions { - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentVersionsImpl.class); - - private final EnvironmentVersionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public EnvironmentVersionsImpl(EnvironmentVersionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, name); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); - } - - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EnvironmentVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EnvironmentVersion get(String resourceGroupName, String workspaceName, String name, String version) { - EnvironmentVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new EnvironmentVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body) { - this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body); - } - - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body, context); - } - - public EnvironmentVersion getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - private EnvironmentVersionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public EnvironmentVersionImpl define(String name) { - return new EnvironmentVersionImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExternalFqdnResponseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExternalFqdnResponseImpl.java deleted file mode 100644 index 230f8d479695..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExternalFqdnResponseImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner; -import com.azure.resourcemanager.machinelearning.models.ExternalFqdnResponse; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoints; -import java.util.Collections; -import java.util.List; - -public final class ExternalFqdnResponseImpl implements ExternalFqdnResponse { - private ExternalFqdnResponseInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - ExternalFqdnResponseImpl(ExternalFqdnResponseInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager 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 ExternalFqdnResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeatureImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeatureImpl.java deleted file mode 100644 index 547f0617bbd3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeatureImpl.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.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner; -import com.azure.resourcemanager.machinelearning.models.Feature; -import com.azure.resourcemanager.machinelearning.models.FeatureProperties; - -public final class FeatureImpl implements Feature { - private FeatureInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - FeatureImpl(FeatureInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager 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 FeatureProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public FeatureInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesClientImpl.java deleted file mode 100644 index ffb1aec315db..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesClientImpl.java +++ /dev/null @@ -1,559 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.FeaturesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner; -import com.azure.resourcemanager.machinelearning.models.FeatureResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in FeaturesClient. - */ -public final class FeaturesClientImpl implements FeaturesClient { - /** - * The proxy service used to perform REST calls. - */ - private final FeaturesService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of FeaturesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - FeaturesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(FeaturesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesFeatures to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface FeaturesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("featuresetName") String featuresetName, - @PathParam("featuresetVersion") String featuresetVersion, @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, @QueryParam("tags") String tags, - @QueryParam("featureName") String featureName, @QueryParam("description") String description, - @QueryParam("listViewType") ListViewType listViewType, @QueryParam("pageSize") Integer pageSize, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("featuresetName") String featuresetName, - @PathParam("featuresetVersion") String featuresetVersion, @PathParam("featureName") String featureName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List Features. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param featureName feature name. - * @param description Description of the featureset. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize Page size. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Feature entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String featuresetName, String featuresetVersion, String skip, String tags, String featureName, - String description, ListViewType listViewType, Integer pageSize) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (featuresetName == null) { - return Mono.error(new IllegalArgumentException("Parameter featuresetName is required and cannot be null.")); - } - if (featuresetVersion == null) { - return Mono - .error(new IllegalArgumentException("Parameter featuresetVersion is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, featuresetName, featuresetVersion, this.client.getApiVersion(), skip, - tags, featureName, description, listViewType, pageSize, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List Features. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param featureName feature name. - * @param description Description of the featureset. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize Page size. - * @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 a paginated list of Feature entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String featuresetName, String featuresetVersion, String skip, String tags, String featureName, - String description, ListViewType listViewType, Integer pageSize, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (featuresetName == null) { - return Mono.error(new IllegalArgumentException("Parameter featuresetName is required and cannot be null.")); - } - if (featuresetVersion == null) { - return Mono - .error(new IllegalArgumentException("Parameter featuresetVersion 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, workspaceName, - featuresetName, featuresetVersion, this.client.getApiVersion(), skip, tags, featureName, description, - listViewType, pageSize, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List Features. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param featureName feature name. - * @param description Description of the featureset. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize Page size. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Feature entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String skip, String tags, String featureName, String description, - ListViewType listViewType, Integer pageSize) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, featuresetName, - featuresetVersion, skip, tags, featureName, description, listViewType, pageSize), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Features. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Feature entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion) { - final String skip = null; - final String tags = null; - final String featureName = null; - final String description = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, featuresetName, - featuresetVersion, skip, tags, featureName, description, listViewType, pageSize), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Features. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param featureName feature name. - * @param description Description of the featureset. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize Page size. - * @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 a paginated list of Feature entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String skip, String tags, String featureName, String description, - ListViewType listViewType, Integer pageSize, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, featuresetName, featuresetVersion, skip, tags, - featureName, description, listViewType, pageSize, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List Features. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Feature entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion) { - final String skip = null; - final String tags = null; - final String featureName = null; - final String description = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, featuresetName, featuresetVersion, skip, - tags, featureName, description, listViewType, pageSize)); - } - - /** - * List Features. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param featureName feature name. - * @param description Description of the featureset. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize Page size. - * @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 a paginated list of Feature entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String skip, String tags, String featureName, String description, - ListViewType listViewType, Integer pageSize, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, featuresetName, featuresetVersion, skip, - tags, featureName, description, listViewType, pageSize, context)); - } - - /** - * Get feature. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. - * @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 feature along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String featuresetName, String featuresetVersion, String featureName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (featuresetName == null) { - return Mono.error(new IllegalArgumentException("Parameter featuresetName is required and cannot be null.")); - } - if (featuresetVersion == null) { - return Mono - .error(new IllegalArgumentException("Parameter featuresetVersion is required and cannot be null.")); - } - if (featureName == null) { - return Mono.error(new IllegalArgumentException("Parameter featureName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName, - this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get feature. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. - * @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 feature along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String featuresetName, String featuresetVersion, String featureName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (featuresetName == null) { - return Mono.error(new IllegalArgumentException("Parameter featuresetName is required and cannot be null.")); - } - if (featuresetVersion == null) { - return Mono - .error(new IllegalArgumentException("Parameter featuresetVersion is required and cannot be null.")); - } - if (featureName == null) { - return Mono.error(new IllegalArgumentException("Parameter featureName 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, workspaceName, - featuresetName, featuresetVersion, featureName, this.client.getApiVersion(), accept, context); - } - - /** - * Get feature. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. - * @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 feature on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String featureName) { - return getWithResponseAsync(resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get feature. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. - * @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 feature along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String featureName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName, - context).block(); - } - - /** - * Get feature. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. - * @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 feature. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeatureInner get(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String featureName) { - return getWithResponse(resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName, - Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Feature entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Feature entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesImpl.java deleted file mode 100644 index 537bedc6a1a2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesImpl.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.machinelearning.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.machinelearning.fluent.FeaturesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner; -import com.azure.resourcemanager.machinelearning.models.Feature; -import com.azure.resourcemanager.machinelearning.models.Features; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -public final class FeaturesImpl implements Features { - private static final ClientLogger LOGGER = new ClientLogger(FeaturesImpl.class); - - private final FeaturesClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public FeaturesImpl(FeaturesClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, featuresetName, featuresetVersion); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FeatureImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String skip, String tags, String featureName, String description, - ListViewType listViewType, Integer pageSize, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, featuresetName, featuresetVersion, skip, tags, featureName, - description, listViewType, pageSize, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FeatureImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String featureName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new FeatureImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Feature get(String resourceGroupName, String workspaceName, String featuresetName, String featuresetVersion, - String featureName) { - FeatureInner inner = this.serviceClient() - .get(resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName); - if (inner != null) { - return new FeatureImpl(inner, this.manager()); - } else { - return null; - } - } - - private FeaturesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainerImpl.java deleted file mode 100644 index 9d51268e1f83..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainerImpl.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainer; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties; - -public final class FeaturesetContainerImpl - implements FeaturesetContainer, FeaturesetContainer.Definition, FeaturesetContainer.Update { - private FeaturesetContainerInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public FeaturesetContainerProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public FeaturesetContainerInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public FeaturesetContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public FeaturesetContainer create() { - this.innerObject = serviceManager.serviceClient() - .getFeaturesetContainers() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); - return this; - } - - public FeaturesetContainer create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getFeaturesetContainers() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); - return this; - } - - FeaturesetContainerImpl(String name, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new FeaturesetContainerInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public FeaturesetContainerImpl update() { - return this; - } - - public FeaturesetContainer apply() { - this.innerObject = serviceManager.serviceClient() - .getFeaturesetContainers() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); - return this; - } - - public FeaturesetContainer apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getFeaturesetContainers() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); - return this; - } - - FeaturesetContainerImpl(FeaturesetContainerInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "featuresets"); - } - - public FeaturesetContainer refresh() { - this.innerObject = serviceManager.serviceClient() - .getFeaturesetContainers() - .getEntityWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public FeaturesetContainer refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getFeaturesetContainers() - .getEntityWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public FeaturesetContainerImpl withProperties(FeaturesetContainerProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersClientImpl.java deleted file mode 100644 index 7f5883a132fc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersClientImpl.java +++ /dev/null @@ -1,999 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.FeaturesetContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -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 FeaturesetContainersClient. - */ -public final class FeaturesetContainersClientImpl implements FeaturesetContainersClient { - /** - * The proxy service used to perform REST calls. - */ - private final FeaturesetContainersService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of FeaturesetContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - FeaturesetContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(FeaturesetContainersService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesFeaturesetContainers to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface FeaturesetContainersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("tags") String tags, @QueryParam("listViewType") ListViewType listViewType, - @QueryParam("pageSize") Integer pageSize, @QueryParam("name") String name, - @QueryParam("description") String description, @QueryParam("createdBy") String createdBy, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getEntity(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FeaturesetContainerInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featureset. - * @param description description for the feature set. - * @param createdBy createdBy user name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturesetContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, String tags, ListViewType listViewType, Integer pageSize, String name, - String description, String createdBy) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, tags, listViewType, pageSize, name, - description, createdBy, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featureset. - * @param description description for the feature set. - * @param createdBy createdBy user name. - * @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 a paginated list of FeaturesetContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, String tags, ListViewType listViewType, Integer pageSize, String name, - String description, String createdBy, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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, workspaceName, - this.client.getApiVersion(), skip, tags, listViewType, pageSize, name, description, createdBy, accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featureset. - * @param description description for the feature set. - * @param createdBy createdBy user name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, tags, listViewType, - pageSize, name, description, createdBy), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - final String name = null; - final String description = null; - final String createdBy = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, tags, listViewType, - pageSize, name, description, createdBy), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featureset. - * @param description description for the feature set. - * @param createdBy createdBy user name. - * @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 a paginated list of FeaturesetContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, tags, listViewType, - pageSize, name, description, createdBy, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - final String name = null; - final String description = null; - final String createdBy = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, - description, createdBy)); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featureset. - * @param description description for the feature set. - * @param createdBy createdBy user name. - * @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 a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, - description, createdBy, context)); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name).getSyncPoller(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, context).getSyncPoller(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return beginDeleteAsync(resourceGroupName, workspaceName, name).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - deleteAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getEntityWithResponseAsync(String resourceGroupName, - String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getEntity(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getEntityWithResponseAsync(String resourceGroupName, - String workspaceName, String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getEntity(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getEntityAsync(String resourceGroupName, String workspaceName, String name) { - return getEntityWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getEntityWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - return getEntityWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturesetContainerInner getEntity(String resourceGroupName, String workspaceName, String name) { - return getEntityWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, FeaturesetContainerInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, FeaturesetContainerInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturesetContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), FeaturesetContainerInner.class, FeaturesetContainerInner.class, - this.client.getContext()); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturesetContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), FeaturesetContainerInner.class, FeaturesetContainerInner.class, context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturesetContainerInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturesetContainerInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, FeaturesetContainerInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, FeaturesetContainerInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturesetContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturesetContainerInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturesetContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturesetContainerInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturesetContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturesetContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersImpl.java deleted file mode 100644 index 122e2a41360d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersImpl.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.FeaturesetContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainer; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainers; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -public final class FeaturesetContainersImpl implements FeaturesetContainers { - private static final ClientLogger LOGGER = new ClientLogger(FeaturesetContainersImpl.class); - - private final FeaturesetContainersClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public FeaturesetContainersImpl(FeaturesetContainersClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturesetContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, - Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy, - context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturesetContainerImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, context); - } - - public Response getEntityWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - Response inner - = this.serviceClient().getEntityWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new FeaturesetContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public FeaturesetContainer getEntity(String resourceGroupName, String workspaceName, String name) { - FeaturesetContainerInner inner = this.serviceClient().getEntity(resourceGroupName, workspaceName, name); - if (inner != null) { - return new FeaturesetContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public FeaturesetContainer getEntityById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "featuresets"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'featuresets'.", id))); - } - return this.getEntityWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - public Response getEntityByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "featuresets"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'featuresets'.", id))); - } - return this.getEntityWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "featuresets"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'featuresets'.", id))); - } - this.delete(resourceGroupName, workspaceName, name, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "featuresets"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'featuresets'.", id))); - } - this.delete(resourceGroupName, workspaceName, name, context); - } - - private FeaturesetContainersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public FeaturesetContainerImpl define(String name) { - return new FeaturesetContainerImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionBackfillResponseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionBackfillResponseImpl.java deleted file mode 100644 index 274f7f04de24..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionBackfillResponseImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillResponse; -import java.util.Collections; -import java.util.List; - -public final class FeaturesetVersionBackfillResponseImpl implements FeaturesetVersionBackfillResponse { - private FeaturesetVersionBackfillResponseInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - FeaturesetVersionBackfillResponseImpl(FeaturesetVersionBackfillResponseInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List jobIds() { - List inner = this.innerModel().jobIds(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public FeaturesetVersionBackfillResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionImpl.java deleted file mode 100644 index 79b10298eb8f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionImpl.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersion; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillResponse; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties; - -public final class FeaturesetVersionImpl - implements FeaturesetVersion, FeaturesetVersion.Definition, FeaturesetVersion.Update { - private FeaturesetVersionInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public FeaturesetVersionProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public FeaturesetVersionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - private String version; - - public FeaturesetVersionImpl withExistingFeatureset(String resourceGroupName, String workspaceName, String name) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; - return this; - } - - public FeaturesetVersion create() { - this.innerObject = serviceManager.serviceClient() - .getFeaturesetVersions() - .createOrUpdate(resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE); - return this; - } - - public FeaturesetVersion create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getFeaturesetVersions() - .createOrUpdate(resourceGroupName, workspaceName, name, version, this.innerModel(), context); - return this; - } - - FeaturesetVersionImpl(String name, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new FeaturesetVersionInner(); - this.serviceManager = serviceManager; - this.version = name; - } - - public FeaturesetVersionImpl update() { - return this; - } - - public FeaturesetVersion apply() { - this.innerObject = serviceManager.serviceClient() - .getFeaturesetVersions() - .createOrUpdate(resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE); - return this; - } - - public FeaturesetVersion apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getFeaturesetVersions() - .createOrUpdate(resourceGroupName, workspaceName, name, version, this.innerModel(), context); - return this; - } - - FeaturesetVersionImpl(FeaturesetVersionInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "featuresets"); - this.version = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "versions"); - } - - public FeaturesetVersion refresh() { - this.innerObject = serviceManager.serviceClient() - .getFeaturesetVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); - return this; - } - - public FeaturesetVersion refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getFeaturesetVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); - return this; - } - - public FeaturesetVersionBackfillResponse backfill(FeaturesetVersionBackfillRequest body) { - return serviceManager.featuresetVersions().backfill(resourceGroupName, workspaceName, name, version, body); - } - - public FeaturesetVersionBackfillResponse backfill(FeaturesetVersionBackfillRequest body, Context context) { - return serviceManager.featuresetVersions() - .backfill(resourceGroupName, workspaceName, name, version, body, context); - } - - public FeaturesetVersionImpl withProperties(FeaturesetVersionProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsClientImpl.java deleted file mode 100644 index a333bc84f26a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsClientImpl.java +++ /dev/null @@ -1,1374 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.FeaturesetVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -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 FeaturesetVersionsClient. - */ -public final class FeaturesetVersionsClientImpl implements FeaturesetVersionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final FeaturesetVersionsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of FeaturesetVersionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - FeaturesetVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(FeaturesetVersionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesFeaturesetVersions to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface FeaturesetVersionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, @QueryParam("tags") String tags, - @QueryParam("listViewType") ListViewType listViewType, @QueryParam("pageSize") Integer pageSize, - @QueryParam("versionName") String versionName, @QueryParam("version") String version, - @QueryParam("description") String description, @QueryParam("createdBy") String createdBy, - @QueryParam("stage") String stage, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") FeaturesetVersionInner body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}/backfill") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> backfill(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FeaturesetVersionBackfillRequest body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featureset version. - * @param version featureset version. - * @param description description for the feature set version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturesetVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String skip, String tags, ListViewType listViewType, Integer pageSize, - String versionName, String version, String description, String createdBy, String stage) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), skip, tags, listViewType, pageSize, - versionName, version, description, createdBy, stage, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featureset version. - * @param version featureset version. - * @param description description for the feature set version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @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 a paginated list of FeaturesetVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String skip, String tags, ListViewType listViewType, Integer pageSize, - String versionName, String version, String description, String createdBy, String stage, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, workspaceName, name, - this.client.getApiVersion(), skip, tags, listViewType, pageSize, versionName, version, description, - createdBy, stage, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featureset version. - * @param version featureset version. - * @param description description for the feature set version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, tags, - listViewType, pageSize, versionName, version, description, createdBy, stage), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - final String versionName = null; - final String version = null; - final String description = null; - final String createdBy = null; - final String stage = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, tags, - listViewType, pageSize, versionName, version, description, createdBy, stage), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featureset version. - * @param version featureset version. - * @param description description for the feature set version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @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 a paginated list of FeaturesetVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, - versionName, version, description, createdBy, stage, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - final String versionName = null; - final String version = null; - final String description = null; - final String createdBy = null; - final String stage = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, - versionName, version, description, createdBy, stage)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featureset version. - * @param version featureset version. - * @param description description for the feature set version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @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 a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, - versionName, version, description, createdBy, stage, context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, - workspaceName, name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, String version) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, version); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, String version, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - String version) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, version).getSyncPoller(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, version, context).getSyncPoller(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, version).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, version, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteAsync(resourceGroupName, workspaceName, name, version).block(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version, Context context) { - deleteAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, workspaceName, - name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name, - String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturesetVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, FeaturesetVersionInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, FeaturesetVersionInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturesetVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), FeaturesetVersionInner.class, FeaturesetVersionInner.class, - this.client.getContext()); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturesetVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), FeaturesetVersionInner.class, FeaturesetVersionInner.class, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturesetVersionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturesetVersionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context) - .getSyncPoller(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, String version, FeaturesetVersionInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, String version, FeaturesetVersionInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturesetVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, FeaturesetVersionInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).block(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturesetVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, FeaturesetVersionInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Backfill. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Feature set version backfill request entity. - * @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 response payload for creating a backfill request for a given feature set version along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> backfillWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, FeaturesetVersionBackfillRequest body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.backfill(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Backfill. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Feature set version backfill request entity. - * @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 response payload for creating a backfill request for a given feature set version along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> backfillWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, FeaturesetVersionBackfillRequest body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.backfill(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Backfill. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Feature set version backfill request entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of response payload for creating a backfill request for a given - * feature set version. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturesetVersionBackfillResponseInner> - beginBackfillAsync(String resourceGroupName, String workspaceName, String name, String version, - FeaturesetVersionBackfillRequest body) { - Mono>> mono - = backfillWithResponseAsync(resourceGroupName, workspaceName, name, version, body); - return this.client.getLroResult( - mono, this.client.getHttpPipeline(), FeaturesetVersionBackfillResponseInner.class, - FeaturesetVersionBackfillResponseInner.class, this.client.getContext()); - } - - /** - * Backfill. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Feature set version backfill request entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of response payload for creating a backfill request for a given - * feature set version. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturesetVersionBackfillResponseInner> - beginBackfillAsync(String resourceGroupName, String workspaceName, String name, String version, - FeaturesetVersionBackfillRequest body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = backfillWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); - return this.client.getLroResult( - mono, this.client.getHttpPipeline(), FeaturesetVersionBackfillResponseInner.class, - FeaturesetVersionBackfillResponseInner.class, context); - } - - /** - * Backfill. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Feature set version backfill request entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of response payload for creating a backfill request for a given - * feature set version. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturesetVersionBackfillResponseInner> - beginBackfill(String resourceGroupName, String workspaceName, String name, String version, - FeaturesetVersionBackfillRequest body) { - return this.beginBackfillAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); - } - - /** - * Backfill. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Feature set version backfill request entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of response payload for creating a backfill request for a given - * feature set version. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturesetVersionBackfillResponseInner> - beginBackfill(String resourceGroupName, String workspaceName, String name, String version, - FeaturesetVersionBackfillRequest body, Context context) { - return this.beginBackfillAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); - } - - /** - * Backfill. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Feature set version backfill request entity. - * @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 response payload for creating a backfill request for a given feature set version on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono backfillAsync(String resourceGroupName, String workspaceName, - String name, String version, FeaturesetVersionBackfillRequest body) { - return beginBackfillAsync(resourceGroupName, workspaceName, name, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Backfill. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Feature set version backfill request entity. - * @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 response payload for creating a backfill request for a given feature set version on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono backfillAsync(String resourceGroupName, String workspaceName, - String name, String version, FeaturesetVersionBackfillRequest body, Context context) { - return beginBackfillAsync(resourceGroupName, workspaceName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Backfill. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Feature set version backfill request entity. - * @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 response payload for creating a backfill request for a given feature set version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturesetVersionBackfillResponseInner backfill(String resourceGroupName, String workspaceName, String name, - String version, FeaturesetVersionBackfillRequest body) { - return backfillAsync(resourceGroupName, workspaceName, name, version, body).block(); - } - - /** - * Backfill. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Feature set version backfill request entity. - * @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 response payload for creating a backfill request for a given feature set version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturesetVersionBackfillResponseInner backfill(String resourceGroupName, String workspaceName, String name, - String version, FeaturesetVersionBackfillRequest body, Context context) { - return backfillAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturesetVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturesetVersion entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsImpl.java deleted file mode 100644 index cba5f48c169d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsImpl.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.FeaturesetVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersion; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillResponse; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersions; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -public final class FeaturesetVersionsImpl implements FeaturesetVersions { - private static final ClientLogger LOGGER = new ClientLogger(FeaturesetVersionsImpl.class); - - private final FeaturesetVersionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public FeaturesetVersionsImpl(FeaturesetVersionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturesetVersionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, versionName, version, - description, createdBy, stage, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturesetVersionImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version, context); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new FeaturesetVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public FeaturesetVersion get(String resourceGroupName, String workspaceName, String name, String version) { - FeaturesetVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new FeaturesetVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public FeaturesetVersionBackfillResponse backfill(String resourceGroupName, String workspaceName, String name, - String version, FeaturesetVersionBackfillRequest body) { - FeaturesetVersionBackfillResponseInner inner - = this.serviceClient().backfill(resourceGroupName, workspaceName, name, version, body); - if (inner != null) { - return new FeaturesetVersionBackfillResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public FeaturesetVersionBackfillResponse backfill(String resourceGroupName, String workspaceName, String name, - String version, FeaturesetVersionBackfillRequest body, Context context) { - FeaturesetVersionBackfillResponseInner inner - = this.serviceClient().backfill(resourceGroupName, workspaceName, name, version, body, context); - if (inner != null) { - return new FeaturesetVersionBackfillResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public FeaturesetVersion getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "featuresets"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'featuresets'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "featuresets"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'featuresets'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "featuresets"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'featuresets'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - this.delete(resourceGroupName, workspaceName, name, version, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "featuresets"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'featuresets'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - this.delete(resourceGroupName, workspaceName, name, version, context); - } - - private FeaturesetVersionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public FeaturesetVersionImpl define(String name) { - return new FeaturesetVersionImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainerImpl.java deleted file mode 100644 index a6a9c1374e6c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainerImpl.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainer; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; - -public final class FeaturestoreEntityContainerImpl - implements FeaturestoreEntityContainer, FeaturestoreEntityContainer.Definition, FeaturestoreEntityContainer.Update { - private FeaturestoreEntityContainerInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public FeaturestoreEntityContainerProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public FeaturestoreEntityContainerInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public FeaturestoreEntityContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public FeaturestoreEntityContainer create() { - this.innerObject = serviceManager.serviceClient() - .getFeaturestoreEntityContainers() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); - return this; - } - - public FeaturestoreEntityContainer create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getFeaturestoreEntityContainers() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); - return this; - } - - FeaturestoreEntityContainerImpl(String name, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new FeaturestoreEntityContainerInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public FeaturestoreEntityContainerImpl update() { - return this; - } - - public FeaturestoreEntityContainer apply() { - this.innerObject = serviceManager.serviceClient() - .getFeaturestoreEntityContainers() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); - return this; - } - - public FeaturestoreEntityContainer apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getFeaturestoreEntityContainers() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); - return this; - } - - FeaturestoreEntityContainerImpl(FeaturestoreEntityContainerInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "featurestoreEntities"); - } - - public FeaturestoreEntityContainer refresh() { - this.innerObject = serviceManager.serviceClient() - .getFeaturestoreEntityContainers() - .getEntityWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public FeaturestoreEntityContainer refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getFeaturestoreEntityContainers() - .getEntityWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public FeaturestoreEntityContainerImpl withProperties(FeaturestoreEntityContainerProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersClientImpl.java deleted file mode 100644 index 3be33e68d178..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersClientImpl.java +++ /dev/null @@ -1,1009 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.FeaturestoreEntityContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -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 FeaturestoreEntityContainersClient. - */ -public final class FeaturestoreEntityContainersClientImpl implements FeaturestoreEntityContainersClient { - /** - * The proxy service used to perform REST calls. - */ - private final FeaturestoreEntityContainersService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of FeaturestoreEntityContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - FeaturestoreEntityContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(FeaturestoreEntityContainersService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesFeaturestoreEntityContainers to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface FeaturestoreEntityContainersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("tags") String tags, @QueryParam("listViewType") ListViewType listViewType, - @QueryParam("pageSize") Integer pageSize, @QueryParam("name") String name, - @QueryParam("description") String description, @QueryParam("createdBy") String createdBy, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getEntity(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FeaturestoreEntityContainerInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featurestore entity. - * @param description description for the featurestore entity. - * @param createdBy createdBy user name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturestoreEntityContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, String tags, ListViewType listViewType, Integer pageSize, String name, - String description, String createdBy) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, tags, listViewType, pageSize, name, - description, createdBy, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featurestore entity. - * @param description description for the featurestore entity. - * @param createdBy createdBy user name. - * @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 a paginated list of FeaturestoreEntityContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, String tags, ListViewType listViewType, Integer pageSize, String name, - String description, String createdBy, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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, workspaceName, - this.client.getApiVersion(), skip, tags, listViewType, pageSize, name, description, createdBy, accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featurestore entity. - * @param description description for the featurestore entity. - * @param createdBy createdBy user name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String skip, String tags, ListViewType listViewType, Integer pageSize, String name, String description, - String createdBy) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, tags, listViewType, - pageSize, name, description, createdBy), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - final String name = null; - final String description = null; - final String createdBy = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, tags, listViewType, - pageSize, name, description, createdBy), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featurestore entity. - * @param description description for the featurestore entity. - * @param createdBy createdBy user name. - * @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 a paginated list of FeaturestoreEntityContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String skip, String tags, ListViewType listViewType, Integer pageSize, String name, String description, - String createdBy, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, tags, listViewType, - pageSize, name, description, createdBy, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - final String name = null; - final String description = null; - final String createdBy = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, - description, createdBy)); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featurestore entity. - * @param description description for the featurestore entity. - * @param createdBy createdBy user name. - * @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 a paginated list of FeaturestoreEntityContainer entities as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - String skip, String tags, ListViewType listViewType, Integer pageSize, String name, String description, - String createdBy, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, - description, createdBy, context)); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name).getSyncPoller(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, context).getSyncPoller(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return beginDeleteAsync(resourceGroupName, workspaceName, name).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - deleteAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getEntityWithResponseAsync(String resourceGroupName, - String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getEntity(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getEntityWithResponseAsync(String resourceGroupName, - String workspaceName, String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getEntity(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getEntityAsync(String resourceGroupName, String workspaceName, - String name) { - return getEntityWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getEntityWithResponse(String resourceGroupName, - String workspaceName, String name, Context context) { - return getEntityWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturestoreEntityContainerInner getEntity(String resourceGroupName, String workspaceName, String name) { - return getEntityWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, FeaturestoreEntityContainerInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, FeaturestoreEntityContainerInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturestoreEntityContainerInner> - beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - FeaturestoreEntityContainerInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), FeaturestoreEntityContainerInner.class, - FeaturestoreEntityContainerInner.class, this.client.getContext()); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturestoreEntityContainerInner> - beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - FeaturestoreEntityContainerInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), FeaturestoreEntityContainerInner.class, - FeaturestoreEntityContainerInner.class, context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturestoreEntityContainerInner> - beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturestoreEntityContainerInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturestoreEntityContainerInner> - beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturestoreEntityContainerInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, FeaturestoreEntityContainerInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, FeaturestoreEntityContainerInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturestoreEntityContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturestoreEntityContainerInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturestoreEntityContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturestoreEntityContainerInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturestoreEntityContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturestoreEntityContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersImpl.java deleted file mode 100644 index 0c435229ee6e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersImpl.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.machinelearning.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.machinelearning.fluent.FeaturestoreEntityContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainer; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainers; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -public final class FeaturestoreEntityContainersImpl implements FeaturestoreEntityContainers { - private static final ClientLogger LOGGER = new ClientLogger(FeaturestoreEntityContainersImpl.class); - - private final FeaturestoreEntityContainersClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public FeaturestoreEntityContainersImpl(FeaturestoreEntityContainersClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new FeaturestoreEntityContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, - Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy, - context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new FeaturestoreEntityContainerImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, context); - } - - public Response getEntityWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - Response inner - = this.serviceClient().getEntityWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new FeaturestoreEntityContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public FeaturestoreEntityContainer getEntity(String resourceGroupName, String workspaceName, String name) { - FeaturestoreEntityContainerInner inner = this.serviceClient().getEntity(resourceGroupName, workspaceName, name); - if (inner != null) { - return new FeaturestoreEntityContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public FeaturestoreEntityContainer getEntityById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "featurestoreEntities"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'featurestoreEntities'.", id))); - } - return this.getEntityWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - public Response getEntityByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "featurestoreEntities"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'featurestoreEntities'.", id))); - } - return this.getEntityWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "featurestoreEntities"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'featurestoreEntities'.", id))); - } - this.delete(resourceGroupName, workspaceName, name, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "featurestoreEntities"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'featurestoreEntities'.", id))); - } - this.delete(resourceGroupName, workspaceName, name, context); - } - - private FeaturestoreEntityContainersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public FeaturestoreEntityContainerImpl define(String name) { - return new FeaturestoreEntityContainerImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionImpl.java deleted file mode 100644 index 077a40278446..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionImpl.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersion; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties; - -public final class FeaturestoreEntityVersionImpl - implements FeaturestoreEntityVersion, FeaturestoreEntityVersion.Definition, FeaturestoreEntityVersion.Update { - private FeaturestoreEntityVersionInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public FeaturestoreEntityVersionProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public FeaturestoreEntityVersionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - private String version; - - public FeaturestoreEntityVersionImpl withExistingFeaturestoreEntity(String resourceGroupName, String workspaceName, - String name) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; - return this; - } - - public FeaturestoreEntityVersion create() { - this.innerObject = serviceManager.serviceClient() - .getFeaturestoreEntityVersions() - .createOrUpdate(resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE); - return this; - } - - public FeaturestoreEntityVersion create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getFeaturestoreEntityVersions() - .createOrUpdate(resourceGroupName, workspaceName, name, version, this.innerModel(), context); - return this; - } - - FeaturestoreEntityVersionImpl(String name, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new FeaturestoreEntityVersionInner(); - this.serviceManager = serviceManager; - this.version = name; - } - - public FeaturestoreEntityVersionImpl update() { - return this; - } - - public FeaturestoreEntityVersion apply() { - this.innerObject = serviceManager.serviceClient() - .getFeaturestoreEntityVersions() - .createOrUpdate(resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE); - return this; - } - - public FeaturestoreEntityVersion apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getFeaturestoreEntityVersions() - .createOrUpdate(resourceGroupName, workspaceName, name, version, this.innerModel(), context); - return this; - } - - FeaturestoreEntityVersionImpl(FeaturestoreEntityVersionInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "featurestoreEntities"); - this.version = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "versions"); - } - - public FeaturestoreEntityVersion refresh() { - this.innerObject = serviceManager.serviceClient() - .getFeaturestoreEntityVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); - return this; - } - - public FeaturestoreEntityVersion refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getFeaturestoreEntityVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); - return this; - } - - public FeaturestoreEntityVersionImpl withProperties(FeaturestoreEntityVersionProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsClientImpl.java deleted file mode 100644 index 852d0513b6ca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsClientImpl.java +++ /dev/null @@ -1,1090 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.FeaturestoreEntityVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -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 FeaturestoreEntityVersionsClient. - */ -public final class FeaturestoreEntityVersionsClientImpl implements FeaturestoreEntityVersionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final FeaturestoreEntityVersionsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of FeaturestoreEntityVersionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - FeaturestoreEntityVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(FeaturestoreEntityVersionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesFeaturestoreEntityVersions to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface FeaturestoreEntityVersionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, @QueryParam("tags") String tags, - @QueryParam("listViewType") ListViewType listViewType, @QueryParam("pageSize") Integer pageSize, - @QueryParam("versionName") String versionName, @QueryParam("version") String version, - @QueryParam("description") String description, @QueryParam("createdBy") String createdBy, - @QueryParam("stage") String stage, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FeaturestoreEntityVersionInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featurestore entity version. - * @param version featurestore entity version. - * @param description description for the feature entity version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturestoreEntityVersion entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String skip, String tags, ListViewType listViewType, Integer pageSize, - String versionName, String version, String description, String createdBy, String stage) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), skip, tags, listViewType, pageSize, - versionName, version, description, createdBy, stage, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featurestore entity version. - * @param version featurestore entity version. - * @param description description for the feature entity version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @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 a paginated list of FeaturestoreEntityVersion entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String skip, String tags, ListViewType listViewType, Integer pageSize, - String versionName, String version, String description, String createdBy, String stage, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, workspaceName, name, - this.client.getApiVersion(), skip, tags, listViewType, pageSize, versionName, version, description, - createdBy, stage, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featurestore entity version. - * @param version featurestore entity version. - * @param description description for the feature entity version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String name, String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, - String version, String description, String createdBy, String stage) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, tags, - listViewType, pageSize, versionName, version, description, createdBy, stage), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String name) { - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - final String versionName = null; - final String version = null; - final String description = null; - final String createdBy = null; - final String stage = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, tags, - listViewType, pageSize, versionName, version, description, createdBy, stage), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featurestore entity version. - * @param version featurestore entity version. - * @param description description for the feature entity version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @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 a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String name, String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, - String version, String description, String createdBy, String stage, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, - versionName, version, description, createdBy, stage, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - String name) { - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - final String versionName = null; - final String version = null; - final String description = null; - final String createdBy = null; - final String stage = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, - versionName, version, description, createdBy, stage)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featurestore entity version. - * @param version featurestore entity version. - * @param description description for the feature entity version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @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 a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - String name, String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, - String version, String description, String createdBy, String stage, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, - versionName, version, description, createdBy, stage, context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, - workspaceName, name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, String version) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, version); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, String version, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - String version) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, version).getSyncPoller(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, version, context).getSyncPoller(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, version).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, version, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteAsync(resourceGroupName, workspaceName, name, version).block(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version, Context context) { - deleteAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, workspaceName, - name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name, - String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String name, String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturestoreEntityVersionInner get(String resourceGroupName, String workspaceName, String name, - String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, FeaturestoreEntityVersionInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, FeaturestoreEntityVersionInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturestoreEntityVersionInner> - beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String name, String version, - FeaturestoreEntityVersionInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), FeaturestoreEntityVersionInner.class, FeaturestoreEntityVersionInner.class, - this.client.getContext()); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturestoreEntityVersionInner> - beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String name, String version, - FeaturestoreEntityVersionInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), FeaturestoreEntityVersionInner.class, FeaturestoreEntityVersionInner.class, - context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturestoreEntityVersionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, - FeaturestoreEntityVersionInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturestoreEntityVersionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, - FeaturestoreEntityVersionInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context) - .getSyncPoller(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, String version, FeaturestoreEntityVersionInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, String version, FeaturestoreEntityVersionInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturestoreEntityVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, FeaturestoreEntityVersionInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).block(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturestoreEntityVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, FeaturestoreEntityVersionInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturestoreEntityVersion entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of FeaturestoreEntityVersion entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsImpl.java deleted file mode 100644 index 10ad272b5a59..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsImpl.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.machinelearning.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.machinelearning.fluent.FeaturestoreEntityVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersion; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersions; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -public final class FeaturestoreEntityVersionsImpl implements FeaturestoreEntityVersions { - private static final ClientLogger LOGGER = new ClientLogger(FeaturestoreEntityVersionsImpl.class); - - private final FeaturestoreEntityVersionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public FeaturestoreEntityVersionsImpl(FeaturestoreEntityVersionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, name); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturestoreEntityVersionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, versionName, version, - description, createdBy, stage, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturestoreEntityVersionImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version, context); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, - String name, String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new FeaturestoreEntityVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public FeaturestoreEntityVersion get(String resourceGroupName, String workspaceName, String name, String version) { - FeaturestoreEntityVersionInner inner - = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new FeaturestoreEntityVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public FeaturestoreEntityVersion getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "featurestoreEntities"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'featurestoreEntities'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "featurestoreEntities"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'featurestoreEntities'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "featurestoreEntities"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'featurestoreEntities'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - this.delete(resourceGroupName, workspaceName, name, version, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "featurestoreEntities"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'featurestoreEntities'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - this.delete(resourceGroupName, workspaceName, name, version, context); - } - - private FeaturestoreEntityVersionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public FeaturestoreEntityVersionImpl define(String name) { - return new FeaturestoreEntityVersionImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GetBlobReferenceSasResponseDtoImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GetBlobReferenceSasResponseDtoImpl.java deleted file mode 100644 index a27f24baf480..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GetBlobReferenceSasResponseDtoImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.GetBlobReferenceSasResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceForConsumptionDto; -import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasResponseDto; - -public final class GetBlobReferenceSasResponseDtoImpl implements GetBlobReferenceSasResponseDto { - private GetBlobReferenceSasResponseDtoInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - GetBlobReferenceSasResponseDtoImpl(GetBlobReferenceSasResponseDtoInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public GetBlobReferenceForConsumptionDto blobReferenceForConsumption() { - return this.innerModel().blobReferenceForConsumption(); - } - - public GetBlobReferenceSasResponseDtoInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.java deleted file mode 100644 index c17a0899f164..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.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.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -import com.azure.resourcemanager.machinelearning.models.JobBase; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; - -public final class JobBaseImpl implements JobBase, JobBase.Definition, JobBase.Update { - private JobBaseInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public JobBaseProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public JobBaseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String id; - - public JobBaseImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public JobBase create() { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public JobBase create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), context) - .getValue(); - return this; - } - - JobBaseImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new JobBaseInner(); - this.serviceManager = serviceManager; - this.id = name; - } - - public JobBaseImpl update() { - return this; - } - - public JobBase apply() { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public JobBase apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), context) - .getValue(); - return this; - } - - JobBaseImpl(JobBaseInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.id = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "jobs"); - } - - public JobBase refresh() { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .getWithResponse(resourceGroupName, workspaceName, id, Context.NONE) - .getValue(); - return this; - } - - public JobBase refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .getWithResponse(resourceGroupName, workspaceName, id, context) - .getValue(); - return this; - } - - public void cancel() { - serviceManager.jobs().cancel(resourceGroupName, workspaceName, id); - } - - public void cancel(Context context) { - serviceManager.jobs().cancel(resourceGroupName, workspaceName, id, context); - } - - public JobBaseImpl withProperties(JobBaseProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java deleted file mode 100644 index 34892a85f2da..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java +++ /dev/null @@ -1,1109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.JobsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -import com.azure.resourcemanager.machinelearning.models.JobBaseResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -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 JobsClient. - */ -public final class JobsClientImpl implements JobsClient { - /** - * The proxy service used to perform REST calls. - */ - private final JobsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of JobsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - JobsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(JobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesJobs to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface JobsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("jobType") String jobType, @QueryParam("tag") String tag, - @QueryParam("listViewType") ListViewType listViewType, @QueryParam("properties") String properties, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("id") String id, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("id") String id, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("id") String id, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JobBaseInner body, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}/cancel") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> cancel(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("id") String id, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists Jobs in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param jobType Type of job to be returned. - * @param tag Jobs returned will have this tag key. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param properties Comma-separated list of user property names (and optionally values). Example: - * prop1,prop2=value2. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of JobBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, String jobType, String tag, ListViewType listViewType, String properties) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, jobType, tag, listViewType, - properties, 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 Jobs in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param jobType Type of job to be returned. - * @param tag Jobs returned will have this tag key. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param properties Comma-separated list of user property names (and optionally values). Example: - * prop1,prop2=value2. - * @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 a paginated list of JobBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, String jobType, String tag, ListViewType listViewType, String properties, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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, workspaceName, - this.client.getApiVersion(), skip, jobType, tag, listViewType, properties, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists Jobs in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param jobType Type of job to be returned. - * @param tag Jobs returned will have this tag key. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param properties Comma-separated list of user property names (and optionally values). Example: - * prop1,prop2=value2. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of JobBase entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - String jobType, String tag, ListViewType listViewType, String properties) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists Jobs in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of JobBase entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final String jobType = null; - final String tag = null; - final ListViewType listViewType = null; - final String properties = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists Jobs in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param jobType Type of job to be returned. - * @param tag Jobs returned will have this tag key. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param properties Comma-separated list of user property names (and optionally values). Example: - * prop1,prop2=value2. - * @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 a paginated list of JobBase entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - String jobType, String tag, ListViewType listViewType, String properties, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, - listViewType, properties, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists Jobs in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of JobBase entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final String jobType = null; - final String tag = null; - final ListViewType listViewType = null; - final String properties = null; - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties)); - } - - /** - * Lists Jobs in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param jobType Type of job to be returned. - * @param tag Jobs returned will have this tag key. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param properties Comma-separated list of user property names (and optionally values). Example: - * prop1,prop2=value2. - * @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 a paginated list of JobBase entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, String jobType, - String tag, ListViewType listViewType, String properties, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties, context)); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String id) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, id, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String id, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id 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, - workspaceName, id, this.client.getApiVersion(), accept, context); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String id) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, id); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String id, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, id, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String id) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, id).getSyncPoller(); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String id, - Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, id, context).getSyncPoller(); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String id) { - return beginDeleteAsync(resourceGroupName, workspaceName, id).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String id, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, id, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String id) { - deleteAsync(resourceGroupName, workspaceName, id).block(); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String id, Context context) { - deleteAsync(resourceGroupName, workspaceName, id, context).block(); - } - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String id) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, id, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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 a Job by name/id along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, String id, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id 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, workspaceName, - id, this.client.getApiVersion(), accept, context); - } - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String id) { - return getWithResponseAsync(resourceGroupName, workspaceName, id) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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 a Job by name/id along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String id, - Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, id, context).block(); - } - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobBaseInner get(String resourceGroupName, String workspaceName, String id) { - return getWithResponse(resourceGroupName, workspaceName, id, Context.NONE).getValue(); - } - - /** - * Creates and executes a Job. - * For update case, the Tags in the definition passed in will replace Tags in the existing job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String workspaceName, - String id, JobBaseInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, id, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates and executes a Job. - * For update case, the Tags in the definition passed in will replace Tags in the existing job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String workspaceName, - String id, JobBaseInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, id, this.client.getApiVersion(), body, accept, context); - } - - /** - * Creates and executes a Job. - * For update case, the Tags in the definition passed in will replace Tags in the existing job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String id, - JobBaseInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates and executes a Job. - * For update case, the Tags in the definition passed in will replace Tags in the existing job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String id, - JobBaseInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body, context).block(); - } - - /** - * Creates and executes a Job. - * For update case, the Tags in the definition passed in will replace Tags in the existing job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String id, JobBaseInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, id, body, Context.NONE).getValue(); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> cancelWithResponseAsync(String resourceGroupName, String workspaceName, - String id) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, id, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> cancelWithResponseAsync(String resourceGroupName, String workspaceName, - String id, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.cancel(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, id, this.client.getApiVersion(), accept, context); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginCancelAsync(String resourceGroupName, String workspaceName, - String id) { - Mono>> mono = cancelWithResponseAsync(resourceGroupName, workspaceName, id); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginCancelAsync(String resourceGroupName, String workspaceName, - String id, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = cancelWithResponseAsync(resourceGroupName, workspaceName, id, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCancel(String resourceGroupName, String workspaceName, String id) { - return this.beginCancelAsync(resourceGroupName, workspaceName, id).getSyncPoller(); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCancel(String resourceGroupName, String workspaceName, String id, - Context context) { - return this.beginCancelAsync(resourceGroupName, workspaceName, id, context).getSyncPoller(); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cancelAsync(String resourceGroupName, String workspaceName, String id) { - return beginCancelAsync(resourceGroupName, workspaceName, id).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cancelAsync(String resourceGroupName, String workspaceName, String id, Context context) { - return beginCancelAsync(resourceGroupName, workspaceName, id, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void cancel(String resourceGroupName, String workspaceName, String id) { - cancelAsync(resourceGroupName, workspaceName, id).block(); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void cancel(String resourceGroupName, String workspaceName, String id, Context context) { - cancelAsync(resourceGroupName, workspaceName, id, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of JobBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of JobBase entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsImpl.java deleted file mode 100644 index 47f39f713b94..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsImpl.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.machinelearning.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.machinelearning.fluent.JobsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -import com.azure.resourcemanager.machinelearning.models.JobBase; -import com.azure.resourcemanager.machinelearning.models.Jobs; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -public final class JobsImpl implements Jobs { - private static final ClientLogger LOGGER = new ClientLogger(JobsImpl.class); - - private final JobsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public JobsImpl(JobsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobBaseImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, String jobType, - String tag, ListViewType listViewType, String properties, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobBaseImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String id) { - this.serviceClient().delete(resourceGroupName, workspaceName, id); - } - - public void delete(String resourceGroupName, String workspaceName, String id, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, id, context); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String id, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, id, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new JobBaseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public JobBase get(String resourceGroupName, String workspaceName, String id) { - JobBaseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, id); - if (inner != null) { - return new JobBaseImpl(inner, this.manager()); - } else { - return null; - } - } - - public void cancel(String resourceGroupName, String workspaceName, String id) { - this.serviceClient().cancel(resourceGroupName, workspaceName, id); - } - - public void cancel(String resourceGroupName, String workspaceName, String id, Context context) { - this.serviceClient().cancel(resourceGroupName, workspaceName, id, context); - } - - public JobBase getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String varId = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (varId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, varId, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String varId = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (varId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, varId, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String varId = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (varId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - this.delete(resourceGroupName, workspaceName, varId, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String varId = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (varId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - this.delete(resourceGroupName, workspaceName, varId, context); - } - - private JobsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public JobBaseImpl define(String name) { - return new JobBaseImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListNotebookKeysResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListNotebookKeysResultImpl.java deleted file mode 100644 index 9202fd672f04..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListNotebookKeysResultImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.ListNotebookKeysResultInner; -import com.azure.resourcemanager.machinelearning.models.ListNotebookKeysResult; - -public final class ListNotebookKeysResultImpl implements ListNotebookKeysResult { - private ListNotebookKeysResultInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - ListNotebookKeysResultImpl(ListNotebookKeysResultInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String primaryAccessKey() { - return this.innerModel().primaryAccessKey(); - } - - public String secondaryAccessKey() { - return this.innerModel().secondaryAccessKey(); - } - - public ListNotebookKeysResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListStorageAccountKeysResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListStorageAccountKeysResultImpl.java deleted file mode 100644 index ed94a5476727..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListStorageAccountKeysResultImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.ListStorageAccountKeysResultInner; -import com.azure.resourcemanager.machinelearning.models.ListStorageAccountKeysResult; - -public final class ListStorageAccountKeysResultImpl implements ListStorageAccountKeysResult { - private ListStorageAccountKeysResultInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - ListStorageAccountKeysResultImpl(ListStorageAccountKeysResultInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String userStorageKey() { - return this.innerModel().userStorageKey(); - } - - public ListStorageAccountKeysResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListWorkspaceKeysResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListWorkspaceKeysResultImpl.java deleted file mode 100644 index 9e7be2fa5cb3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListWorkspaceKeysResultImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.ListNotebookKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListWorkspaceKeysResultInner; -import com.azure.resourcemanager.machinelearning.models.ListNotebookKeysResult; -import com.azure.resourcemanager.machinelearning.models.ListWorkspaceKeysResult; -import com.azure.resourcemanager.machinelearning.models.RegistryListCredentialsResult; - -public final class ListWorkspaceKeysResultImpl implements ListWorkspaceKeysResult { - private ListWorkspaceKeysResultInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - ListWorkspaceKeysResultImpl(ListWorkspaceKeysResultInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String userStorageKey() { - return this.innerModel().userStorageKey(); - } - - public String userStorageResourceId() { - return this.innerModel().userStorageResourceId(); - } - - public String appInsightsInstrumentationKey() { - return this.innerModel().appInsightsInstrumentationKey(); - } - - public RegistryListCredentialsResult containerRegistryCredentials() { - return this.innerModel().containerRegistryCredentials(); - } - - public ListNotebookKeysResult notebookAccessKeys() { - ListNotebookKeysResultInner inner = this.innerModel().notebookAccessKeys(); - if (inner != null) { - return new ListNotebookKeysResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public ListWorkspaceKeysResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionStatusImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionStatusImpl.java deleted file mode 100644 index 1f1709890f1a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionStatusImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; - -public final class ManagedNetworkProvisionStatusImpl implements ManagedNetworkProvisionStatus { - private ManagedNetworkProvisionStatusInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - ManagedNetworkProvisionStatusImpl(ManagedNetworkProvisionStatusInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Boolean sparkReady() { - return this.innerModel().sparkReady(); - } - - public ManagedNetworkStatus status() { - return this.innerModel().status(); - } - - public ManagedNetworkProvisionStatusInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsClientImpl.java deleted file mode 100644 index 96e272d5478b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsClientImpl.java +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.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.machinelearning.fluent.ManagedNetworkProvisionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions; -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 ManagedNetworkProvisionsClient. - */ -public final class ManagedNetworkProvisionsClientImpl implements ManagedNetworkProvisionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedNetworkProvisionsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of ManagedNetworkProvisionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedNetworkProvisionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(ManagedNetworkProvisionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesManagedNetworkProvisions to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface ManagedNetworkProvisionsService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/provisionManagedNetwork") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> provisionManagedNetwork(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedNetworkProvisionOptions body, @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param body Managed Network Provisioning Options for a machine learning workspace. - * @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 status of the Provisioning for the managed network of a machine learning workspace along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> provisionManagedNetworkWithResponseAsync(String resourceGroupName, - String workspaceName, ManagedNetworkProvisionOptions body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.provisionManagedNetwork(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param body Managed Network Provisioning Options for a machine learning workspace. - * @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 status of the Provisioning for the managed network of a machine learning workspace along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> provisionManagedNetworkWithResponseAsync(String resourceGroupName, - String workspaceName, ManagedNetworkProvisionOptions body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.provisionManagedNetwork(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param body Managed Network Provisioning Options for a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of status of the Provisioning for the managed network of a machine - * learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedNetworkProvisionStatusInner> - beginProvisionManagedNetworkAsync(String resourceGroupName, String workspaceName, - ManagedNetworkProvisionOptions body) { - Mono>> mono - = provisionManagedNetworkWithResponseAsync(resourceGroupName, workspaceName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedNetworkProvisionStatusInner.class, - ManagedNetworkProvisionStatusInner.class, this.client.getContext()); - } - - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of status of the Provisioning for the managed network of a machine - * learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedNetworkProvisionStatusInner> - beginProvisionManagedNetworkAsync(String resourceGroupName, String workspaceName) { - final ManagedNetworkProvisionOptions body = null; - Mono>> mono - = provisionManagedNetworkWithResponseAsync(resourceGroupName, workspaceName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedNetworkProvisionStatusInner.class, - ManagedNetworkProvisionStatusInner.class, this.client.getContext()); - } - - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param body Managed Network Provisioning Options for a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of status of the Provisioning for the managed network of a machine - * learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedNetworkProvisionStatusInner> - beginProvisionManagedNetworkAsync(String resourceGroupName, String workspaceName, - ManagedNetworkProvisionOptions body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = provisionManagedNetworkWithResponseAsync(resourceGroupName, workspaceName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedNetworkProvisionStatusInner.class, - ManagedNetworkProvisionStatusInner.class, context); - } - - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of status of the Provisioning for the managed network of a machine - * learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedNetworkProvisionStatusInner> - beginProvisionManagedNetwork(String resourceGroupName, String workspaceName) { - final ManagedNetworkProvisionOptions body = null; - return this.beginProvisionManagedNetworkAsync(resourceGroupName, workspaceName, body).getSyncPoller(); - } - - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param body Managed Network Provisioning Options for a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of status of the Provisioning for the managed network of a machine - * learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedNetworkProvisionStatusInner> - beginProvisionManagedNetwork(String resourceGroupName, String workspaceName, - ManagedNetworkProvisionOptions body, Context context) { - return this.beginProvisionManagedNetworkAsync(resourceGroupName, workspaceName, body, context).getSyncPoller(); - } - - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param body Managed Network Provisioning Options for a machine learning workspace. - * @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 status of the Provisioning for the managed network of a machine learning workspace on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono provisionManagedNetworkAsync(String resourceGroupName, - String workspaceName, ManagedNetworkProvisionOptions body) { - return beginProvisionManagedNetworkAsync(resourceGroupName, workspaceName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 status of the Provisioning for the managed network of a machine learning workspace on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono provisionManagedNetworkAsync(String resourceGroupName, - String workspaceName) { - final ManagedNetworkProvisionOptions body = null; - return beginProvisionManagedNetworkAsync(resourceGroupName, workspaceName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param body Managed Network Provisioning Options for a machine learning workspace. - * @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 status of the Provisioning for the managed network of a machine learning workspace on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono provisionManagedNetworkAsync(String resourceGroupName, - String workspaceName, ManagedNetworkProvisionOptions body, Context context) { - return beginProvisionManagedNetworkAsync(resourceGroupName, workspaceName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 status of the Provisioning for the managed network of a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedNetworkProvisionStatusInner provisionManagedNetwork(String resourceGroupName, String workspaceName) { - final ManagedNetworkProvisionOptions body = null; - return provisionManagedNetworkAsync(resourceGroupName, workspaceName, body).block(); - } - - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param body Managed Network Provisioning Options for a machine learning workspace. - * @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 status of the Provisioning for the managed network of a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedNetworkProvisionStatusInner provisionManagedNetwork(String resourceGroupName, String workspaceName, - ManagedNetworkProvisionOptions body, Context context) { - return provisionManagedNetworkAsync(resourceGroupName, workspaceName, body, context).block(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsImpl.java deleted file mode 100644 index f4cf1d1ea9aa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsImpl.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.machinelearning.implementation; - -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkProvisionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisions; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionStatus; - -public final class ManagedNetworkProvisionsImpl implements ManagedNetworkProvisions { - private static final ClientLogger LOGGER = new ClientLogger(ManagedNetworkProvisionsImpl.class); - - private final ManagedNetworkProvisionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public ManagedNetworkProvisionsImpl(ManagedNetworkProvisionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public ManagedNetworkProvisionStatus provisionManagedNetwork(String resourceGroupName, String workspaceName) { - ManagedNetworkProvisionStatusInner inner - = this.serviceClient().provisionManagedNetwork(resourceGroupName, workspaceName); - if (inner != null) { - return new ManagedNetworkProvisionStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public ManagedNetworkProvisionStatus provisionManagedNetwork(String resourceGroupName, String workspaceName, - ManagedNetworkProvisionOptions body, Context context) { - ManagedNetworkProvisionStatusInner inner - = this.serviceClient().provisionManagedNetwork(resourceGroupName, workspaceName, body, context); - if (inner != null) { - return new ManagedNetworkProvisionStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - private ManagedNetworkProvisionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsImpl.java deleted file mode 100644 index 5f961f321633..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; -import com.azure.resourcemanager.machinelearning.models.IsolationMode; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettings; -import com.azure.resourcemanager.machinelearning.models.OutboundRule; -import java.util.Collections; -import java.util.Map; - -public final class ManagedNetworkSettingsImpl implements ManagedNetworkSettings { - private ManagedNetworkSettingsInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - ManagedNetworkSettingsImpl(ManagedNetworkSettingsInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public IsolationMode isolationMode() { - return this.innerModel().isolationMode(); - } - - public String networkId() { - return this.innerModel().networkId(); - } - - public Map outboundRules() { - Map inner = this.innerModel().outboundRules(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public ManagedNetworkProvisionStatus status() { - ManagedNetworkProvisionStatusInner inner = this.innerModel().status(); - if (inner != null) { - return new ManagedNetworkProvisionStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public ManagedNetworkSettingsInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesClientImpl.java deleted file mode 100644 index ea48a2334edb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesClientImpl.java +++ /dev/null @@ -1,934 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.ManagedNetworkSettingsRulesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.OutboundRuleListResult; -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 ManagedNetworkSettingsRulesClient. - */ -public final class ManagedNetworkSettingsRulesClientImpl implements ManagedNetworkSettingsRulesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedNetworkSettingsRulesService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of ManagedNetworkSettingsRulesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedNetworkSettingsRulesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(ManagedNetworkSettingsRulesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesManagedNetworkSettingsRules to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface ManagedNetworkSettingsRulesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("ruleName") String ruleName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("ruleName") String ruleName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("ruleName") String ruleName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") OutboundRuleBasicResourceInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists the managed network outbound rules for a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of outbound rules for the managed network of a machine learning workspace along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, 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 the managed network outbound rules for a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of outbound rules for the managed network of a machine learning workspace along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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, workspaceName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists the managed network outbound rules for a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of outbound rules for the managed network of a machine learning workspace as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists the managed network outbound rules for a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of outbound rules for the managed network of a machine learning workspace as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the managed network outbound rules for a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of outbound rules for the managed network of a machine learning workspace as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); - } - - /** - * Lists the managed network outbound rules for a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of outbound rules for the managed network of a machine learning workspace as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String ruleName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, ruleName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String ruleName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleName 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, - workspaceName, ruleName, this.client.getApiVersion(), accept, context); - } - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String ruleName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, ruleName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String ruleName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, ruleName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String ruleName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, ruleName).getSyncPoller(); - } - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String ruleName, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, ruleName, context).getSyncPoller(); - } - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String ruleName) { - return beginDeleteAsync(resourceGroupName, workspaceName, ruleName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String ruleName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, ruleName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String ruleName) { - deleteAsync(resourceGroupName, workspaceName, ruleName).block(); - } - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String ruleName, Context context) { - deleteAsync(resourceGroupName, workspaceName, ruleName, context).block(); - } - - /** - * Gets an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @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 an outbound rule from the managed network of a machine learning workspace along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String ruleName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, ruleName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @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 an outbound rule from the managed network of a machine learning workspace along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String ruleName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleName 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, workspaceName, - ruleName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @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 an outbound rule from the managed network of a machine learning workspace on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, - String ruleName) { - return getWithResponseAsync(resourceGroupName, workspaceName, ruleName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @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 an outbound rule from the managed network of a machine learning workspace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String ruleName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, ruleName, context).block(); - } - - /** - * Gets an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @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 an outbound rule from the managed network of a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OutboundRuleBasicResourceInner get(String resourceGroupName, String workspaceName, String ruleName) { - return getWithResponse(resourceGroupName, workspaceName, ruleName, Context.NONE).getValue(); - } - - /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. - * @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 outbound Rule Basic Resource for the managed network of a machine learning workspace along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String ruleName, OutboundRuleBasicResourceInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, ruleName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. - * @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 outbound Rule Basic Resource for the managed network of a machine learning workspace along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String ruleName, OutboundRuleBasicResourceInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, ruleName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of outbound Rule Basic Resource for the managed network of a machine - * learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OutboundRuleBasicResourceInner> - beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String ruleName, - OutboundRuleBasicResourceInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OutboundRuleBasicResourceInner.class, OutboundRuleBasicResourceInner.class, - this.client.getContext()); - } - - /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of outbound Rule Basic Resource for the managed network of a machine - * learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OutboundRuleBasicResourceInner> - beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String ruleName, - OutboundRuleBasicResourceInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OutboundRuleBasicResourceInner.class, OutboundRuleBasicResourceInner.class, - context); - } - - /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of outbound Rule Basic Resource for the managed network of a machine - * learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body).getSyncPoller(); - } - - /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of outbound Rule Basic Resource for the managed network of a machine - * learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body, context).getSyncPoller(); - } - - /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. - * @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 outbound Rule Basic Resource for the managed network of a machine learning workspace on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String ruleName, OutboundRuleBasicResourceInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. - * @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 outbound Rule Basic Resource for the managed network of a machine learning workspace on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String ruleName, OutboundRuleBasicResourceInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. - * @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 outbound Rule Basic Resource for the managed network of a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, - String ruleName, OutboundRuleBasicResourceInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body).block(); - } - - /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. - * @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 outbound Rule Basic Resource for the managed network of a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, - String ruleName, OutboundRuleBasicResourceInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of outbound rules for the managed network of a machine learning workspace along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of outbound rules for the managed network of a machine learning workspace 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesImpl.java deleted file mode 100644 index 4e0e44e021e6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.ManagedNetworkSettingsRulesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsRules; -import com.azure.resourcemanager.machinelearning.models.OutboundRuleBasicResource; - -public final class ManagedNetworkSettingsRulesImpl implements ManagedNetworkSettingsRules { - private static final ClientLogger LOGGER = new ClientLogger(ManagedNetworkSettingsRulesImpl.class); - - private final ManagedNetworkSettingsRulesClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public ManagedNetworkSettingsRulesImpl(ManagedNetworkSettingsRulesClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OutboundRuleBasicResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OutboundRuleBasicResourceImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String ruleName) { - this.serviceClient().delete(resourceGroupName, workspaceName, ruleName); - } - - public void delete(String resourceGroupName, String workspaceName, String ruleName, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, ruleName, context); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, - String ruleName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, ruleName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OutboundRuleBasicResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public OutboundRuleBasicResource get(String resourceGroupName, String workspaceName, String ruleName) { - OutboundRuleBasicResourceInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleName); - if (inner != null) { - return new OutboundRuleBasicResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public OutboundRuleBasicResource getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String ruleName = ResourceManagerUtils.getValueFromIdByName(id, "outboundRules"); - if (ruleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'outboundRules'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, ruleName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String ruleName = ResourceManagerUtils.getValueFromIdByName(id, "outboundRules"); - if (ruleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'outboundRules'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, ruleName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String ruleName = ResourceManagerUtils.getValueFromIdByName(id, "outboundRules"); - if (ruleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'outboundRules'.", id))); - } - this.delete(resourceGroupName, workspaceName, ruleName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String ruleName = ResourceManagerUtils.getValueFromIdByName(id, "outboundRules"); - if (ruleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'outboundRules'.", id))); - } - this.delete(resourceGroupName, workspaceName, ruleName, context); - } - - private ManagedNetworkSettingsRulesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public OutboundRuleBasicResourceImpl define(String name) { - return new OutboundRuleBasicResourceImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionImpl.java deleted file mode 100644 index 57985f853d60..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionImpl.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.MarketplaceSubscriptionInner; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscription; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties; - -public final class MarketplaceSubscriptionImpl - implements MarketplaceSubscription, MarketplaceSubscription.Definition, MarketplaceSubscription.Update { - private MarketplaceSubscriptionInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public MarketplaceSubscriptionProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public MarketplaceSubscriptionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public MarketplaceSubscriptionImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public MarketplaceSubscription create() { - this.innerObject = serviceManager.serviceClient() - .getMarketplaceSubscriptions() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); - return this; - } - - public MarketplaceSubscription create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getMarketplaceSubscriptions() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); - return this; - } - - MarketplaceSubscriptionImpl(String name, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new MarketplaceSubscriptionInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public MarketplaceSubscriptionImpl update() { - return this; - } - - public MarketplaceSubscription apply() { - this.innerObject = serviceManager.serviceClient() - .getMarketplaceSubscriptions() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); - return this; - } - - public MarketplaceSubscription apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getMarketplaceSubscriptions() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); - return this; - } - - MarketplaceSubscriptionImpl(MarketplaceSubscriptionInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "marketplaceSubscriptions"); - } - - public MarketplaceSubscription refresh() { - this.innerObject = serviceManager.serviceClient() - .getMarketplaceSubscriptions() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public MarketplaceSubscription refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getMarketplaceSubscriptions() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public MarketplaceSubscriptionImpl withProperties(MarketplaceSubscriptionProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsClientImpl.java deleted file mode 100644 index 926936abcdd4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsClientImpl.java +++ /dev/null @@ -1,944 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.MarketplaceSubscriptionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.MarketplaceSubscriptionInner; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionResourceArmPaginatedResult; -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 MarketplaceSubscriptionsClient. - */ -public final class MarketplaceSubscriptionsClientImpl implements MarketplaceSubscriptionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final MarketplaceSubscriptionsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of MarketplaceSubscriptionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - MarketplaceSubscriptionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(MarketplaceSubscriptionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesMarketplaceSubscriptions to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface MarketplaceSubscriptionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MarketplaceSubscriptionInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of MarketplaceSubscription entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 a paginated list of MarketplaceSubscription entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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, workspaceName, - this.client.getApiVersion(), skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String skip, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, context)); - } - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name).getSyncPoller(); - } - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, context).getSyncPoller(); - } - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return beginDeleteAsync(resourceGroupName, workspaceName, name).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); - } - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - deleteAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, workspaceName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MarketplaceSubscriptionInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Create or update Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during 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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, MarketplaceSubscriptionInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, MarketplaceSubscriptionInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MarketplaceSubscriptionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), MarketplaceSubscriptionInner.class, MarketplaceSubscriptionInner.class, - this.client.getContext()); - } - - /** - * Create or update Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MarketplaceSubscriptionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), MarketplaceSubscriptionInner.class, MarketplaceSubscriptionInner.class, - context); - } - - /** - * Create or update Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MarketplaceSubscriptionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); - } - - /** - * Create or update Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MarketplaceSubscriptionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); - } - - /** - * Create or update Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during 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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, MarketplaceSubscriptionInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, MarketplaceSubscriptionInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during 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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MarketplaceSubscriptionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - MarketplaceSubscriptionInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); - } - - /** - * Create or update Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MarketplaceSubscriptionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - MarketplaceSubscriptionInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of MarketplaceSubscription entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of MarketplaceSubscription entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsImpl.java deleted file mode 100644 index 6ff1a2cd38b0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsImpl.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.machinelearning.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.machinelearning.fluent.MarketplaceSubscriptionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.MarketplaceSubscriptionInner; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscription; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptions; - -public final class MarketplaceSubscriptionsImpl implements MarketplaceSubscriptions { - private static final ClientLogger LOGGER = new ClientLogger(MarketplaceSubscriptionsImpl.class); - - private final MarketplaceSubscriptionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public MarketplaceSubscriptionsImpl(MarketplaceSubscriptionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MarketplaceSubscriptionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MarketplaceSubscriptionImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, context); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new MarketplaceSubscriptionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public MarketplaceSubscription get(String resourceGroupName, String workspaceName, String name) { - MarketplaceSubscriptionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new MarketplaceSubscriptionImpl(inner, this.manager()); - } else { - return null; - } - } - - public MarketplaceSubscription getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "marketplaceSubscriptions"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'marketplaceSubscriptions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "marketplaceSubscriptions"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'marketplaceSubscriptions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "marketplaceSubscriptions"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'marketplaceSubscriptions'.", id))); - } - this.delete(resourceGroupName, workspaceName, name, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "marketplaceSubscriptions"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'marketplaceSubscriptions'.", id))); - } - this.delete(resourceGroupName, workspaceName, name, context); - } - - private MarketplaceSubscriptionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public MarketplaceSubscriptionImpl define(String name) { - return new MarketplaceSubscriptionImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java deleted file mode 100644 index de2c051030fd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.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.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; - -public final class ModelContainerImpl implements ModelContainer, ModelContainer.Definition, ModelContainer.Update { - private ModelContainerInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ModelContainerProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ModelContainerInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public ModelContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public ModelContainer create() { - this.innerObject = serviceManager.serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ModelContainer create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - ModelContainerImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ModelContainerInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public ModelContainerImpl update() { - return this; - } - - public ModelContainer apply() { - this.innerObject = serviceManager.serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ModelContainer apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - ModelContainerImpl(ModelContainerInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "models"); - } - - public ModelContainer refresh() { - this.innerObject = serviceManager.serviceClient() - .getModelContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public ModelContainer refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getModelContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public ModelContainerImpl withProperties(ModelContainerProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java deleted file mode 100644 index 493e45b64264..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java +++ /dev/null @@ -1,758 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelContainerResourceArmPaginatedResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ModelContainersClient. - */ -public final class ModelContainersClientImpl implements ModelContainersClient { - /** - * The proxy service used to perform REST calls. - */ - private final ModelContainersService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of ModelContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ModelContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(ModelContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesModelContainers to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface ModelContainersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("count") Integer count, @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ModelContainerInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, Integer count, ListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, this.client.getApiVersion(), skip, count, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, Integer count, ListViewType listViewType, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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, workspaceName, - this.client.getApiVersion(), skip, count, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - Integer count, ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final Integer count = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - Integer count, ListViewType listViewType, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final Integer count = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count, listViewType)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Integer count, ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count, listViewType, context)); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, workspaceName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelContainerInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, ModelContainerInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, ModelContainerInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - ModelContainerInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, ModelContainerInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ModelContainerInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersImpl.java deleted file mode 100644 index 20efa5792028..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersImpl.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.ModelContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import com.azure.resourcemanager.machinelearning.models.ModelContainers; - -public final class ModelContainersImpl implements ModelContainers { - private static final ClientLogger LOGGER = new ClientLogger(ModelContainersImpl.class); - - private final ModelContainersClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public ModelContainersImpl(ModelContainersClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Integer count, ListViewType listViewType, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, count, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); - } - - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ModelContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ModelContainer get(String resourceGroupName, String workspaceName, String name) { - ModelContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new ModelContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public ModelContainer getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - private ModelContainersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public ModelContainerImpl define(String name) { - return new ModelContainerImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java deleted file mode 100644 index f3f0d5289c5c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.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.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; - -public final class ModelVersionImpl implements ModelVersion, ModelVersion.Definition, ModelVersion.Update { - private ModelVersionInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ModelVersionProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ModelVersionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - private String version; - - public ModelVersionImpl withExistingModel(String resourceGroupName, String workspaceName, String name) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; - return this; - } - - public ModelVersion create() { - this.innerObject = serviceManager.serviceClient() - .getModelVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public ModelVersion create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getModelVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - ModelVersionImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ModelVersionInner(); - this.serviceManager = serviceManager; - this.version = name; - } - - public ModelVersionImpl update() { - return this; - } - - public ModelVersion apply() { - this.innerObject = serviceManager.serviceClient() - .getModelVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public ModelVersion apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getModelVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - ModelVersionImpl(ModelVersionInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "models"); - this.version = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "versions"); - } - - public ModelVersion refresh() { - this.innerObject = serviceManager.serviceClient() - .getModelVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); - return this; - } - - public ModelVersion refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getModelVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); - return this; - } - - public void publish(DestinationAsset body) { - serviceManager.modelVersions().publish(resourceGroupName, workspaceName, name, version, body); - } - - public void publish(DestinationAsset body, Context context) { - serviceManager.modelVersions().publish(resourceGroupName, workspaceName, name, version, body, context); - } - - public ModelVersionImpl withProperties(ModelVersionProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java deleted file mode 100644 index 97bef5abd7d3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java +++ /dev/null @@ -1,1151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.ModelVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelVersionResourceArmPaginatedResult; -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 ModelVersionsClient. - */ -public final class ModelVersionsClientImpl implements ModelVersionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ModelVersionsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of ModelVersionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ModelVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(ModelVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesModelVersions to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface ModelVersionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, - @QueryParam("version") String version, @QueryParam("description") String description, - @QueryParam("offset") Integer offset, @QueryParam("tags") String tags, - @QueryParam("properties") String properties, @QueryParam("feed") String feed, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ModelVersionInner body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}/publish") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> publish(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DestinationAsset body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String name, String skip, String orderBy, Integer top, String version, String description, Integer offset, - String tags, String properties, String feed, ListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), skip, orderBy, top, version, - description, offset, tags, properties, feed, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String name, String skip, String orderBy, Integer top, String version, String description, Integer offset, - String tags, String properties, String feed, ListViewType listViewType, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, workspaceName, name, - this.client.getApiVersion(), skip, orderBy, top, version, description, offset, tags, properties, feed, - listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String skip, String orderBy, Integer top, String version, String description, Integer offset, String tags, - String properties, String feed, ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, orderBy, top, - version, description, offset, tags, properties, feed, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { - final String skip = null; - final String orderBy = null; - final Integer top = null; - final String version = null; - final String description = null; - final Integer offset = null; - final String tags = null; - final String properties = null; - final String feed = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, orderBy, top, - version, description, offset, tags, properties, feed, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String skip, String orderBy, Integer top, String version, String description, Integer offset, String tags, - String properties, String feed, ListViewType listViewType, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, orderBy, top, version, description, - offset, tags, properties, feed, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - final String skip = null; - final String orderBy = null; - final Integer top = null; - final String version = null; - final String description = null; - final Integer offset = null; - final String tags = null; - final String properties = null; - final String feed = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, skip, orderBy, top, version, - description, offset, tags, properties, feed, listViewType)); - } - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String skip, String orderBy, Integer top, String version, String description, Integer offset, String tags, - String properties, String feed, ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, skip, orderBy, top, version, - description, offset, tags, properties, feed, listViewType, context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, - workspaceName, name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, workspaceName, - name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name, - String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, ModelVersionInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, ModelVersionInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - String version, ModelVersionInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, String version, ModelVersionInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - ModelVersionInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) - .getValue(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body) { - Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, - String version, DestinationAsset body, Context context) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono publishAsync(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body) { - return beginPublishAsync(resourceGroupName, workspaceName, name, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono publishAsync(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - return beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body) { - publishAsync(resourceGroupName, workspaceName, name, version, body).block(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - publishAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsImpl.java deleted file mode 100644 index f1fe269b5996..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsImpl.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.machinelearning.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.machinelearning.fluent.ModelVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import com.azure.resourcemanager.machinelearning.models.ModelVersions; - -public final class ModelVersionsImpl implements ModelVersions { - private static final ClientLogger LOGGER = new ClientLogger(ModelVersionsImpl.class); - - private final ModelVersionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public ModelVersionsImpl(ModelVersionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, - String orderBy, Integer top, String version, String description, Integer offset, String tags, String properties, - String feed, ListViewType listViewType, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, name, skip, orderBy, top, version, description, offset, tags, - properties, feed, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); - } - - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ModelVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ModelVersion get(String resourceGroupName, String workspaceName, String name, String version) { - ModelVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new ModelVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body) { - this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body); - } - - public void publish(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body, context); - } - - public ModelVersion getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - String version = ResourceManagerUtils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - private ModelVersionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public ModelVersionImpl define(String name) { - return new ModelVersionImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookAccessTokenResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookAccessTokenResultImpl.java deleted file mode 100644 index d606c9997543..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookAccessTokenResultImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner; -import com.azure.resourcemanager.machinelearning.models.NotebookAccessTokenResult; - -public final class NotebookAccessTokenResultImpl implements NotebookAccessTokenResult { - private NotebookAccessTokenResultInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - NotebookAccessTokenResultImpl(NotebookAccessTokenResultInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String notebookResourceId() { - return this.innerModel().notebookResourceId(); - } - - public String hostname() { - return this.innerModel().hostname(); - } - - public String publicDns() { - return this.innerModel().publicDns(); - } - - public String accessToken() { - return this.innerModel().accessToken(); - } - - public String tokenType() { - return this.innerModel().tokenType(); - } - - public Integer expiresIn() { - return this.innerModel().expiresIn(); - } - - public String refreshToken() { - return this.innerModel().refreshToken(); - } - - public String scope() { - return this.innerModel().scope(); - } - - public NotebookAccessTokenResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookResourceInfoImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookResourceInfoImpl.java deleted file mode 100644 index a4f232ff10d3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookResourceInfoImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; -import com.azure.resourcemanager.machinelearning.models.NotebookPreparationError; -import com.azure.resourcemanager.machinelearning.models.NotebookResourceInfo; - -public final class NotebookResourceInfoImpl implements NotebookResourceInfo { - private NotebookResourceInfoInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - NotebookResourceInfoImpl(NotebookResourceInfoInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String fqdn() { - return this.innerModel().fqdn(); - } - - public String resourceId() { - return this.innerModel().resourceId(); - } - - public NotebookPreparationError notebookPreparationError() { - return this.innerModel().notebookPreparationError(); - } - - public NotebookResourceInfoInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java deleted file mode 100644 index 1219e37c4d82..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.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.machinelearning.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.machinelearning.fluent.models.OnlineDeploymentInner; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogs; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.OnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentProperties; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.util.Collections; -import java.util.Map; - -public final class OnlineDeploymentImpl - implements OnlineDeployment, OnlineDeployment.Definition, OnlineDeployment.Update { - private OnlineDeploymentInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager 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 OnlineDeploymentProperties properties() { - return this.innerModel().properties(); - } - - public String kind() { - return this.innerModel().kind(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public Sku sku() { - return this.innerModel().sku(); - } - - 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 OnlineDeploymentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String endpointName; - - private String deploymentName; - - private PartialMinimalTrackedResourceWithSku updateBody; - - public OnlineDeploymentImpl withExistingOnlineEndpoint(String resourceGroupName, String workspaceName, - String endpointName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.endpointName = endpointName; - return this; - } - - public OnlineDeployment create() { - this.innerObject = serviceManager.serviceClient() - .getOnlineDeployments() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), - Context.NONE); - return this; - } - - public OnlineDeployment create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOnlineDeployments() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), context); - return this; - } - - OnlineDeploymentImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new OnlineDeploymentInner(); - this.serviceManager = serviceManager; - this.deploymentName = name; - } - - public OnlineDeploymentImpl update() { - this.updateBody = new PartialMinimalTrackedResourceWithSku(); - return this; - } - - public OnlineDeployment apply() { - this.innerObject = serviceManager.serviceClient() - .getOnlineDeployments() - .update(resourceGroupName, workspaceName, endpointName, deploymentName, updateBody, Context.NONE); - return this; - } - - public OnlineDeployment apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOnlineDeployments() - .update(resourceGroupName, workspaceName, endpointName, deploymentName, updateBody, context); - return this; - } - - OnlineDeploymentImpl(OnlineDeploymentInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.endpointName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "onlineEndpoints"); - this.deploymentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "deployments"); - } - - public OnlineDeployment refresh() { - this.innerObject = serviceManager.serviceClient() - .getOnlineDeployments() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE) - .getValue(); - return this; - } - - public OnlineDeployment refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOnlineDeployments() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .getValue(); - return this; - } - - public Response getLogsWithResponse(DeploymentLogsRequest body, Context context) { - return serviceManager.onlineDeployments() - .getLogsWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); - } - - public DeploymentLogs getLogs(DeploymentLogsRequest body) { - return serviceManager.onlineDeployments() - .getLogs(resourceGroupName, workspaceName, endpointName, deploymentName, body); - } - - public OnlineDeploymentImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public OnlineDeploymentImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public OnlineDeploymentImpl withProperties(OnlineDeploymentProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public OnlineDeploymentImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public OnlineDeploymentImpl withKind(String kind) { - this.innerModel().withKind(kind); - return this; - } - - public OnlineDeploymentImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public OnlineDeploymentImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public OnlineDeploymentImpl withSku(PartialSku sku) { - this.updateBody.withSku(sku); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java deleted file mode 100644 index 4e71103e1745..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java +++ /dev/null @@ -1,1776 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.OnlineDeploymentsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner; -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; -import com.azure.resourcemanager.machinelearning.models.SkuResourceArmPaginatedResult; -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 OnlineDeploymentsClient. - */ -public final class OnlineDeploymentsClientImpl implements OnlineDeploymentsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OnlineDeploymentsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of OnlineDeploymentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OnlineDeploymentsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(OnlineDeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesOnlineDeployments to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface OnlineDeploymentsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialMinimalTrackedResourceWithSku body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") OnlineDeploymentInner body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/getLogs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getLogs(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DeploymentLogsRequest body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSkus(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, @QueryParam("count") Integer count, - @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSkusNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String endpointName, String orderBy, Integer top, String skip) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), orderBy, top, skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @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 a paginated list of OnlineDeployment entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String endpointName, String orderBy, Integer top, String skip, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName 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, workspaceName, - endpointName, this.client.getApiVersion(), orderBy, top, skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String endpointName, String orderBy, Integer top, String skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String endpointName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @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 a paginated list of OnlineDeployment entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String endpointName, String orderBy, Integer top, String skip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - String endpointName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip)); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @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 a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - String endpointName, String orderBy, Integer top, String skip, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context)); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName 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, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).getSyncPoller(); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .getSyncPoller(); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).block(); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - Context context) { - deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); - } - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @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 inference Deployment Deployment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @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 inference Deployment Deployment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName 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, workspaceName, - endpointName, deploymentName, this.client.getApiVersion(), accept, context); - } - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @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 inference Deployment Deployment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @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 inference Deployment Deployment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); - } - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @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 inference Deployment Deployment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner get(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName) { - return getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE).getValue(); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during 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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineDeploymentInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialMinimalTrackedResourceWithSku body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, - this.client.getContext()); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineDeploymentInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialMinimalTrackedResourceWithSku body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, context); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineDeploymentInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .getSyncPoller(); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineDeploymentInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body, - Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .getSyncPoller(); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during 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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialMinimalTrackedResourceWithSku body) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialMinimalTrackedResourceWithSku body, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialMinimalTrackedResourceWithSku body) { - return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialMinimalTrackedResourceWithSku body, Context context) { - return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context).block(); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during 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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, OnlineDeploymentInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, OnlineDeploymentInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, - this.client.getContext()); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, - endpointName, deploymentName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, context); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .getSyncPoller(); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentInner body, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .getSyncPoller(); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during 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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, OnlineDeploymentInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, OnlineDeploymentInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, OnlineDeploymentInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, OnlineDeploymentInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .block(); - } - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getLogsWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, DeploymentLogsRequest body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getLogs(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getLogsWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, DeploymentLogsRequest body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getLogs(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getLogsAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, DeploymentLogsRequest body) { - return getLogsWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getLogsWithResponse(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, DeploymentLogsRequest body, Context context) { - return getLogsWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .block(); - } - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentLogsInner getLogs(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, DeploymentLogsRequest body) { - return getLogsWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, Context.NONE) - .getValue(); - } - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param count Number of Skus to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of SkuResource entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusSinglePageAsync(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, Integer count, String skip) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listSkus(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, deploymentName, this.client.getApiVersion(), count, - skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param count Number of Skus to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @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 a paginated list of SkuResource entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusSinglePageAsync(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, Integer count, String skip, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listSkus(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - endpointName, deploymentName, this.client.getApiVersion(), count, skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param count Number of Skus to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of SkuResource entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, Integer count, String skip) { - return new PagedFlux<>( - () -> listSkusSinglePageAsync(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip), - nextLink -> listSkusNextSinglePageAsync(nextLink)); - } - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of SkuResource entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName) { - final Integer count = null; - final String skip = null; - return new PagedFlux<>( - () -> listSkusSinglePageAsync(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip), - nextLink -> listSkusNextSinglePageAsync(nextLink)); - } - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param count Number of Skus to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @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 a paginated list of SkuResource entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, Integer count, String skip, Context context) { - return new PagedFlux<>(() -> listSkusSinglePageAsync(resourceGroupName, workspaceName, endpointName, - deploymentName, count, skip, context), nextLink -> listSkusNextSinglePageAsync(nextLink, context)); - } - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSkus(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName) { - final Integer count = null; - final String skip = null; - return new PagedIterable<>( - listSkusAsync(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip)); - } - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param count Number of Skus to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @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 a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSkus(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Integer count, String skip, Context context) { - return new PagedIterable<>( - listSkusAsync(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities 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)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of SkuResource entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusNextSinglePageAsync(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.listSkusNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of SkuResource entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusNextSinglePageAsync(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.listSkusNext(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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsImpl.java deleted file mode 100644 index 9232468ea4ce..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsImpl.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.machinelearning.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.machinelearning.fluent.OnlineDeploymentsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner; -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogs; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -import com.azure.resourcemanager.machinelearning.models.OnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.OnlineDeployments; -import com.azure.resourcemanager.machinelearning.models.SkuResource; - -public final class OnlineDeploymentsImpl implements OnlineDeployments { - private static final ClientLogger LOGGER = new ClientLogger(OnlineDeploymentsImpl.class); - - private final OnlineDeploymentsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public OnlineDeploymentsImpl(OnlineDeploymentsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, endpointName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OnlineDeploymentImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, - String orderBy, Integer top, String skip, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OnlineDeploymentImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OnlineDeploymentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public OnlineDeployment get(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName) { - OnlineDeploymentInner inner - = this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); - if (inner != null) { - return new OnlineDeploymentImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getLogsWithResponse(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, DeploymentLogsRequest body, Context context) { - Response inner = this.serviceClient() - .getLogsWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DeploymentLogsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DeploymentLogs getLogs(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, DeploymentLogsRequest body) { - DeploymentLogsInner inner - = this.serviceClient().getLogs(resourceGroupName, workspaceName, endpointName, deploymentName, body); - if (inner != null) { - return new DeploymentLogsImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listSkus(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName) { - PagedIterable inner - = this.serviceClient().listSkus(resourceGroupName, workspaceName, endpointName, deploymentName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuResourceImpl(inner1, this.manager())); - } - - public PagedIterable listSkus(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Integer count, String skip, Context context) { - PagedIterable inner = this.serviceClient() - .listSkus(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuResourceImpl(inner1, this.manager())); - } - - public OnlineDeployment getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "onlineEndpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); - } - String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); - if (deploymentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "onlineEndpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); - } - String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); - if (deploymentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "onlineEndpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); - } - String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); - if (deploymentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); - } - this.delete(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "onlineEndpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); - } - String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); - if (deploymentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); - } - this.delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); - } - - private OnlineDeploymentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public OnlineDeploymentImpl define(String name) { - return new OnlineDeploymentImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java deleted file mode 100644 index 26821fa97776..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.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.machinelearning.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.machinelearning.fluent.models.OnlineEndpointInner; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthKeys; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthToken; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpoint; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; -import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.util.Collections; -import java.util.Map; - -public final class OnlineEndpointImpl implements OnlineEndpoint, OnlineEndpoint.Definition, OnlineEndpoint.Update { - private OnlineEndpointInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager 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 OnlineEndpointProperties properties() { - return this.innerModel().properties(); - } - - public String kind() { - return this.innerModel().kind(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public Sku sku() { - return this.innerModel().sku(); - } - - 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 OnlineEndpointInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String endpointName; - - private PartialMinimalTrackedResourceWithIdentity updateBody; - - public OnlineEndpointImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public OnlineEndpoint create() { - this.innerObject = serviceManager.serviceClient() - .getOnlineEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), Context.NONE); - return this; - } - - public OnlineEndpoint create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOnlineEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), context); - return this; - } - - OnlineEndpointImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new OnlineEndpointInner(); - this.serviceManager = serviceManager; - this.endpointName = name; - } - - public OnlineEndpointImpl update() { - this.updateBody = new PartialMinimalTrackedResourceWithIdentity(); - return this; - } - - public OnlineEndpoint apply() { - this.innerObject = serviceManager.serviceClient() - .getOnlineEndpoints() - .update(resourceGroupName, workspaceName, endpointName, updateBody, Context.NONE); - return this; - } - - public OnlineEndpoint apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOnlineEndpoints() - .update(resourceGroupName, workspaceName, endpointName, updateBody, context); - return this; - } - - OnlineEndpointImpl(OnlineEndpointInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.endpointName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "onlineEndpoints"); - } - - public OnlineEndpoint refresh() { - this.innerObject = serviceManager.serviceClient() - .getOnlineEndpoints() - .getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE) - .getValue(); - return this; - } - - public OnlineEndpoint refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOnlineEndpoints() - .getWithResponse(resourceGroupName, workspaceName, endpointName, context) - .getValue(); - return this; - } - - public Response listKeysWithResponse(Context context) { - return serviceManager.onlineEndpoints() - .listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); - } - - public EndpointAuthKeys listKeys() { - return serviceManager.onlineEndpoints().listKeys(resourceGroupName, workspaceName, endpointName); - } - - public void regenerateKeys(RegenerateEndpointKeysRequest body) { - serviceManager.onlineEndpoints().regenerateKeys(resourceGroupName, workspaceName, endpointName, body); - } - - public void regenerateKeys(RegenerateEndpointKeysRequest body, Context context) { - serviceManager.onlineEndpoints().regenerateKeys(resourceGroupName, workspaceName, endpointName, body, context); - } - - public Response getTokenWithResponse(Context context) { - return serviceManager.onlineEndpoints() - .getTokenWithResponse(resourceGroupName, workspaceName, endpointName, context); - } - - public EndpointAuthToken getToken() { - return serviceManager.onlineEndpoints().getToken(resourceGroupName, workspaceName, endpointName); - } - - public OnlineEndpointImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public OnlineEndpointImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public OnlineEndpointImpl withProperties(OnlineEndpointProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public OnlineEndpointImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public OnlineEndpointImpl withKind(String kind) { - this.innerModel().withKind(kind); - return this; - } - - public OnlineEndpointImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public OnlineEndpointImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public OnlineEndpointImpl withIdentity(PartialManagedServiceIdentity identity) { - this.updateBody.withIdentity(identity); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java deleted file mode 100644 index bba062523c75..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java +++ /dev/null @@ -1,1808 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.OnlineEndpointsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner; -import com.azure.resourcemanager.machinelearning.models.EndpointComputeType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.OrderString; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; -import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; -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 OnlineEndpointsClient. - */ -public final class OnlineEndpointsClientImpl implements OnlineEndpointsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OnlineEndpointsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of OnlineEndpointsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OnlineEndpointsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(OnlineEndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesOnlineEndpoints to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface OnlineEndpointsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("name") String name, - @QueryParam("count") Integer count, @QueryParam("computeType") EndpointComputeType computeType, - @QueryParam("$skip") String skip, @QueryParam("tags") String tags, - @QueryParam("properties") String properties, @QueryParam("orderBy") OrderString orderBy, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialMinimalTrackedResourceWithIdentity body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") OnlineEndpointInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/listKeys") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/regenerateKeys") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> regenerateKeys(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RegenerateEndpointKeysRequest body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/token") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getToken(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String name, Integer count, EndpointComputeType computeType, String skip, String tags, String properties, - OrderString orderBy) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), name, count, computeType, skip, tags, - properties, orderBy, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @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 a paginated list of OnlineEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String name, Integer count, EndpointComputeType computeType, String skip, String tags, String properties, - OrderString orderBy, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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, workspaceName, - this.client.getApiVersion(), name, count, computeType, skip, tags, properties, orderBy, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - Integer count, EndpointComputeType computeType, String skip, String tags, String properties, - OrderString orderBy) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, count, computeType, - skip, tags, properties, orderBy), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String name = null; - final Integer count = null; - final EndpointComputeType computeType = null; - final String skip = null; - final String tags = null; - final String properties = null; - final OrderString orderBy = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, count, computeType, - skip, tags, properties, orderBy), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @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 a paginated list of OnlineEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - Integer count, EndpointComputeType computeType, String skip, String tags, String properties, - OrderString orderBy, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, count, computeType, - skip, tags, properties, orderBy, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String name = null; - final Integer count = null; - final EndpointComputeType computeType = null; - final String skip = null; - final String tags = null; - final String properties = null; - final OrderString orderBy = null; - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, count, computeType, skip, tags, properties, orderBy)); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @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 a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - Integer count, EndpointComputeType computeType, String skip, String tags, String properties, - OrderString orderBy, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, count, computeType, skip, tags, - properties, orderBy, context)); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName 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, - workspaceName, endpointName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String endpointName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String endpointName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String endpointName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName).getSyncPoller(); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String endpointName, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context).getSyncPoller(); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName) { - deleteAsync(resourceGroupName, workspaceName, endpointName).block(); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName, Context context) { - deleteAsync(resourceGroupName, workspaceName, endpointName, context).block(); - } - - /** - * Get Online Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 online Endpoint along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get Online Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 online Endpoint along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName 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, workspaceName, - endpointName, this.client.getApiVersion(), accept, context); - } - - /** - * Get Online Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 online Endpoint on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get Online Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 online Endpoint along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String endpointName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); - } - - /** - * Get Online Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 online Endpoint. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner get(String resourceGroupName, String workspaceName, String endpointName) { - return getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during 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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, PartialMinimalTrackedResourceWithIdentity body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, PartialMinimalTrackedResourceWithIdentity body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineEndpointInner> beginUpdateAsync(String resourceGroupName, - String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - OnlineEndpointInner.class, OnlineEndpointInner.class, this.client.getContext()); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineEndpointInner> beginUpdateAsync(String resourceGroupName, - String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - OnlineEndpointInner.class, OnlineEndpointInner.class, context); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineEndpointInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineEndpointInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).getSyncPoller(); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during 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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - return updateAsync(resourceGroupName, workspaceName, endpointName, body).block(); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body, Context context) { - return updateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during 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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, OnlineEndpointInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, OnlineEndpointInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - OnlineEndpointInner.class, OnlineEndpointInner.class, this.client.getContext()); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - OnlineEndpointInner.class, OnlineEndpointInner.class, context); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) - .getSyncPoller(); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during 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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String endpointName, OnlineEndpointInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String endpointName, OnlineEndpointInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - OnlineEndpointInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).block(); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - OnlineEndpointInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); - } - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), accept, context); - } - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 keys for endpoint authentication on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listKeysAsync(String resourceGroupName, String workspaceName, - String endpointName) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 keys for endpoint authentication along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, - String endpointName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); - } - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName) { - return listKeysWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> regenerateKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.regenerateKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> regenerateKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, RegenerateEndpointKeysRequest body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.regenerateKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRegenerateKeysAsync(String resourceGroupName, String workspaceName, - String endpointName, RegenerateEndpointKeysRequest body) { - Mono>> mono - = regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRegenerateKeysAsync(String resourceGroupName, String workspaceName, - String endpointName, RegenerateEndpointKeysRequest body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRegenerateKeys(String resourceGroupName, String workspaceName, - String endpointName, RegenerateEndpointKeysRequest body) { - return this.beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRegenerateKeys(String resourceGroupName, String workspaceName, - String endpointName, RegenerateEndpointKeysRequest body, Context context) { - return this.beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body, context) - .getSyncPoller(); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono regenerateKeysAsync(String resourceGroupName, String workspaceName, String endpointName, - RegenerateEndpointKeysRequest body) { - return beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono regenerateKeysAsync(String resourceGroupName, String workspaceName, String endpointName, - RegenerateEndpointKeysRequest body, Context context) { - return beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, - RegenerateEndpointKeysRequest body) { - regenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body).block(); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, - RegenerateEndpointKeysRequest body, Context context) { - regenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); - } - - /** - * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 service Token along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getTokenWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getToken(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 service Token along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getTokenWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getToken(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), accept, context); - } - - /** - * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 service Token on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getTokenAsync(String resourceGroupName, String workspaceName, - String endpointName) { - return getTokenWithResponseAsync(resourceGroupName, workspaceName, endpointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 service Token along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTokenWithResponse(String resourceGroupName, String workspaceName, - String endpointName, Context context) { - return getTokenWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); - } - - /** - * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 service Token. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointAuthTokenInner getToken(String resourceGroupName, String workspaceName, String endpointName) { - return getTokenWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsImpl.java deleted file mode 100644 index 06c971807170..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsImpl.java +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.OnlineEndpointsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthKeys; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthToken; -import com.azure.resourcemanager.machinelearning.models.EndpointComputeType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpoint; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpoints; -import com.azure.resourcemanager.machinelearning.models.OrderString; -import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; - -public final class OnlineEndpointsImpl implements OnlineEndpoints { - private static final ClientLogger LOGGER = new ClientLogger(OnlineEndpointsImpl.class); - - private final OnlineEndpointsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public OnlineEndpointsImpl(OnlineEndpointsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OnlineEndpointImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - Integer count, EndpointComputeType computeType, String skip, String tags, String properties, - OrderString orderBy, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, name, count, computeType, skip, tags, properties, orderBy, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OnlineEndpointImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, context); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, endpointName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OnlineEndpointImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public OnlineEndpoint get(String resourceGroupName, String workspaceName, String endpointName) { - OnlineEndpointInner inner = this.serviceClient().get(resourceGroupName, workspaceName, endpointName); - if (inner != null) { - return new OnlineEndpointImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, - String endpointName, Context context) { - Response inner - = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EndpointAuthKeysImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName) { - EndpointAuthKeysInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName, endpointName); - if (inner != null) { - return new EndpointAuthKeysImpl(inner, this.manager()); - } else { - return null; - } - } - - public void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, - RegenerateEndpointKeysRequest body) { - this.serviceClient().regenerateKeys(resourceGroupName, workspaceName, endpointName, body); - } - - public void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, - RegenerateEndpointKeysRequest body, Context context) { - this.serviceClient().regenerateKeys(resourceGroupName, workspaceName, endpointName, body, context); - } - - public Response getTokenWithResponse(String resourceGroupName, String workspaceName, - String endpointName, Context context) { - Response inner - = this.serviceClient().getTokenWithResponse(resourceGroupName, workspaceName, endpointName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EndpointAuthTokenImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EndpointAuthToken getToken(String resourceGroupName, String workspaceName, String endpointName) { - EndpointAuthTokenInner inner = this.serviceClient().getToken(resourceGroupName, workspaceName, endpointName); - if (inner != null) { - return new EndpointAuthTokenImpl(inner, this.manager()); - } else { - return null; - } - } - - public OnlineEndpoint getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "onlineEndpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "onlineEndpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, endpointName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "onlineEndpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); - } - this.delete(resourceGroupName, workspaceName, endpointName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "onlineEndpoints"); - if (endpointName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); - } - this.delete(resourceGroupName, workspaceName, endpointName, context); - } - - private OnlineEndpointsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public OnlineEndpointImpl define(String name) { - return new OnlineEndpointImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationImpl.java deleted file mode 100644 index 99e81f54aa8e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.OperationInner; -import com.azure.resourcemanager.machinelearning.models.ActionType; -import com.azure.resourcemanager.machinelearning.models.Operation; -import com.azure.resourcemanager.machinelearning.models.OperationDisplay; -import com.azure.resourcemanager.machinelearning.models.Origin; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - OperationImpl(OperationInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager 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 Origin origin() { - return this.innerModel().origin(); - } - - public ActionType actionType() { - return this.innerModel().actionType(); - } - - public OperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java deleted file mode 100644 index eb1dd2ff4dac..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.OperationsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.OperationInner; -import com.azure.resourcemanager.machinelearning.models.OperationListResult; -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 AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface OperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.MachineLearningServices/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider 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(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider 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(), null, null)); - } - - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync()); - } - - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context)); - } - - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsImpl.java deleted file mode 100644 index dda6d3e32581..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/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.machinelearning.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.machinelearning.fluent.OperationsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.OperationInner; -import com.azure.resourcemanager.machinelearning.models.Operation; -import com.azure.resourcemanager.machinelearning.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.machinelearning.MachineLearningManager serviceManager; - - public OperationsImpl(OperationsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRuleBasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRuleBasicResourceImpl.java deleted file mode 100644 index 535ca75832ee..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRuleBasicResourceImpl.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.OutboundRule; -import com.azure.resourcemanager.machinelearning.models.OutboundRuleBasicResource; - -public final class OutboundRuleBasicResourceImpl - implements OutboundRuleBasicResource, OutboundRuleBasicResource.Definition, OutboundRuleBasicResource.Update { - private OutboundRuleBasicResourceInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public OutboundRule properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public OutboundRuleBasicResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String ruleName; - - public OutboundRuleBasicResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public OutboundRuleBasicResource create() { - this.innerObject = serviceManager.serviceClient() - .getManagedNetworkSettingsRules() - .createOrUpdate(resourceGroupName, workspaceName, ruleName, this.innerModel(), Context.NONE); - return this; - } - - public OutboundRuleBasicResource create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getManagedNetworkSettingsRules() - .createOrUpdate(resourceGroupName, workspaceName, ruleName, this.innerModel(), context); - return this; - } - - OutboundRuleBasicResourceImpl(String name, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new OutboundRuleBasicResourceInner(); - this.serviceManager = serviceManager; - this.ruleName = name; - } - - public OutboundRuleBasicResourceImpl update() { - return this; - } - - public OutboundRuleBasicResource apply() { - this.innerObject = serviceManager.serviceClient() - .getManagedNetworkSettingsRules() - .createOrUpdate(resourceGroupName, workspaceName, ruleName, this.innerModel(), Context.NONE); - return this; - } - - public OutboundRuleBasicResource apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getManagedNetworkSettingsRules() - .createOrUpdate(resourceGroupName, workspaceName, ruleName, this.innerModel(), context); - return this; - } - - OutboundRuleBasicResourceImpl(OutboundRuleBasicResourceInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.ruleName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "outboundRules"); - } - - public OutboundRuleBasicResource refresh() { - this.innerObject = serviceManager.serviceClient() - .getManagedNetworkSettingsRules() - .getWithResponse(resourceGroupName, workspaceName, ruleName, Context.NONE) - .getValue(); - return this; - } - - public OutboundRuleBasicResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getManagedNetworkSettingsRules() - .getWithResponse(resourceGroupName, workspaceName, ruleName, context) - .getValue(); - return this; - } - - public OutboundRuleBasicResourceImpl withProperties(OutboundRule properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PendingUploadResponseDtoImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PendingUploadResponseDtoImpl.java deleted file mode 100644 index dd3dc73314e8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PendingUploadResponseDtoImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.BlobReferenceForConsumptionDto; -import com.azure.resourcemanager.machinelearning.models.PendingUploadResponseDto; -import com.azure.resourcemanager.machinelearning.models.PendingUploadType; - -public final class PendingUploadResponseDtoImpl implements PendingUploadResponseDto { - private PendingUploadResponseDtoInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - PendingUploadResponseDtoImpl(PendingUploadResponseDtoInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public BlobReferenceForConsumptionDto blobReferenceForConsumption() { - return this.innerModel().blobReferenceForConsumption(); - } - - public String pendingUploadId() { - return this.innerModel().pendingUploadId(); - } - - public PendingUploadType pendingUploadType() { - return this.innerModel().pendingUploadType(); - } - - public PendingUploadResponseDtoInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionImpl.java deleted file mode 100644 index c8219e514cfc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionImpl.java +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.util.Collections; -import java.util.Map; - -public final class PrivateEndpointConnectionImpl - implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update { - private PrivateEndpointConnectionInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - 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 Sku sku() { - return this.innerModel().sku(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public PrivateEndpoint privateEndpoint() { - return this.innerModel().privateEndpoint(); - } - - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.innerModel().privateLinkServiceConnectionState(); - } - - public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public PrivateEndpointConnectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String privateEndpointConnectionName; - - public PrivateEndpointConnectionImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public PrivateEndpointConnection create() { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, - this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public PrivateEndpointConnection create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, - this.innerModel(), context) - .getValue(); - return this; - } - - PrivateEndpointConnectionImpl(String name, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new PrivateEndpointConnectionInner(); - this.serviceManager = serviceManager; - this.privateEndpointConnectionName = name; - } - - public PrivateEndpointConnectionImpl update() { - return this; - } - - public PrivateEndpointConnection apply() { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, - this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public PrivateEndpointConnection apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, - this.innerModel(), context) - .getValue(); - return this; - } - - PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.privateEndpointConnectionName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); - } - - public PrivateEndpointConnection refresh() { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) - .getValue(); - return this; - } - - public PrivateEndpointConnection refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context) - .getValue(); - return this; - } - - public PrivateEndpointConnectionImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public PrivateEndpointConnectionImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public PrivateEndpointConnectionImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public PrivateEndpointConnectionImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public PrivateEndpointConnectionImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.innerModel().withPrivateEndpoint(privateEndpoint); - return this; - } - - public PrivateEndpointConnectionImpl - withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.innerModel().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java deleted file mode 100644 index d98f87dac6c3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java +++ /dev/null @@ -1,680 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. - */ -public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final PrivateEndpointConnectionsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of PrivateEndpointConnectionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PrivateEndpointConnectionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(PrivateEndpointConnectionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesPrivateEndpointConnections to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface PrivateEndpointConnectionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PrivateEndpointConnectionInner properties, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List all the private endpoint connections associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of private endpoint connection associated with the specified workspace along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all the private endpoint connections associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of private endpoint connection associated with the specified workspace along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); - } - - /** - * List all the private endpoint connections associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName)); - } - - /** - * List all the private endpoint connections associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, context)); - } - - /** - * List all the private endpoint connections associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); - } - - /** - * List all the private endpoint connections associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @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 specified private endpoint connection associated with the workspace along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String privateEndpointConnectionName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @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 specified private endpoint connection associated with the workspace along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String privateEndpointConnectionName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName 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, workspaceName, - privateEndpointConnectionName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @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 specified private endpoint connection associated with the workspace on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName) { - return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @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 specified private endpoint connection associated with the workspace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context).block(); - } - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @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 specified private endpoint connection associated with the workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName) { - return getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) - .getValue(); - } - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @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 Private Endpoint Connection resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner properties) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), - properties, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @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 Private Endpoint Connection resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner properties, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), properties, accept, context); - } - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @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 Private Endpoint Connection resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner properties) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, - properties).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @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 Private Endpoint Connection resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner properties, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, - properties, context).block(); - } - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @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 Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner properties) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, properties, - Context.NONE).getValue(); - } - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName 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, - workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context); - } - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context) - .block(); - } - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java deleted file mode 100644 index 03774c6fedf2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.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.machinelearning.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.machinelearning.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnections; - -public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class); - - private final PrivateEndpointConnectionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public PrivateEndpointConnectionsImpl(PrivateEndpointConnectionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PrivateEndpointConnection get(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName) { - PrivateEndpointConnectionInner inner - = this.serviceClient().get(resourceGroupName, workspaceName, privateEndpointConnectionName); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); - } - - public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - this.serviceClient().delete(resourceGroupName, workspaceName, privateEndpointConnectionName); - } - - public PrivateEndpointConnection getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String privateEndpointConnectionName - = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String privateEndpointConnectionName - = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String privateEndpointConnectionName - = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String privateEndpointConnectionName - = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); - } - - private PrivateEndpointConnectionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public PrivateEndpointConnectionImpl define(String name) { - return new PrivateEndpointConnectionImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceListResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceListResultImpl.java deleted file mode 100644 index b245faebb0a8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceListResultImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResourceListResult; -import java.util.Collections; -import java.util.List; - -public final class PrivateLinkResourceListResultImpl implements PrivateLinkResourceListResult { - private PrivateLinkResourceListResultInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - PrivateLinkResourceListResultImpl(PrivateLinkResourceListResultInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager 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 PrivateLinkResourceListResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java deleted file mode 100644 index 50a78d55c315..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.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.machinelearning.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.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. - */ -public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { - /** - * The proxy service used to perform REST calls. - */ - private final PrivateLinkResourcesService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of PrivateLinkResourcesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PrivateLinkResourcesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(PrivateLinkResourcesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesPrivateLinkResources to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface PrivateLinkResourcesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 private link resources that need to be created for a workspace along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, - String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 private link resources that need to be created for a workspace along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, - String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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, - workspaceName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 private link resources that need to be created for a workspace on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String resourceGroupName, String workspaceName) { - return listWithResponseAsync(resourceGroupName, workspaceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 private link resources that need to be created for a workspace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String resourceGroupName, String workspaceName, - Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 private link resources that need to be created for a workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceListResultInner list(String resourceGroupName, String workspaceName) { - return listWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java deleted file mode 100644 index f221aad8c31a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.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.machinelearning.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.machinelearning.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResourceListResult; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResources; - -public final class PrivateLinkResourcesImpl implements PrivateLinkResources { - private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesImpl.class); - - private final PrivateLinkResourcesClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response listWithResponse(String resourceGroupName, String workspaceName, - Context context) { - Response inner - = this.serviceClient().listWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateLinkResourceListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PrivateLinkResourceListResult list(String resourceGroupName, String workspaceName) { - PrivateLinkResourceListResultInner inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return new PrivateLinkResourceListResultImpl(inner, this.manager()); - } else { - return null; - } - } - - private PrivateLinkResourcesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java deleted file mode 100644 index 132066459cfb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.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.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -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.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.QuotasClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner; -import com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner; -import com.azure.resourcemanager.machinelearning.models.ListWorkspaceQuotas; -import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in QuotasClient. - */ -public final class QuotasClientImpl implements QuotasClient { - /** - * The proxy service used to perform REST calls. - */ - private final QuotasService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of QuotasClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - QuotasClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(QuotasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesQuotas to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface QuotasService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("location") String location, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") QuotaUpdateParameters parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @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 result of update workspace quota along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String location, - QuotaUpdateParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @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 result of update workspace quota along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String location, - QuotaUpdateParameters parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @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 result of update workspace quota on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String location, QuotaUpdateParameters parameters) { - return updateWithResponseAsync(location, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @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 result of update workspace quota along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String location, - QuotaUpdateParameters parameters, Context context) { - return updateWithResponseAsync(location, parameters, context).block(); - } - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @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 result of update workspace quota. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateWorkspaceQuotasResultInner update(String location, QuotaUpdateParameters parameters) { - return updateWithResponse(location, parameters, Context.NONE).getValue(); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @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 currently assigned Workspace Quotas based on VMFamily along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(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.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, 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())); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @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 currently assigned Workspace Quotas based on VMFamily along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(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 - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @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 currently assigned Workspace Quotas based on VMFamily as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location) { - return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @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 currently assigned Workspace Quotas based on VMFamily as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(location, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @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 currently assigned Workspace Quotas based on VMFamily as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location) { - return new PagedIterable<>(listAsync(location)); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @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 currently assigned Workspace Quotas based on VMFamily as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location, Context context) { - return new PagedIterable<>(listAsync(location, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List WorkspaceQuotasByVMFamily operation response along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List WorkspaceQuotasByVMFamily operation response 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.java deleted file mode 100644 index e3278e22e6ec..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.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.machinelearning.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.machinelearning.fluent.QuotasClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner; -import com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner; -import com.azure.resourcemanager.machinelearning.models.Quotas; -import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; -import com.azure.resourcemanager.machinelearning.models.ResourceQuota; -import com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotasResult; - -public final class QuotasImpl implements Quotas { - private static final ClientLogger LOGGER = new ClientLogger(QuotasImpl.class); - - private final QuotasClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public QuotasImpl(QuotasClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response updateWithResponse(String location, QuotaUpdateParameters parameters, - Context context) { - Response inner - = this.serviceClient().updateWithResponse(location, parameters, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new UpdateWorkspaceQuotasResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public UpdateWorkspaceQuotasResult update(String location, QuotaUpdateParameters parameters) { - UpdateWorkspaceQuotasResultInner inner = this.serviceClient().update(location, parameters); - if (inner != null) { - return new UpdateWorkspaceQuotasResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String location) { - PagedIterable inner = this.serviceClient().list(location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ResourceQuotaImpl(inner1, this.manager())); - } - - public PagedIterable list(String location, Context context) { - PagedIterable inner = this.serviceClient().list(location, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ResourceQuotaImpl(inner1, this.manager())); - } - - private QuotasClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java deleted file mode 100644 index 23ed453ef80c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java +++ /dev/null @@ -1,1413 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistriesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; -import com.azure.resourcemanager.machinelearning.models.PartialRegistryPartialTrackedResource; -import com.azure.resourcemanager.machinelearning.models.RegistryTrackedResourceArmPaginatedResult; -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 RegistriesClient. - */ -public final class RegistriesClientImpl implements RegistriesClient { - /** - * The proxy service used to perform REST calls. - */ - private final RegistriesService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of RegistriesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - RegistriesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(RegistriesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistries to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface RegistriesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/registries") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialRegistryPartialTrackedResource body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") RegistryInner body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/removeRegions") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> removeRegions(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") RegistryInner body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List registries by subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List registries by subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List registries by subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List registries by subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * List registries by subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * List registries by subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * List registries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List registries. - * - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List registries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List registries. - * - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List registries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * List registries. - * - * @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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Delete registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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, - registryName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName) { - return this.beginDeleteAsync(resourceGroupName, registryName).getSyncPoller(); - } - - /** - * Delete registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, context).getSyncPoller(); - } - - /** - * Delete registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName) { - return beginDeleteAsync(resourceGroupName, registryName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, Context context) { - return beginDeleteAsync(resourceGroupName, registryName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName) { - deleteAsync(resourceGroupName, registryName).block(); - } - - /** - * Delete registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, Context context) { - deleteAsync(resourceGroupName, registryName, context).block(); - } - - /** - * Get registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 registry along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String registryName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 registry along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String registryName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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, - registryName, this.client.getApiVersion(), accept, context); - } - - /** - * Get registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 registry on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String registryName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, registryName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 registry along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, registryName, context).block(); - } - - /** - * Get registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 registry. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryInner getByResourceGroup(String resourceGroupName, String registryName) { - return getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); - } - - /** - * Update tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String registryName, - PartialRegistryPartialTrackedResource body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String registryName, - PartialRegistryPartialTrackedResource body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Update tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String registryName, - PartialRegistryPartialTrackedResource body) { - return updateWithResponseAsync(resourceGroupName, registryName, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String registryName, - PartialRegistryPartialTrackedResource body, Context context) { - return updateWithResponseAsync(resourceGroupName, registryName, body, context).block(); - } - - /** - * Update tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryInner update(String resourceGroupName, String registryName, - PartialRegistryPartialTrackedResource body) { - return updateWithResponse(resourceGroupName, registryName, body, Context.NONE).getValue(); - } - - /** - * Create or update registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, RegistryInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, RegistryInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RegistryInner> beginCreateOrUpdateAsync(String resourceGroupName, - String registryName, RegistryInner body) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, registryName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RegistryInner.class, RegistryInner.class, this.client.getContext()); - } - - /** - * Create or update registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RegistryInner> beginCreateOrUpdateAsync(String resourceGroupName, - String registryName, RegistryInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RegistryInner.class, RegistryInner.class, context); - } - - /** - * Create or update registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RegistryInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, RegistryInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, body).getSyncPoller(); - } - - /** - * Create or update registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RegistryInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, RegistryInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, body, context).getSyncPoller(); - } - - /** - * Create or update registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, RegistryInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, RegistryInner body, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, body).block(); - } - - /** - * Create or update registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body, - Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, body, context).block(); - } - - /** - * Remove regions from registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> removeRegionsWithResponseAsync(String resourceGroupName, - String registryName, RegistryInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.removeRegions(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Remove regions from registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> removeRegionsWithResponseAsync(String resourceGroupName, - String registryName, RegistryInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.removeRegions(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Remove regions from registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RegistryInner> beginRemoveRegionsAsync(String resourceGroupName, - String registryName, RegistryInner body) { - Mono>> mono = removeRegionsWithResponseAsync(resourceGroupName, registryName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RegistryInner.class, RegistryInner.class, this.client.getContext()); - } - - /** - * Remove regions from registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RegistryInner> beginRemoveRegionsAsync(String resourceGroupName, - String registryName, RegistryInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = removeRegionsWithResponseAsync(resourceGroupName, registryName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RegistryInner.class, RegistryInner.class, context); - } - - /** - * Remove regions from registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RegistryInner> beginRemoveRegions(String resourceGroupName, - String registryName, RegistryInner body) { - return this.beginRemoveRegionsAsync(resourceGroupName, registryName, body).getSyncPoller(); - } - - /** - * Remove regions from registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RegistryInner> beginRemoveRegions(String resourceGroupName, - String registryName, RegistryInner body, Context context) { - return this.beginRemoveRegionsAsync(resourceGroupName, registryName, body, context).getSyncPoller(); - } - - /** - * Remove regions from registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono removeRegionsAsync(String resourceGroupName, String registryName, RegistryInner body) { - return beginRemoveRegionsAsync(resourceGroupName, registryName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Remove regions from registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono removeRegionsAsync(String resourceGroupName, String registryName, RegistryInner body, - Context context) { - return beginRemoveRegionsAsync(resourceGroupName, registryName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Remove regions from registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryInner removeRegions(String resourceGroupName, String registryName, RegistryInner body) { - return removeRegionsAsync(resourceGroupName, registryName, body).block(); - } - - /** - * Remove regions from registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryInner removeRegions(String resourceGroupName, String registryName, RegistryInner body, - Context context) { - return removeRegionsAsync(resourceGroupName, registryName, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.java deleted file mode 100644 index f2ade7c85529..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.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.machinelearning.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.machinelearning.fluent.RegistriesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; -import com.azure.resourcemanager.machinelearning.models.Registries; -import com.azure.resourcemanager.machinelearning.models.Registry; - -public final class RegistriesImpl implements Registries { - private static final ClientLogger LOGGER = new ClientLogger(RegistriesImpl.class); - - private final RegistriesClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public RegistriesImpl(RegistriesClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); - } - - public void deleteByResourceGroup(String resourceGroupName, String registryName) { - this.serviceClient().delete(resourceGroupName, registryName); - } - - public void delete(String resourceGroupName, String registryName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, context); - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, registryName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RegistryImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Registry getByResourceGroup(String resourceGroupName, String registryName) { - RegistryInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, registryName); - if (inner != null) { - return new RegistryImpl(inner, this.manager()); - } else { - return null; - } - } - - public Registry removeRegions(String resourceGroupName, String registryName, RegistryInner body) { - RegistryInner inner = this.serviceClient().removeRegions(resourceGroupName, registryName, body); - if (inner != null) { - return new RegistryImpl(inner, this.manager()); - } else { - return null; - } - } - - public Registry removeRegions(String resourceGroupName, String registryName, RegistryInner body, Context context) { - RegistryInner inner = this.serviceClient().removeRegions(resourceGroupName, registryName, body, context); - if (inner != null) { - return new RegistryImpl(inner, this.manager()); - } else { - return null; - } - } - - public Registry getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, registryName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - this.delete(resourceGroupName, registryName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String registryName = ResourceManagerUtils.getValueFromIdByName(id, "registries"); - if (registryName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); - } - this.delete(resourceGroupName, registryName, context); - } - - private RegistriesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public RegistryImpl define(String name) { - return new RegistryImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java deleted file mode 100644 index 62193d2db1b9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java +++ /dev/null @@ -1,939 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.RegistryCodeContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainerResourceArmPaginatedResult; -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 RegistryCodeContainersClient. - */ -public final class RegistryCodeContainersClientImpl implements RegistryCodeContainersClient { - /** - * The proxy service used to perform REST calls. - */ - private final RegistryCodeContainersService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of RegistryCodeContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - RegistryCodeContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(RegistryCodeContainersService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryCodeContainers to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface RegistryCodeContainersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("codeName") String codeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("codeName") String codeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("codeName") String codeName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CodeContainerInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String skip) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @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 a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String skip, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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, registryName, - this.client.getApiVersion(), skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @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 a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @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 a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String skip, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, context)); - } - - /** - * Delete Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String codeName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, codeName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String codeName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName 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, - registryName, codeName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String codeName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, codeName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String codeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, codeName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String codeName) { - return this.beginDeleteAsync(resourceGroupName, registryName, codeName).getSyncPoller(); - } - - /** - * Delete Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String codeName, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, codeName, context).getSyncPoller(); - } - - /** - * Delete Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String codeName) { - return beginDeleteAsync(resourceGroupName, registryName, codeName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String codeName, Context context) { - return beginDeleteAsync(resourceGroupName, registryName, codeName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String codeName) { - deleteAsync(resourceGroupName, registryName, codeName).block(); - } - - /** - * Delete Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String codeName, Context context) { - deleteAsync(resourceGroupName, registryName, codeName, context).block(); - } - - /** - * Get Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @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 code container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String codeName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, codeName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @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 code container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String codeName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName 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, registryName, - codeName, this.client.getApiVersion(), accept, context); - } - - /** - * Get Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @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 code container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String codeName) { - return getWithResponseAsync(resourceGroupName, registryName, codeName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @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 code container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, String codeName, - Context context) { - return getWithResponseAsync(resourceGroupName, registryName, codeName, context).block(); - } - - /** - * Get Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @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 code container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeContainerInner get(String resourceGroupName, String registryName, String codeName) { - return getWithResponse(resourceGroupName, registryName, codeName, Context.NONE).getValue(); - } - - /** - * Create or update Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String codeName, CodeContainerInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, codeName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String codeName, CodeContainerInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, codeName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CodeContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String codeName, CodeContainerInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CodeContainerInner.class, CodeContainerInner.class, this.client.getContext()); - } - - /** - * Create or update Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CodeContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String codeName, CodeContainerInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CodeContainerInner.class, CodeContainerInner.class, context); - } - - /** - * Create or update Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CodeContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String codeName, CodeContainerInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, body).getSyncPoller(); - } - - /** - * Create or update Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CodeContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String codeName, CodeContainerInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, body, context).getSyncPoller(); - } - - /** - * Create or update Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeContainerInner createOrUpdate(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, codeName, body).block(); - } - - /** - * Create or update Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeContainerInner createOrUpdate(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, codeName, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.java deleted file mode 100644 index 5565748a4d27..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryCodeContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import com.azure.resourcemanager.machinelearning.models.RegistryCodeContainers; - -public final class RegistryCodeContainersImpl implements RegistryCodeContainers { - private static final ClientLogger LOGGER = new ClientLogger(RegistryCodeContainersImpl.class); - - private final RegistryCodeContainersClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public RegistryCodeContainersImpl(RegistryCodeContainersClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String skip, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String codeName) { - this.serviceClient().delete(resourceGroupName, registryName, codeName); - } - - public void delete(String resourceGroupName, String registryName, String codeName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, codeName, context); - } - - public Response getWithResponse(String resourceGroupName, String registryName, String codeName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, registryName, codeName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CodeContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CodeContainer get(String resourceGroupName, String registryName, String codeName) { - CodeContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, codeName); - if (inner != null) { - return new CodeContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public CodeContainer createOrUpdate(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body) { - CodeContainerInner inner = this.serviceClient().createOrUpdate(resourceGroupName, registryName, codeName, body); - if (inner != null) { - return new CodeContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public CodeContainer createOrUpdate(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body, Context context) { - CodeContainerInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, registryName, codeName, body, context); - if (inner != null) { - return new CodeContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - private RegistryCodeContainersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java deleted file mode 100644 index 3ba587a442f6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java +++ /dev/null @@ -1,1194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.RegistryCodeVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; -import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.CodeVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; -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 RegistryCodeVersionsClient. - */ -public final class RegistryCodeVersionsClientImpl implements RegistryCodeVersionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final RegistryCodeVersionsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of RegistryCodeVersionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - RegistryCodeVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(RegistryCodeVersionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryCodeVersions to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface RegistryCodeVersionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("codeName") String codeName, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("codeName") String codeName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("codeName") String codeName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("codeName") String codeName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") CodeVersionInner body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}/startPendingUpload") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrGetStartPendingUpload(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("codeName") String codeName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") PendingUploadRequestDto body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String codeName, String orderBy, Integer top, String skip) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, codeName, this.client.getApiVersion(), orderBy, top, skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @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 a paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String codeName, String orderBy, Integer top, String skip, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName 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, registryName, codeName, - this.client.getApiVersion(), orderBy, top, skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String codeName, - String orderBy, Integer top, String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, codeName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String codeName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, codeName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @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 a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String codeName, - String orderBy, Integer top, String skip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, registryName, codeName, orderBy, top, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String codeName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, codeName, orderBy, top, skip)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @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 a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String codeName, - String orderBy, Integer top, String skip, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, codeName, orderBy, top, skip, context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String codeName, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, codeName, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String codeName, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, - registryName, codeName, version, this.client.getApiVersion(), accept, context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String codeName, String version) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, codeName, version); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String codeName, String version, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, codeName, version, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String codeName, String version) { - return this.beginDeleteAsync(resourceGroupName, registryName, codeName, version).getSyncPoller(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String codeName, String version, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, codeName, version, context).getSyncPoller(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String codeName, String version) { - return beginDeleteAsync(resourceGroupName, registryName, codeName, version).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String codeName, String version, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, codeName, version, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String codeName, String version) { - deleteAsync(resourceGroupName, registryName, codeName, version).block(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String codeName, String version, - Context context) { - deleteAsync(resourceGroupName, registryName, codeName, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String codeName, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, codeName, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String codeName, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, registryName, - codeName, version, this.client.getApiVersion(), accept, context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @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 version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String codeName, - String version) { - return getWithResponseAsync(resourceGroupName, registryName, codeName, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, String codeName, - String version, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, codeName, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeVersionInner get(String resourceGroupName, String registryName, String codeName, String version) { - return getWithResponse(resourceGroupName, registryName, codeName, version, Context.NONE).getValue(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String codeName, String version, CodeVersionInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, codeName, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String codeName, String version, CodeVersionInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, codeName, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CodeVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, version, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CodeVersionInner.class, CodeVersionInner.class, this.client.getContext()); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CodeVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, version, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CodeVersionInner.class, CodeVersionInner.class, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CodeVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String codeName, String version, CodeVersionInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, version, body).getSyncPoller(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CodeVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String codeName, String version, CodeVersionInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, version, body, context) - .getSyncPoller(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String codeName, - String version, CodeVersionInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String codeName, - String version, CodeVersionInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeVersionInner createOrUpdate(String resourceGroupName, String registryName, String codeName, - String version, CodeVersionInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, codeName, version, body).block(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeVersionInner createOrUpdate(String resourceGroupName, String registryName, String codeName, - String version, CodeVersionInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, codeName, version, body, context).block(); - } - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrGetStartPendingUploadWithResponseAsync( - String resourceGroupName, String registryName, String codeName, String version, PendingUploadRequestDto body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrGetStartPendingUpload(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, version, - this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrGetStartPendingUploadWithResponseAsync( - String resourceGroupName, String registryName, String codeName, String version, PendingUploadRequestDto body, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrGetStartPendingUpload(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, codeName, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrGetStartPendingUploadAsync(String resourceGroupName, - String registryName, String codeName, String version, PendingUploadRequestDto body) { - return createOrGetStartPendingUploadWithResponseAsync(resourceGroupName, registryName, codeName, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, - String registryName, String codeName, String version, PendingUploadRequestDto body, Context context) { - return createOrGetStartPendingUploadWithResponseAsync(resourceGroupName, registryName, codeName, version, body, - context).block(); - } - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PendingUploadResponseDtoInner createOrGetStartPendingUpload(String resourceGroupName, String registryName, - String codeName, String version, PendingUploadRequestDto body) { - return createOrGetStartPendingUploadWithResponse(resourceGroupName, registryName, codeName, version, body, - Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeVersion entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.java deleted file mode 100644 index 6925af5a4d76..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.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.machinelearning.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.machinelearning.fluent.RegistryCodeVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; -import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.CodeVersion; -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; -import com.azure.resourcemanager.machinelearning.models.PendingUploadResponseDto; -import com.azure.resourcemanager.machinelearning.models.RegistryCodeVersions; - -public final class RegistryCodeVersionsImpl implements RegistryCodeVersions { - private static final ClientLogger LOGGER = new ClientLogger(RegistryCodeVersionsImpl.class); - - private final RegistryCodeVersionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public RegistryCodeVersionsImpl(RegistryCodeVersionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String registryName, String codeName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, codeName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String codeName, - String orderBy, Integer top, String skip, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, codeName, orderBy, top, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String codeName, String version) { - this.serviceClient().delete(resourceGroupName, registryName, codeName, version); - } - - public void delete(String resourceGroupName, String registryName, String codeName, String version, - Context context) { - this.serviceClient().delete(resourceGroupName, registryName, codeName, version, context); - } - - public Response getWithResponse(String resourceGroupName, String registryName, String codeName, - String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, registryName, codeName, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CodeVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CodeVersion get(String resourceGroupName, String registryName, String codeName, String version) { - CodeVersionInner inner = this.serviceClient().get(resourceGroupName, registryName, codeName, version); - if (inner != null) { - return new CodeVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public CodeVersion createOrUpdate(String resourceGroupName, String registryName, String codeName, String version, - CodeVersionInner body) { - CodeVersionInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, registryName, codeName, version, body); - if (inner != null) { - return new CodeVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public CodeVersion createOrUpdate(String resourceGroupName, String registryName, String codeName, String version, - CodeVersionInner body, Context context) { - CodeVersionInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, registryName, codeName, version, body, context); - if (inner != null) { - return new CodeVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, - String registryName, String codeName, String version, PendingUploadRequestDto body, Context context) { - Response inner = this.serviceClient() - .createOrGetStartPendingUploadWithResponse(resourceGroupName, registryName, codeName, version, body, - context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PendingUploadResponseDtoImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PendingUploadResponseDto createOrGetStartPendingUpload(String resourceGroupName, String registryName, - String codeName, String version, PendingUploadRequestDto body) { - PendingUploadResponseDtoInner inner = this.serviceClient() - .createOrGetStartPendingUpload(resourceGroupName, registryName, codeName, version, body); - if (inner != null) { - return new PendingUploadResponseDtoImpl(inner, this.manager()); - } else { - return null; - } - } - - private RegistryCodeVersionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java deleted file mode 100644 index 43747c8f69f1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java +++ /dev/null @@ -1,945 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.RegistryComponentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerResourceArmPaginatedResult; -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 RegistryComponentContainersClient. - */ -public final class RegistryComponentContainersClientImpl implements RegistryComponentContainersClient { - /** - * The proxy service used to perform REST calls. - */ - private final RegistryComponentContainersService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of RegistryComponentContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - RegistryComponentContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(RegistryComponentContainersService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryComponentContainers to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface RegistryComponentContainersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("componentName") String componentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @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.MachineLearningServices/registries/{registryName}/components/{componentName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("componentName") String componentName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ComponentContainerInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String skip) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @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 a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String skip, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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, registryName, - this.client.getApiVersion(), skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @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 a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @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 a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String skip, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, context)); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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, registryName, componentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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, - registryName, componentName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String componentName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, componentName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String componentName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, componentName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String componentName) { - return this.beginDeleteAsync(resourceGroupName, registryName, componentName).getSyncPoller(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String componentName, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, componentName, context).getSyncPoller(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String componentName) { - return beginDeleteAsync(resourceGroupName, registryName, componentName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String componentName, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, componentName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String componentName) { - deleteAsync(resourceGroupName, registryName, componentName).block(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String componentName, Context context) { - deleteAsync(resourceGroupName, registryName, componentName, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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, registryName, componentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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, registryName, - componentName, this.client.getApiVersion(), accept, context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @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 container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, - String componentName) { - return getWithResponseAsync(resourceGroupName, registryName, componentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, - String componentName, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, componentName, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentContainerInner get(String resourceGroupName, String registryName, String componentName) { - return getWithResponse(resourceGroupName, registryName, componentName, Context.NONE).getValue(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String componentName, ComponentContainerInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, componentName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String componentName, ComponentContainerInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, componentName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComponentContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String componentName, ComponentContainerInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ComponentContainerInner.class, ComponentContainerInner.class, - this.client.getContext()); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComponentContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String componentName, ComponentContainerInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ComponentContainerInner.class, ComponentContainerInner.class, context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComponentContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String componentName, ComponentContainerInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, body).getSyncPoller(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComponentContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String componentName, ComponentContainerInner body, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, body, context) - .getSyncPoller(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String componentName, ComponentContainerInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String componentName, ComponentContainerInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentContainerInner createOrUpdate(String resourceGroupName, String registryName, String componentName, - ComponentContainerInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, componentName, body).block(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentContainerInner createOrUpdate(String resourceGroupName, String registryName, String componentName, - ComponentContainerInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, componentName, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.java deleted file mode 100644 index 97d906d0d38f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.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.machinelearning.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.machinelearning.fluent.RegistryComponentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import com.azure.resourcemanager.machinelearning.models.RegistryComponentContainers; - -public final class RegistryComponentContainersImpl implements RegistryComponentContainers { - private static final ClientLogger LOGGER = new ClientLogger(RegistryComponentContainersImpl.class); - - private final RegistryComponentContainersClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public RegistryComponentContainersImpl(RegistryComponentContainersClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String skip, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String componentName) { - this.serviceClient().delete(resourceGroupName, registryName, componentName); - } - - public void delete(String resourceGroupName, String registryName, String componentName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, componentName, context); - } - - public Response getWithResponse(String resourceGroupName, String registryName, - String componentName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, registryName, componentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComponentContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ComponentContainer get(String resourceGroupName, String registryName, String componentName) { - ComponentContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, componentName); - if (inner != null) { - return new ComponentContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public ComponentContainer createOrUpdate(String resourceGroupName, String registryName, String componentName, - ComponentContainerInner body) { - ComponentContainerInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, registryName, componentName, body); - if (inner != null) { - return new ComponentContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public ComponentContainer createOrUpdate(String resourceGroupName, String registryName, String componentName, - ComponentContainerInner body, Context context) { - ComponentContainerInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, registryName, componentName, body, context); - if (inner != null) { - return new ComponentContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - private RegistryComponentContainersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java deleted file mode 100644 index b219aac9ce00..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java +++ /dev/null @@ -1,1032 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.RegistryComponentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionResourceArmPaginatedResult; -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 RegistryComponentVersionsClient. - */ -public final class RegistryComponentVersionsClientImpl implements RegistryComponentVersionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final RegistryComponentVersionsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of RegistryComponentVersionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - RegistryComponentVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(RegistryComponentVersionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryComponentVersions to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface RegistryComponentVersionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("componentName") String componentName, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("componentName") String componentName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("componentName") String componentName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("componentName") String componentName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ComponentVersionInner body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String componentName, String orderBy, Integer top, String skip) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, componentName, this.client.getApiVersion(), orderBy, top, skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @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 a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String componentName, String orderBy, Integer top, String skip, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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 - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, registryName, - componentName, this.client.getApiVersion(), orderBy, top, skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, - String componentName, String orderBy, Integer top, String skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, registryName, componentName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, - String componentName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, registryName, componentName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @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 a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, - String componentName, String orderBy, Integer top, String skip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, registryName, componentName, orderBy, top, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, - String componentName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, componentName, orderBy, top, skip)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @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 a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, - String componentName, String orderBy, Integer top, String skip, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, registryName, componentName, orderBy, top, skip, context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String componentName, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, componentName, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String componentName, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, - registryName, componentName, version, this.client.getApiVersion(), accept, context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String componentName, String version) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, componentName, version); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String componentName, String version, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, componentName, version, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String componentName, String version) { - return this.beginDeleteAsync(resourceGroupName, registryName, componentName, version).getSyncPoller(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String componentName, String version, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, componentName, version, context).getSyncPoller(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String componentName, - String version) { - return beginDeleteAsync(resourceGroupName, registryName, componentName, version).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String componentName, String version, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, componentName, version, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String componentName, String version) { - deleteAsync(resourceGroupName, registryName, componentName, version).block(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String componentName, String version, - Context context) { - deleteAsync(resourceGroupName, registryName, componentName, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String componentName, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, componentName, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String componentName, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, registryName, - componentName, version, this.client.getApiVersion(), accept, context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @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 version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String componentName, - String version) { - return getWithResponseAsync(resourceGroupName, registryName, componentName, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, - String componentName, String version, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, componentName, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentVersionInner get(String resourceGroupName, String registryName, String componentName, - String version) { - return getWithResponse(resourceGroupName, registryName, componentName, version, Context.NONE).getValue(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String componentName, String version, ComponentVersionInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, componentName, version, this.client.getApiVersion(), body, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String componentName, String version, ComponentVersionInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, componentName, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComponentVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String componentName, String version, - ComponentVersionInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, version, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ComponentVersionInner.class, ComponentVersionInner.class, - this.client.getContext()); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComponentVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String componentName, String version, ComponentVersionInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, version, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ComponentVersionInner.class, ComponentVersionInner.class, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComponentVersionInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String componentName, String version, - ComponentVersionInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, version, body) - .getSyncPoller(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComponentVersionInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String componentName, String version, ComponentVersionInner body, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, version, body, context) - .getSyncPoller(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String componentName, String version, ComponentVersionInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String componentName, String version, ComponentVersionInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentVersionInner createOrUpdate(String resourceGroupName, String registryName, String componentName, - String version, ComponentVersionInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, componentName, version, body).block(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentVersionInner createOrUpdate(String resourceGroupName, String registryName, String componentName, - String version, ComponentVersionInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, componentName, version, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.java deleted file mode 100644 index 92c93b6a0c3c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.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.machinelearning.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.machinelearning.fluent.RegistryComponentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import com.azure.resourcemanager.machinelearning.models.RegistryComponentVersions; - -public final class RegistryComponentVersionsImpl implements RegistryComponentVersions { - private static final ClientLogger LOGGER = new ClientLogger(RegistryComponentVersionsImpl.class); - - private final RegistryComponentVersionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public RegistryComponentVersionsImpl(RegistryComponentVersionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String registryName, String componentName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, componentName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String componentName, - String orderBy, Integer top, String skip, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, componentName, orderBy, top, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String componentName, String version) { - this.serviceClient().delete(resourceGroupName, registryName, componentName, version); - } - - public void delete(String resourceGroupName, String registryName, String componentName, String version, - Context context) { - this.serviceClient().delete(resourceGroupName, registryName, componentName, version, context); - } - - public Response getWithResponse(String resourceGroupName, String registryName, - String componentName, String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, registryName, componentName, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComponentVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ComponentVersion get(String resourceGroupName, String registryName, String componentName, String version) { - ComponentVersionInner inner = this.serviceClient().get(resourceGroupName, registryName, componentName, version); - if (inner != null) { - return new ComponentVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public ComponentVersion createOrUpdate(String resourceGroupName, String registryName, String componentName, - String version, ComponentVersionInner body) { - ComponentVersionInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, registryName, componentName, version, body); - if (inner != null) { - return new ComponentVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public ComponentVersion createOrUpdate(String resourceGroupName, String registryName, String componentName, - String version, ComponentVersionInner body, Context context) { - ComponentVersionInner inner = this.serviceClient() - .createOrUpdate(resourceGroupName, registryName, componentName, version, body, context); - if (inner != null) { - return new ComponentVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - private RegistryComponentVersionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersClientImpl.java deleted file mode 100644 index ef927d7a9cfc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersClientImpl.java +++ /dev/null @@ -1,947 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.RegistryDataContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainerResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -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 RegistryDataContainersClient. - */ -public final class RegistryDataContainersClientImpl implements RegistryDataContainersClient { - /** - * The proxy service used to perform REST calls. - */ - private final RegistryDataContainersService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of RegistryDataContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - RegistryDataContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(RegistryDataContainersService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryDataContainers to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface RegistryDataContainersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DataContainerInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List Data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String skip, ListViewType listViewType) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), skip, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List Data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String skip, ListViewType listViewType, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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, registryName, - this.client.getApiVersion(), skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List Data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, - ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List Data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType)); - } - - /** - * List Data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType, context)); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String name) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String name, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - registryName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String name) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, name); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String name, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, name, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name) { - return this.beginDeleteAsync(resourceGroupName, registryName, name).getSyncPoller(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, - Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, name, context).getSyncPoller(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String name) { - return beginDeleteAsync(resourceGroupName, registryName, name).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String name, Context context) { - return beginDeleteAsync(resourceGroupName, registryName, name, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String name) { - deleteAsync(resourceGroupName, registryName, name).block(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String name, Context context) { - deleteAsync(resourceGroupName, registryName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String name) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String name, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, registryName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @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 container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String name) { - return getWithResponseAsync(resourceGroupName, registryName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, registryName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataContainerInner get(String resourceGroupName, String registryName, String name) { - return getWithResponse(resourceGroupName, registryName, name, Context.NONE).getValue(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String name, DataContainerInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String name, DataContainerInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, name, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DataContainerInner> - beginCreateOrUpdateAsync(String resourceGroupName, String registryName, String name, DataContainerInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, name, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DataContainerInner.class, DataContainerInner.class, this.client.getContext()); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DataContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String name, DataContainerInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, name, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DataContainerInner.class, DataContainerInner.class, context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DataContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String name, DataContainerInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, name, body).getSyncPoller(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DataContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String name, DataContainerInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, name, body, context).getSyncPoller(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String name, - DataContainerInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, name, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String name, - DataContainerInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, name, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataContainerInner createOrUpdate(String resourceGroupName, String registryName, String name, - DataContainerInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, name, body).block(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataContainerInner createOrUpdate(String resourceGroupName, String registryName, String name, - DataContainerInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, name, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersImpl.java deleted file mode 100644 index 303494a1fc97..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersImpl.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.machinelearning.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.machinelearning.fluent.RegistryDataContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.RegistryDataContainers; - -public final class RegistryDataContainersImpl implements RegistryDataContainers { - private static final ClientLogger LOGGER = new ClientLogger(RegistryDataContainersImpl.class); - - private final RegistryDataContainersClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public RegistryDataContainersImpl(RegistryDataContainersClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String name) { - this.serviceClient().delete(resourceGroupName, registryName, name); - } - - public void delete(String resourceGroupName, String registryName, String name, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, name, context); - } - - public Response getWithResponse(String resourceGroupName, String registryName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, registryName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DataContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DataContainer get(String resourceGroupName, String registryName, String name) { - DataContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, name); - if (inner != null) { - return new DataContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public DataContainer createOrUpdate(String resourceGroupName, String registryName, String name, - DataContainerInner body) { - DataContainerInner inner = this.serviceClient().createOrUpdate(resourceGroupName, registryName, name, body); - if (inner != null) { - return new DataContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public DataContainer createOrUpdate(String resourceGroupName, String registryName, String name, - DataContainerInner body, Context context) { - DataContainerInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, registryName, name, body, context); - if (inner != null) { - return new DataContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - private RegistryDataContainersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesClientImpl.java deleted file mode 100644 index c07530dc1738..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesClientImpl.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.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.RegistryDataReferencesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.GetBlobReferenceSasResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasRequestDto; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in RegistryDataReferencesClient. - */ -public final class RegistryDataReferencesClientImpl implements RegistryDataReferencesClient { - /** - * The proxy service used to perform REST calls. - */ - private final RegistryDataReferencesService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of RegistryDataReferencesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - RegistryDataReferencesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(RegistryDataReferencesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryDataReferences to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface RegistryDataReferencesService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/datareferences/{name}/versions/{version}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getBlobReferenceSas(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") GetBlobReferenceSasRequestDto body, @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get blob reference SAS Uri. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data reference name. - * @param version Version identifier. - * @param body Asset id and blob uri. - * @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 blob reference SAS Uri along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getBlobReferenceSasWithResponseAsync( - String resourceGroupName, String registryName, String name, String version, - GetBlobReferenceSasRequestDto body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getBlobReferenceSas(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get blob reference SAS Uri. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data reference name. - * @param version Version identifier. - * @param body Asset id and blob uri. - * @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 blob reference SAS Uri along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getBlobReferenceSasWithResponseAsync( - String resourceGroupName, String registryName, String name, String version, GetBlobReferenceSasRequestDto body, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getBlobReferenceSas(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Get blob reference SAS Uri. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data reference name. - * @param version Version identifier. - * @param body Asset id and blob uri. - * @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 blob reference SAS Uri on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getBlobReferenceSasAsync(String resourceGroupName, - String registryName, String name, String version, GetBlobReferenceSasRequestDto body) { - return getBlobReferenceSasWithResponseAsync(resourceGroupName, registryName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get blob reference SAS Uri. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data reference name. - * @param version Version identifier. - * @param body Asset id and blob uri. - * @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 blob reference SAS Uri along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getBlobReferenceSasWithResponse(String resourceGroupName, - String registryName, String name, String version, GetBlobReferenceSasRequestDto body, Context context) { - return getBlobReferenceSasWithResponseAsync(resourceGroupName, registryName, name, version, body, context) - .block(); - } - - /** - * Get blob reference SAS Uri. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data reference name. - * @param version Version identifier. - * @param body Asset id and blob uri. - * @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 blob reference SAS Uri. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GetBlobReferenceSasResponseDtoInner getBlobReferenceSas(String resourceGroupName, String registryName, - String name, String version, GetBlobReferenceSasRequestDto body) { - return getBlobReferenceSasWithResponse(resourceGroupName, registryName, name, version, body, Context.NONE) - .getValue(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesImpl.java deleted file mode 100644 index 15795769c719..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesImpl.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.machinelearning.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.machinelearning.fluent.RegistryDataReferencesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.GetBlobReferenceSasResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasRequestDto; -import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasResponseDto; -import com.azure.resourcemanager.machinelearning.models.RegistryDataReferences; - -public final class RegistryDataReferencesImpl implements RegistryDataReferences { - private static final ClientLogger LOGGER = new ClientLogger(RegistryDataReferencesImpl.class); - - private final RegistryDataReferencesClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public RegistryDataReferencesImpl(RegistryDataReferencesClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getBlobReferenceSasWithResponse(String resourceGroupName, - String registryName, String name, String version, GetBlobReferenceSasRequestDto body, Context context) { - Response inner = this.serviceClient() - .getBlobReferenceSasWithResponse(resourceGroupName, registryName, name, version, body, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new GetBlobReferenceSasResponseDtoImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public GetBlobReferenceSasResponseDto getBlobReferenceSas(String resourceGroupName, String registryName, - String name, String version, GetBlobReferenceSasRequestDto body) { - GetBlobReferenceSasResponseDtoInner inner - = this.serviceClient().getBlobReferenceSas(resourceGroupName, registryName, name, version, body); - if (inner != null) { - return new GetBlobReferenceSasResponseDtoImpl(inner, this.manager()); - } else { - return null; - } - } - - private RegistryDataReferencesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsClientImpl.java deleted file mode 100644 index 63b8b6219f67..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsClientImpl.java +++ /dev/null @@ -1,1223 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.RegistryDataVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; -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 RegistryDataVersionsClient. - */ -public final class RegistryDataVersionsClientImpl implements RegistryDataVersionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final RegistryDataVersionsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of RegistryDataVersionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - RegistryDataVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(RegistryDataVersionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryDataVersions to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface RegistryDataVersionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, - @QueryParam("$tags") String tags, @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DataVersionBaseInner body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}/startPendingUpload") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrGetStartPendingUpload(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") PendingUploadRequestDto body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String name, String orderBy, Integer top, String skip, String tags, ListViewType listViewType) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, this.client.getApiVersion(), orderBy, top, skip, tags, - listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @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 a paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String name, String orderBy, Integer top, String skip, String tags, ListViewType listViewType, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, registryName, name, - this.client.getApiVersion(), orderBy, top, skip, tags, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @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 a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, name, orderBy, top, skip, - tags, listViewType, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - return new PagedIterable<>( - listAsync(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @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 a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType, context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String name, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String name, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, - registryName, name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String name, String version) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, name, version); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String name, String version, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, name, version, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, - String version) { - return this.beginDeleteAsync(resourceGroupName, registryName, name, version).getSyncPoller(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, - String version, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, name, version, context).getSyncPoller(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String name, String version) { - return beginDeleteAsync(resourceGroupName, registryName, name, version).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String name, String version, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, name, version, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String name, String version) { - deleteAsync(resourceGroupName, registryName, name, version).block(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String name, String version, Context context) { - deleteAsync(resourceGroupName, registryName, name, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String name, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String name, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, registryName, - name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @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 version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String name, - String version) { - return getWithResponseAsync(resourceGroupName, registryName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, String name, - String version, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, name, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataVersionBaseInner get(String resourceGroupName, String registryName, String name, String version) { - return getWithResponse(resourceGroupName, registryName, name, version, Context.NONE).getValue(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String name, String version, DataVersionBaseInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String name, String version, DataVersionBaseInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DataVersionBaseInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, name, version, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DataVersionBaseInner.class, DataVersionBaseInner.class, this.client.getContext()); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DataVersionBaseInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, name, version, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DataVersionBaseInner.class, DataVersionBaseInner.class, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DataVersionBaseInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, name, version, body).getSyncPoller(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DataVersionBaseInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, name, version, body, context) - .getSyncPoller(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String name, - String version, DataVersionBaseInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, name, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String name, - String version, DataVersionBaseInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataVersionBaseInner createOrUpdate(String resourceGroupName, String registryName, String name, - String version, DataVersionBaseInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, name, version, body).block(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataVersionBaseInner createOrUpdate(String resourceGroupName, String registryName, String name, - String version, DataVersionBaseInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, name, version, body, context).block(); - } - - /** - * Generate a storage location and credential for the client to upload a data asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrGetStartPendingUploadWithResponseAsync( - String resourceGroupName, String registryName, String name, String version, PendingUploadRequestDto body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrGetStartPendingUpload(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, registryName, name, version, - this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Generate a storage location and credential for the client to upload a data asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrGetStartPendingUploadWithResponseAsync( - String resourceGroupName, String registryName, String name, String version, PendingUploadRequestDto body, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrGetStartPendingUpload(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Generate a storage location and credential for the client to upload a data asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrGetStartPendingUploadAsync(String resourceGroupName, - String registryName, String name, String version, PendingUploadRequestDto body) { - return createOrGetStartPendingUploadWithResponseAsync(resourceGroupName, registryName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Generate a storage location and credential for the client to upload a data asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, - String registryName, String name, String version, PendingUploadRequestDto body, Context context) { - return createOrGetStartPendingUploadWithResponseAsync(resourceGroupName, registryName, name, version, body, - context).block(); - } - - /** - * Generate a storage location and credential for the client to upload a data asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PendingUploadResponseDtoInner createOrGetStartPendingUpload(String resourceGroupName, String registryName, - String name, String version, PendingUploadRequestDto body) { - return createOrGetStartPendingUploadWithResponse(resourceGroupName, registryName, name, version, body, - Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsImpl.java deleted file mode 100644 index 905b5b9904ab..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsImpl.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryDataVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; -import com.azure.resourcemanager.machinelearning.models.PendingUploadResponseDto; -import com.azure.resourcemanager.machinelearning.models.RegistryDataVersions; - -public final class RegistryDataVersionsImpl implements RegistryDataVersions { - private static final ClientLogger LOGGER = new ClientLogger(RegistryDataVersionsImpl.class); - - private final RegistryDataVersionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public RegistryDataVersionsImpl(RegistryDataVersionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String registryName, String name) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, name); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String name, String version) { - this.serviceClient().delete(resourceGroupName, registryName, name, version); - } - - public void delete(String resourceGroupName, String registryName, String name, String version, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, name, version, context); - } - - public Response getWithResponse(String resourceGroupName, String registryName, String name, - String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, registryName, name, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DataVersionBaseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DataVersionBase get(String resourceGroupName, String registryName, String name, String version) { - DataVersionBaseInner inner = this.serviceClient().get(resourceGroupName, registryName, name, version); - if (inner != null) { - return new DataVersionBaseImpl(inner, this.manager()); - } else { - return null; - } - } - - public DataVersionBase createOrUpdate(String resourceGroupName, String registryName, String name, String version, - DataVersionBaseInner body) { - DataVersionBaseInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, registryName, name, version, body); - if (inner != null) { - return new DataVersionBaseImpl(inner, this.manager()); - } else { - return null; - } - } - - public DataVersionBase createOrUpdate(String resourceGroupName, String registryName, String name, String version, - DataVersionBaseInner body, Context context) { - DataVersionBaseInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, registryName, name, version, body, context); - if (inner != null) { - return new DataVersionBaseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, - String registryName, String name, String version, PendingUploadRequestDto body, Context context) { - Response inner = this.serviceClient() - .createOrGetStartPendingUploadWithResponse(resourceGroupName, registryName, name, version, body, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PendingUploadResponseDtoImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PendingUploadResponseDto createOrGetStartPendingUpload(String resourceGroupName, String registryName, - String name, String version, PendingUploadRequestDto body) { - PendingUploadResponseDtoInner inner - = this.serviceClient().createOrGetStartPendingUpload(resourceGroupName, registryName, name, version, body); - if (inner != null) { - return new PendingUploadResponseDtoImpl(inner, this.manager()); - } else { - return null; - } - } - - private RegistryDataVersionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java deleted file mode 100644 index c6e8089e8815..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java +++ /dev/null @@ -1,962 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.RegistryEnvironmentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -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 RegistryEnvironmentContainersClient. - */ -public final class RegistryEnvironmentContainersClientImpl implements RegistryEnvironmentContainersClient { - /** - * The proxy service used to perform REST calls. - */ - private final RegistryEnvironmentContainersService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of RegistryEnvironmentContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - RegistryEnvironmentContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(RegistryEnvironmentContainersService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryEnvironmentContainers to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface RegistryEnvironmentContainersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @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.MachineLearningServices/registries/{registryName}/environments/{environmentName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @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.MachineLearningServices/registries/{registryName}/environments/{environmentName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EnvironmentContainerInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String skip, ListViewType listViewType) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), skip, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String skip, ListViewType listViewType, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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, registryName, - this.client.getApiVersion(), skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, - ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType)); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType, context)); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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, registryName, environmentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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, - registryName, environmentName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String environmentName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, environmentName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String environmentName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, environmentName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String environmentName) { - return this.beginDeleteAsync(resourceGroupName, registryName, environmentName).getSyncPoller(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String environmentName, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, environmentName, context).getSyncPoller(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String environmentName) { - return beginDeleteAsync(resourceGroupName, registryName, environmentName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String environmentName, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, environmentName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String environmentName) { - deleteAsync(resourceGroupName, registryName, environmentName).block(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String environmentName, Context context) { - deleteAsync(resourceGroupName, registryName, environmentName, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String registryName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, environmentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String registryName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, registryName, - environmentName, this.client.getApiVersion(), accept, context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @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 container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, - String environmentName) { - return getWithResponseAsync(resourceGroupName, registryName, environmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, - String environmentName, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, environmentName, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentContainerInner get(String resourceGroupName, String registryName, String environmentName) { - return getWithResponse(resourceGroupName, registryName, environmentName, Context.NONE).getValue(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String environmentName, EnvironmentContainerInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, environmentName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String environmentName, EnvironmentContainerInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, environmentName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EnvironmentContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EnvironmentContainerInner.class, EnvironmentContainerInner.class, - this.client.getContext()); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EnvironmentContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EnvironmentContainerInner.class, EnvironmentContainerInner.class, context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, body).getSyncPoller(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, body, context) - .getSyncPoller(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String environmentName, EnvironmentContainerInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String environmentName, EnvironmentContainerInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentContainerInner createOrUpdate(String resourceGroupName, String registryName, - String environmentName, EnvironmentContainerInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, environmentName, body).block(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentContainerInner createOrUpdate(String resourceGroupName, String registryName, - String environmentName, EnvironmentContainerInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, environmentName, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.java deleted file mode 100644 index 9541ffdac34e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryEnvironmentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.RegistryEnvironmentContainers; - -public final class RegistryEnvironmentContainersImpl implements RegistryEnvironmentContainers { - private static final ClientLogger LOGGER = new ClientLogger(RegistryEnvironmentContainersImpl.class); - - private final RegistryEnvironmentContainersClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public RegistryEnvironmentContainersImpl(RegistryEnvironmentContainersClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String environmentName) { - this.serviceClient().delete(resourceGroupName, registryName, environmentName); - } - - public void delete(String resourceGroupName, String registryName, String environmentName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, environmentName, context); - } - - public Response getWithResponse(String resourceGroupName, String registryName, - String environmentName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, registryName, environmentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EnvironmentContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EnvironmentContainer get(String resourceGroupName, String registryName, String environmentName) { - EnvironmentContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, environmentName); - if (inner != null) { - return new EnvironmentContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public EnvironmentContainer createOrUpdate(String resourceGroupName, String registryName, String environmentName, - EnvironmentContainerInner body) { - EnvironmentContainerInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, registryName, environmentName, body); - if (inner != null) { - return new EnvironmentContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public EnvironmentContainer createOrUpdate(String resourceGroupName, String registryName, String environmentName, - EnvironmentContainerInner body, Context context) { - EnvironmentContainerInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, registryName, environmentName, body, context); - if (inner != null) { - return new EnvironmentContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - private RegistryEnvironmentContainersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java deleted file mode 100644 index cd56235fb341..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java +++ /dev/null @@ -1,1052 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.RegistryEnvironmentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -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 RegistryEnvironmentVersionsClient. - */ -public final class RegistryEnvironmentVersionsClientImpl implements RegistryEnvironmentVersionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final RegistryEnvironmentVersionsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of RegistryEnvironmentVersionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - RegistryEnvironmentVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(RegistryEnvironmentVersionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryEnvironmentVersions to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface RegistryEnvironmentVersionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("environmentName") String environmentName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("environmentName") String environmentName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("environmentName") String environmentName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") EnvironmentVersionInner body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String environmentName, String orderBy, Integer top, String skip, - ListViewType listViewType) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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, registryName, environmentName, this.client.getApiVersion(), orderBy, top, skip, - listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String environmentName, String orderBy, Integer top, String skip, - ListViewType listViewType, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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, registryName, - environmentName, this.client.getApiVersion(), orderBy, top, skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, - String environmentName, String orderBy, Integer top, String skip, ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, environmentName, orderBy, top, - skip, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, - String environmentName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, environmentName, orderBy, top, - skip, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, - String environmentName, String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, environmentName, orderBy, top, - skip, listViewType, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, - String environmentName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>( - listAsync(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, - String environmentName, String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType, context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String environmentName, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, environmentName, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String environmentName, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, - registryName, environmentName, version, this.client.getApiVersion(), accept, context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String environmentName, String version) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, environmentName, version); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String environmentName, String version, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, environmentName, version, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String environmentName, String version) { - return this.beginDeleteAsync(resourceGroupName, registryName, environmentName, version).getSyncPoller(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String environmentName, String version, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, environmentName, version, context) - .getSyncPoller(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String environmentName, - String version) { - return beginDeleteAsync(resourceGroupName, registryName, environmentName, version).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String environmentName, - String version, Context context) { - return beginDeleteAsync(resourceGroupName, registryName, environmentName, version, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String environmentName, String version) { - deleteAsync(resourceGroupName, registryName, environmentName, version).block(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String environmentName, String version, - Context context) { - deleteAsync(resourceGroupName, registryName, environmentName, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String environmentName, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, environmentName, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String environmentName, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, registryName, - environmentName, version, this.client.getApiVersion(), accept, context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, - String environmentName, String version) { - return getWithResponseAsync(resourceGroupName, registryName, environmentName, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, - String environmentName, String version, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, environmentName, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentVersionInner get(String resourceGroupName, String registryName, String environmentName, - String version) { - return getWithResponse(resourceGroupName, registryName, environmentName, version, Context.NONE).getValue(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String environmentName, String version, EnvironmentVersionInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, environmentName, version, this.client.getApiVersion(), body, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String environmentName, String version, EnvironmentVersionInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, environmentName, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EnvironmentVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String environmentName, String version, - EnvironmentVersionInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, version, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EnvironmentVersionInner.class, EnvironmentVersionInner.class, - this.client.getContext()); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EnvironmentVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String environmentName, String version, - EnvironmentVersionInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, version, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EnvironmentVersionInner.class, EnvironmentVersionInner.class, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String environmentName, String version, - EnvironmentVersionInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body) - .getSyncPoller(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String environmentName, String version, - EnvironmentVersionInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body, context) - .getSyncPoller(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String environmentName, String version, EnvironmentVersionInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String environmentName, String version, EnvironmentVersionInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentVersionInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, - String version, EnvironmentVersionInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body).block(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentVersionInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, - String version, EnvironmentVersionInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.java deleted file mode 100644 index 24dafb6a874e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.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.machinelearning.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.machinelearning.fluent.RegistryEnvironmentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.RegistryEnvironmentVersions; - -public final class RegistryEnvironmentVersionsImpl implements RegistryEnvironmentVersions { - private static final ClientLogger LOGGER = new ClientLogger(RegistryEnvironmentVersionsImpl.class); - - private final RegistryEnvironmentVersionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public RegistryEnvironmentVersionsImpl(RegistryEnvironmentVersionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String registryName, - String environmentName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, environmentName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String environmentName, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String environmentName, String version) { - this.serviceClient().delete(resourceGroupName, registryName, environmentName, version); - } - - public void delete(String resourceGroupName, String registryName, String environmentName, String version, - Context context) { - this.serviceClient().delete(resourceGroupName, registryName, environmentName, version, context); - } - - public Response getWithResponse(String resourceGroupName, String registryName, - String environmentName, String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, registryName, environmentName, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EnvironmentVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EnvironmentVersion get(String resourceGroupName, String registryName, String environmentName, - String version) { - EnvironmentVersionInner inner - = this.serviceClient().get(resourceGroupName, registryName, environmentName, version); - if (inner != null) { - return new EnvironmentVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public EnvironmentVersion createOrUpdate(String resourceGroupName, String registryName, String environmentName, - String version, EnvironmentVersionInner body) { - EnvironmentVersionInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, registryName, environmentName, version, body); - if (inner != null) { - return new EnvironmentVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public EnvironmentVersion createOrUpdate(String resourceGroupName, String registryName, String environmentName, - String version, EnvironmentVersionInner body, Context context) { - EnvironmentVersionInner inner = this.serviceClient() - .createOrUpdate(resourceGroupName, registryName, environmentName, version, body, context); - if (inner != null) { - return new EnvironmentVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - private RegistryEnvironmentVersionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java deleted file mode 100644 index 37863e5db458..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialRegistryPartialTrackedResource; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.Registry; -import com.azure.resourcemanager.machinelearning.models.RegistryPartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class RegistryImpl implements Registry, Registry.Definition, Registry.Update { - private RegistryInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager 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 ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public String kind() { - return this.innerModel().kind(); - } - - public Sku sku() { - return this.innerModel().sku(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String discoveryUrl() { - return this.innerModel().discoveryUrl(); - } - - public String intellectualPropertyPublisher() { - return this.innerModel().intellectualPropertyPublisher(); - } - - public ArmResourceId managedResourceGroup() { - return this.innerModel().managedResourceGroup(); - } - - public String mlFlowRegistryUri() { - return this.innerModel().mlFlowRegistryUri(); - } - - public List registryPrivateEndpointConnections() { - List inner = this.innerModel().registryPrivateEndpointConnections(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String publicNetworkAccess() { - return this.innerModel().publicNetworkAccess(); - } - - public List regionDetails() { - List inner = this.innerModel().regionDetails(); - 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 RegistryInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String registryName; - - private PartialRegistryPartialTrackedResource updateBody; - - public RegistryImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public Registry create() { - this.innerObject = serviceManager.serviceClient() - .getRegistries() - .createOrUpdate(resourceGroupName, registryName, this.innerModel(), Context.NONE); - return this; - } - - public Registry create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getRegistries() - .createOrUpdate(resourceGroupName, registryName, this.innerModel(), context); - return this; - } - - RegistryImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new RegistryInner(); - this.serviceManager = serviceManager; - this.registryName = name; - } - - public RegistryImpl update() { - this.updateBody = new PartialRegistryPartialTrackedResource(); - return this; - } - - public Registry apply() { - this.innerObject = serviceManager.serviceClient() - .getRegistries() - .updateWithResponse(resourceGroupName, registryName, updateBody, Context.NONE) - .getValue(); - return this; - } - - public Registry apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getRegistries() - .updateWithResponse(resourceGroupName, registryName, updateBody, context) - .getValue(); - return this; - } - - RegistryImpl(RegistryInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); - } - - public Registry refresh() { - this.innerObject = serviceManager.serviceClient() - .getRegistries() - .getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE) - .getValue(); - return this; - } - - public Registry refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getRegistries() - .getByResourceGroupWithResponse(resourceGroupName, registryName, context) - .getValue(); - return this; - } - - public Registry removeRegions(RegistryInner body) { - return serviceManager.registries().removeRegions(resourceGroupName, registryName, body); - } - - public Registry removeRegions(RegistryInner body, Context context) { - return serviceManager.registries().removeRegions(resourceGroupName, registryName, body, context); - } - - public RegistryImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public RegistryImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public RegistryImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public RegistryImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public RegistryImpl withKind(String kind) { - this.innerModel().withKind(kind); - return this; - } - - public RegistryImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public RegistryImpl withDiscoveryUrl(String discoveryUrl) { - this.innerModel().withDiscoveryUrl(discoveryUrl); - return this; - } - - public RegistryImpl withIntellectualPropertyPublisher(String intellectualPropertyPublisher) { - this.innerModel().withIntellectualPropertyPublisher(intellectualPropertyPublisher); - return this; - } - - public RegistryImpl withManagedResourceGroup(ArmResourceId managedResourceGroup) { - this.innerModel().withManagedResourceGroup(managedResourceGroup); - return this; - } - - public RegistryImpl withMlFlowRegistryUri(String mlFlowRegistryUri) { - this.innerModel().withMlFlowRegistryUri(mlFlowRegistryUri); - return this; - } - - public RegistryImpl withRegistryPrivateEndpointConnections( - List registryPrivateEndpointConnections) { - this.innerModel().withRegistryPrivateEndpointConnections(registryPrivateEndpointConnections); - return this; - } - - public RegistryImpl withPublicNetworkAccess(String publicNetworkAccess) { - this.innerModel().withPublicNetworkAccess(publicNetworkAccess); - return this; - } - - public RegistryImpl withRegionDetails(List regionDetails) { - this.innerModel().withRegionDetails(regionDetails); - return this; - } - - public RegistryImpl withIdentity(RegistryPartialManagedServiceIdentity identity) { - this.updateBody.withIdentity(identity); - return this; - } - - public RegistryImpl withSku(PartialSku sku) { - this.updateBody.withSku(sku); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java deleted file mode 100644 index 6c8da0dd65a3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java +++ /dev/null @@ -1,949 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.RegistryModelContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelContainerResourceArmPaginatedResult; -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 RegistryModelContainersClient. - */ -public final class RegistryModelContainersClientImpl implements RegistryModelContainersClient { - /** - * The proxy service used to perform REST calls. - */ - private final RegistryModelContainersService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of RegistryModelContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - RegistryModelContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(RegistryModelContainersService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryModelContainers to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface RegistryModelContainersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("modelName") String modelName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("modelName") String modelName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("modelName") String modelName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ModelContainerInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String skip, ListViewType listViewType) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), skip, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String skip, ListViewType listViewType, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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, registryName, - this.client.getApiVersion(), skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, - ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType, context)); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String modelName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, modelName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String modelName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName 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, - registryName, modelName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String modelName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, modelName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String modelName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, modelName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String modelName) { - return this.beginDeleteAsync(resourceGroupName, registryName, modelName).getSyncPoller(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String modelName, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, modelName, context).getSyncPoller(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String modelName) { - return beginDeleteAsync(resourceGroupName, registryName, modelName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String modelName, Context context) { - return beginDeleteAsync(resourceGroupName, registryName, modelName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String modelName) { - deleteAsync(resourceGroupName, registryName, modelName).block(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String modelName, Context context) { - deleteAsync(resourceGroupName, registryName, modelName, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String modelName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, modelName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String modelName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName 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, registryName, - modelName, this.client.getApiVersion(), accept, context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @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 container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String modelName) { - return getWithResponseAsync(resourceGroupName, registryName, modelName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, - String modelName, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, modelName, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @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 container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelContainerInner get(String resourceGroupName, String registryName, String modelName) { - return getWithResponse(resourceGroupName, registryName, modelName, Context.NONE).getValue(); - } - - /** - * Create or update model container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String modelName, ModelContainerInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, modelName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update model container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String modelName, ModelContainerInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, modelName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update model container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ModelContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String modelName, ModelContainerInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ModelContainerInner.class, ModelContainerInner.class, this.client.getContext()); - } - - /** - * Create or update model container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ModelContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ModelContainerInner.class, ModelContainerInner.class, context); - } - - /** - * Create or update model container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ModelContainerInner> - beginCreateOrUpdate(String resourceGroupName, String registryName, String modelName, ModelContainerInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, body).getSyncPoller(); - } - - /** - * Create or update model container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ModelContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, body, context).getSyncPoller(); - } - - /** - * Create or update model container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String modelName, ModelContainerInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update model container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String modelName, ModelContainerInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update model container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelContainerInner createOrUpdate(String resourceGroupName, String registryName, String modelName, - ModelContainerInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, modelName, body).block(); - } - - /** - * Create or update model container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelContainerInner createOrUpdate(String resourceGroupName, String registryName, String modelName, - ModelContainerInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, modelName, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.java deleted file mode 100644 index 51e42539e42d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryModelContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import com.azure.resourcemanager.machinelearning.models.RegistryModelContainers; - -public final class RegistryModelContainersImpl implements RegistryModelContainers { - private static final ClientLogger LOGGER = new ClientLogger(RegistryModelContainersImpl.class); - - private final RegistryModelContainersClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public RegistryModelContainersImpl(RegistryModelContainersClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String modelName) { - this.serviceClient().delete(resourceGroupName, registryName, modelName); - } - - public void delete(String resourceGroupName, String registryName, String modelName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, modelName, context); - } - - public Response getWithResponse(String resourceGroupName, String registryName, String modelName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, registryName, modelName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ModelContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ModelContainer get(String resourceGroupName, String registryName, String modelName) { - ModelContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, modelName); - if (inner != null) { - return new ModelContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public ModelContainer createOrUpdate(String resourceGroupName, String registryName, String modelName, - ModelContainerInner body) { - ModelContainerInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, registryName, modelName, body); - if (inner != null) { - return new ModelContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public ModelContainer createOrUpdate(String resourceGroupName, String registryName, String modelName, - ModelContainerInner body, Context context) { - ModelContainerInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, registryName, modelName, body, context); - if (inner != null) { - return new ModelContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - private RegistryModelContainersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java deleted file mode 100644 index 67fb67a1dcb0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java +++ /dev/null @@ -1,1243 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.RegistryModelVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; -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 RegistryModelVersionsClient. - */ -public final class RegistryModelVersionsClientImpl implements RegistryModelVersionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final RegistryModelVersionsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of RegistryModelVersionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - RegistryModelVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(RegistryModelVersionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryModelVersions to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface RegistryModelVersionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("modelName") String modelName, @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, - @QueryParam("version") String version, @QueryParam("description") String description, - @QueryParam("tags") String tags, @QueryParam("properties") String properties, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("modelName") String modelName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("modelName") String modelName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("modelName") String modelName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ModelVersionInner body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}/startPendingUpload") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrGetStartPendingUpload(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("modelName") String modelName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") PendingUploadRequestDto body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Version identifier. - * @param description Model description. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String modelName, String skip, String orderBy, Integer top, String version, String description, String tags, - String properties, ListViewType listViewType) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, modelName, this.client.getApiVersion(), skip, orderBy, top, version, - description, tags, properties, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Version identifier. - * @param description Model description. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String modelName, String skip, String orderBy, Integer top, String version, String description, String tags, - String properties, ListViewType listViewType, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName 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, registryName, - modelName, this.client.getApiVersion(), skip, orderBy, top, version, description, tags, properties, - listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Version identifier. - * @param description Model description. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String modelName, - String skip, String orderBy, Integer top, String version, String description, String tags, String properties, - ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, modelName, skip, orderBy, top, - version, description, tags, properties, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String modelName) { - final String skip = null; - final String orderBy = null; - final Integer top = null; - final String version = null; - final String description = null; - final String tags = null; - final String properties = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, modelName, skip, orderBy, top, - version, description, tags, properties, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Version identifier. - * @param description Model description. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String modelName, - String skip, String orderBy, Integer top, String version, String description, String tags, String properties, - ListViewType listViewType, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, registryName, modelName, skip, orderBy, top, version, - description, tags, properties, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String modelName) { - final String skip = null; - final String orderBy = null; - final Integer top = null; - final String version = null; - final String description = null; - final String tags = null; - final String properties = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, modelName, skip, orderBy, top, version, - description, tags, properties, listViewType)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Version identifier. - * @param description Model description. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String modelName, - String skip, String orderBy, Integer top, String version, String description, String tags, String properties, - ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, modelName, skip, orderBy, top, version, - description, tags, properties, listViewType, context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String modelName, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, modelName, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String modelName, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, - registryName, modelName, version, this.client.getApiVersion(), accept, context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String modelName, String version) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, modelName, version); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String modelName, String version, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, modelName, version, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String modelName, String version) { - return this.beginDeleteAsync(resourceGroupName, registryName, modelName, version).getSyncPoller(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String modelName, String version, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, modelName, version, context).getSyncPoller(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String modelName, String version) { - return beginDeleteAsync(resourceGroupName, registryName, modelName, version).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String modelName, String version, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, modelName, version, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String modelName, String version) { - deleteAsync(resourceGroupName, registryName, modelName, version).block(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String modelName, String version, - Context context) { - deleteAsync(resourceGroupName, registryName, modelName, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String modelName, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, modelName, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String modelName, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, registryName, - modelName, version, this.client.getApiVersion(), accept, context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String modelName, - String version) { - return getWithResponseAsync(resourceGroupName, registryName, modelName, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, String modelName, - String version, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, modelName, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelVersionInner get(String resourceGroupName, String registryName, String modelName, String version) { - return getWithResponse(resourceGroupName, registryName, modelName, version, Context.NONE).getValue(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String modelName, String version, ModelVersionInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, modelName, version, this.client.getApiVersion(), body, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String modelName, String version, ModelVersionInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, modelName, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ModelVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, version, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ModelVersionInner.class, ModelVersionInner.class, this.client.getContext()); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ModelVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, version, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ModelVersionInner.class, ModelVersionInner.class, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ModelVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String modelName, String version, ModelVersionInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, version, body).getSyncPoller(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ModelVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String modelName, String version, ModelVersionInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, version, body, context) - .getSyncPoller(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String modelName, - String version, ModelVersionInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String modelName, - String version, ModelVersionInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelVersionInner createOrUpdate(String resourceGroupName, String registryName, String modelName, - String version, ModelVersionInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, modelName, version, body).block(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelVersionInner createOrUpdate(String resourceGroupName, String registryName, String modelName, - String version, ModelVersionInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, modelName, version, body, context).block(); - } - - /** - * Generate a storage location and credential for the client to upload a model asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrGetStartPendingUploadWithResponseAsync( - String resourceGroupName, String registryName, String modelName, String version, PendingUploadRequestDto body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrGetStartPendingUpload(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, version, - this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Generate a storage location and credential for the client to upload a model asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrGetStartPendingUploadWithResponseAsync( - String resourceGroupName, String registryName, String modelName, String version, PendingUploadRequestDto body, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrGetStartPendingUpload(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, modelName, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Generate a storage location and credential for the client to upload a model asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrGetStartPendingUploadAsync(String resourceGroupName, - String registryName, String modelName, String version, PendingUploadRequestDto body) { - return createOrGetStartPendingUploadWithResponseAsync(resourceGroupName, registryName, modelName, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Generate a storage location and credential for the client to upload a model asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, - String registryName, String modelName, String version, PendingUploadRequestDto body, Context context) { - return createOrGetStartPendingUploadWithResponseAsync(resourceGroupName, registryName, modelName, version, body, - context).block(); - } - - /** - * Generate a storage location and credential for the client to upload a model asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PendingUploadResponseDtoInner createOrGetStartPendingUpload(String resourceGroupName, String registryName, - String modelName, String version, PendingUploadRequestDto body) { - return createOrGetStartPendingUploadWithResponse(resourceGroupName, registryName, modelName, version, body, - Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java deleted file mode 100644 index e27d95552ea4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryModelVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; -import com.azure.resourcemanager.machinelearning.models.PendingUploadResponseDto; -import com.azure.resourcemanager.machinelearning.models.RegistryModelVersions; - -public final class RegistryModelVersionsImpl implements RegistryModelVersions { - private static final ClientLogger LOGGER = new ClientLogger(RegistryModelVersionsImpl.class); - - private final RegistryModelVersionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public RegistryModelVersionsImpl(RegistryModelVersionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String registryName, String modelName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, modelName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String modelName, - String skip, String orderBy, Integer top, String version, String description, String tags, String properties, - ListViewType listViewType, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, registryName, modelName, skip, orderBy, top, version, description, tags, - properties, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String modelName, String version) { - this.serviceClient().delete(resourceGroupName, registryName, modelName, version); - } - - public void delete(String resourceGroupName, String registryName, String modelName, String version, - Context context) { - this.serviceClient().delete(resourceGroupName, registryName, modelName, version, context); - } - - public Response getWithResponse(String resourceGroupName, String registryName, String modelName, - String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, registryName, modelName, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ModelVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ModelVersion get(String resourceGroupName, String registryName, String modelName, String version) { - ModelVersionInner inner = this.serviceClient().get(resourceGroupName, registryName, modelName, version); - if (inner != null) { - return new ModelVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public ModelVersion createOrUpdate(String resourceGroupName, String registryName, String modelName, String version, - ModelVersionInner body) { - ModelVersionInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, registryName, modelName, version, body); - if (inner != null) { - return new ModelVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public ModelVersion createOrUpdate(String resourceGroupName, String registryName, String modelName, String version, - ModelVersionInner body, Context context) { - ModelVersionInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, registryName, modelName, version, body, context); - if (inner != null) { - return new ModelVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, - String registryName, String modelName, String version, PendingUploadRequestDto body, Context context) { - Response inner = this.serviceClient() - .createOrGetStartPendingUploadWithResponse(resourceGroupName, registryName, modelName, version, body, - context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PendingUploadResponseDtoImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PendingUploadResponseDto createOrGetStartPendingUpload(String resourceGroupName, String registryName, - String modelName, String version, PendingUploadRequestDto body) { - PendingUploadResponseDtoInner inner = this.serviceClient() - .createOrGetStartPendingUpload(resourceGroupName, registryName, modelName, version, body); - if (inner != null) { - return new PendingUploadResponseDtoImpl(inner, this.manager()); - } else { - return null; - } - } - - private RegistryModelVersionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceManagerUtils.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceManagerUtils.java deleted file mode 100644 index cd2a6cecc972..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceManagerUtils.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.util.CoreUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import reactor.core.publisher.Flux; - -final class ResourceManagerUtils { - private ResourceManagerUtils() { - } - - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (!segments.isEmpty() && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl<>(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux - .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(iterable.iterator(), mapper); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceQuotaImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceQuotaImpl.java deleted file mode 100644 index 587759ff4f32..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceQuotaImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner; -import com.azure.resourcemanager.machinelearning.models.QuotaUnit; -import com.azure.resourcemanager.machinelearning.models.ResourceName; -import com.azure.resourcemanager.machinelearning.models.ResourceQuota; - -public final class ResourceQuotaImpl implements ResourceQuota { - private ResourceQuotaInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - ResourceQuotaImpl(ResourceQuotaInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String amlWorkspaceLocation() { - return this.innerModel().amlWorkspaceLocation(); - } - - public String type() { - return this.innerModel().type(); - } - - public ResourceName name() { - return this.innerModel().name(); - } - - public Long limit() { - return this.innerModel().limit(); - } - - public QuotaUnit unit() { - return this.innerModel().unit(); - } - - public ResourceQuotaInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java deleted file mode 100644 index 99af457f6cbd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; -import com.azure.resourcemanager.machinelearning.models.Schedule; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; - -public final class ScheduleImpl implements Schedule, Schedule.Definition, Schedule.Update { - private ScheduleInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ScheduleProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ScheduleInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public ScheduleImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public Schedule create() { - this.innerObject = serviceManager.serviceClient() - .getSchedules() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); - return this; - } - - public Schedule create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getSchedules() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); - return this; - } - - ScheduleImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ScheduleInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public ScheduleImpl update() { - return this; - } - - public Schedule apply() { - this.innerObject = serviceManager.serviceClient() - .getSchedules() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); - return this; - } - - public Schedule apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getSchedules() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); - return this; - } - - ScheduleImpl(ScheduleInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "schedules"); - } - - public Schedule refresh() { - this.innerObject = serviceManager.serviceClient() - .getSchedules() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public Schedule refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getSchedules() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public ScheduleImpl withProperties(ScheduleProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java deleted file mode 100644 index 245dfad807f6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java +++ /dev/null @@ -1,947 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.SchedulesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; -import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; -import com.azure.resourcemanager.machinelearning.models.ScheduleResourceArmPaginatedResult; -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 SchedulesClient. - */ -public final class SchedulesClientImpl implements SchedulesClient { - /** - * The proxy service used to perform REST calls. - */ - private final SchedulesService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of SchedulesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SchedulesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(SchedulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesSchedules to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface SchedulesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ScheduleListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ScheduleInner body, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, ScheduleListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @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 a paginated list of Schedule entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, ScheduleListViewType listViewType, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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, workspaceName, - this.client.getApiVersion(), skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - ScheduleListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final ScheduleListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @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 a paginated list of Schedule entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - ScheduleListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final ScheduleListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType)); - } - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @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 a paginated list of Schedule entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ScheduleListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, context)); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name).getSyncPoller(); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, context).getSyncPoller(); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return beginDeleteAsync(resourceGroupName, workspaceName, name).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - deleteAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @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 schedule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @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 schedule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, workspaceName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @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 schedule on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @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 schedule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @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 schedule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScheduleInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, ScheduleInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, ScheduleInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ScheduleInner> beginCreateOrUpdateAsync(String resourceGroupName, - String workspaceName, String name, ScheduleInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ScheduleInner.class, ScheduleInner.class, this.client.getContext()); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ScheduleInner> beginCreateOrUpdateAsync(String resourceGroupName, - String workspaceName, String name, ScheduleInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ScheduleInner.class, ScheduleInner.class, context); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ScheduleInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String name, ScheduleInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ScheduleInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String name, ScheduleInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - ScheduleInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - ScheduleInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScheduleInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ScheduleInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScheduleInner createOrUpdate(String resourceGroupName, String workspaceName, String name, ScheduleInner body, - Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java deleted file mode 100644 index ac5df25345fd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.SchedulesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; -import com.azure.resourcemanager.machinelearning.models.Schedule; -import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; -import com.azure.resourcemanager.machinelearning.models.Schedules; - -public final class SchedulesImpl implements Schedules { - private static final ClientLogger LOGGER = new ClientLogger(SchedulesImpl.class); - - private final SchedulesClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public SchedulesImpl(SchedulesClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ScheduleImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ScheduleListViewType listViewType, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ScheduleImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, context); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ScheduleImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Schedule get(String resourceGroupName, String workspaceName, String name) { - ScheduleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new ScheduleImpl(inner, this.manager()); - } else { - return null; - } - } - - public Schedule getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "schedules"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "schedules"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "schedules"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); - } - this.delete(resourceGroupName, workspaceName, name, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "schedules"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); - } - this.delete(resourceGroupName, workspaceName, name, context); - } - - private SchedulesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public ScheduleImpl define(String name) { - return new ScheduleImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointImpl.java deleted file mode 100644 index 0bd10a98774f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointImpl.java +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.ServerlessEndpointInner; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthKeys; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoint; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.util.Collections; -import java.util.Map; - -public final class ServerlessEndpointImpl - implements ServerlessEndpoint, ServerlessEndpoint.Definition, ServerlessEndpoint.Update { - private ServerlessEndpointInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager 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 ServerlessEndpointProperties properties() { - return this.innerModel().properties(); - } - - public String kind() { - return this.innerModel().kind(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public Sku sku() { - return this.innerModel().sku(); - } - - 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 ServerlessEndpointInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - private PartialMinimalTrackedResourceWithSkuAndIdentity updateBody; - - public ServerlessEndpointImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public ServerlessEndpoint create() { - this.innerObject = serviceManager.serviceClient() - .getServerlessEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); - return this; - } - - public ServerlessEndpoint create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getServerlessEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); - return this; - } - - ServerlessEndpointImpl(String name, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ServerlessEndpointInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public ServerlessEndpointImpl update() { - this.updateBody = new PartialMinimalTrackedResourceWithSkuAndIdentity(); - return this; - } - - public ServerlessEndpoint apply() { - this.innerObject = serviceManager.serviceClient() - .getServerlessEndpoints() - .update(resourceGroupName, workspaceName, name, updateBody, Context.NONE); - return this; - } - - public ServerlessEndpoint apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getServerlessEndpoints() - .update(resourceGroupName, workspaceName, name, updateBody, context); - return this; - } - - ServerlessEndpointImpl(ServerlessEndpointInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "serverlessEndpoints"); - } - - public ServerlessEndpoint refresh() { - this.innerObject = serviceManager.serviceClient() - .getServerlessEndpoints() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public ServerlessEndpoint refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getServerlessEndpoints() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public Response listKeysWithResponse(Context context) { - return serviceManager.serverlessEndpoints() - .listKeysWithResponse(resourceGroupName, workspaceName, name, context); - } - - public EndpointAuthKeys listKeys() { - return serviceManager.serverlessEndpoints().listKeys(resourceGroupName, workspaceName, name); - } - - public EndpointAuthKeys regenerateKeys(RegenerateEndpointKeysRequest body) { - return serviceManager.serverlessEndpoints().regenerateKeys(resourceGroupName, workspaceName, name, body); - } - - public EndpointAuthKeys regenerateKeys(RegenerateEndpointKeysRequest body, Context context) { - return serviceManager.serverlessEndpoints() - .regenerateKeys(resourceGroupName, workspaceName, name, body, context); - } - - public ServerlessEndpointImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ServerlessEndpointImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ServerlessEndpointImpl withProperties(ServerlessEndpointProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public ServerlessEndpointImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public ServerlessEndpointImpl withKind(String kind) { - this.innerModel().withKind(kind); - return this; - } - - public ServerlessEndpointImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public ServerlessEndpointImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public ServerlessEndpointImpl withSku(PartialSku sku) { - this.updateBody.withSku(sku); - return this; - } - - public ServerlessEndpointImpl withIdentity(PartialManagedServiceIdentity identity) { - this.updateBody.withIdentity(identity); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsClientImpl.java deleted file mode 100644 index a246871073bc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsClientImpl.java +++ /dev/null @@ -1,1604 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.ServerlessEndpointsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; -import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointTrackedResourceArmPaginatedResult; -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 ServerlessEndpointsClient. - */ -public final class ServerlessEndpointsClientImpl implements ServerlessEndpointsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ServerlessEndpointsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of ServerlessEndpointsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ServerlessEndpointsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(ServerlessEndpointsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesServerlessEndpoints to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface ServerlessEndpointsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialMinimalTrackedResourceWithSkuAndIdentity body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ServerlessEndpointInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}/listKeys") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}/regenerateKeys") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> regenerateKeys(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RegenerateEndpointKeysRequest body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List Serverless Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ServerlessEndpoint entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List Serverless Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 a paginated list of ServerlessEndpoint entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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, workspaceName, - this.client.getApiVersion(), skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List Serverless Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ServerlessEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Serverless Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ServerlessEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Serverless Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 a paginated list of ServerlessEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List Serverless Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); - } - - /** - * List Serverless Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 a paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, context)); - } - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name).getSyncPoller(); - } - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, context).getSyncPoller(); - } - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return beginDeleteAsync(resourceGroupName, workspaceName, name).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); - } - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - deleteAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get Serverless Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 serverless Endpoint along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get Serverless Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 serverless Endpoint along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, workspaceName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get Serverless Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 serverless Endpoint on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get Serverless Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 serverless Endpoint along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get Serverless Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 serverless Endpoint. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServerlessEndpointInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String name, PartialMinimalTrackedResourceWithSkuAndIdentity body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String name, PartialMinimalTrackedResourceWithSkuAndIdentity body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); - } - - /** - * Update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ServerlessEndpointInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, String name, - PartialMinimalTrackedResourceWithSkuAndIdentity body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, workspaceName, name, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ServerlessEndpointInner.class, ServerlessEndpointInner.class, - this.client.getContext()); - } - - /** - * Update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ServerlessEndpointInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, String name, - PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ServerlessEndpointInner.class, ServerlessEndpointInner.class, context); - } - - /** - * Update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerlessEndpointInner> beginUpdate( - String resourceGroupName, String workspaceName, String name, - PartialMinimalTrackedResourceWithSkuAndIdentity body) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); - } - - /** - * Update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerlessEndpointInner> beginUpdate( - String resourceGroupName, String workspaceName, String name, - PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); - } - - /** - * Update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String name, - PartialMinimalTrackedResourceWithSkuAndIdentity body) { - return beginUpdateAsync(resourceGroupName, workspaceName, name, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String name, - PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, name, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServerlessEndpointInner update(String resourceGroupName, String workspaceName, String name, - PartialMinimalTrackedResourceWithSkuAndIdentity body) { - return updateAsync(resourceGroupName, workspaceName, name, body).block(); - } - - /** - * Update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServerlessEndpointInner update(String resourceGroupName, String workspaceName, String name, - PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { - return updateAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Create or update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, ServerlessEndpointInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, ServerlessEndpointInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ServerlessEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ServerlessEndpointInner.class, ServerlessEndpointInner.class, - this.client.getContext()); - } - - /** - * Create or update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ServerlessEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ServerlessEndpointInner.class, ServerlessEndpointInner.class, context); - } - - /** - * Create or update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerlessEndpointInner> - beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); - } - - /** - * Create or update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerlessEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); - } - - /** - * Create or update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, ServerlessEndpointInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, ServerlessEndpointInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServerlessEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ServerlessEndpointInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); - } - - /** - * Create or update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServerlessEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ServerlessEndpointInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), accept, context); - } - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 keys for endpoint authentication on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listKeysAsync(String resourceGroupName, String workspaceName, String name) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 keys for endpoint authentication along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String name) { - return listKeysWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> regenerateKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String name, RegenerateEndpointKeysRequest body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.regenerateKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> regenerateKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String name, RegenerateEndpointKeysRequest body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.regenerateKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EndpointAuthKeysInner> beginRegenerateKeysAsync( - String resourceGroupName, String workspaceName, String name, RegenerateEndpointKeysRequest body) { - Mono>> mono - = regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, name, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EndpointAuthKeysInner.class, EndpointAuthKeysInner.class, - this.client.getContext()); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EndpointAuthKeysInner> beginRegenerateKeysAsync( - String resourceGroupName, String workspaceName, String name, RegenerateEndpointKeysRequest body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, name, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EndpointAuthKeysInner.class, EndpointAuthKeysInner.class, context); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EndpointAuthKeysInner> beginRegenerateKeys( - String resourceGroupName, String workspaceName, String name, RegenerateEndpointKeysRequest body) { - return this.beginRegenerateKeysAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EndpointAuthKeysInner> beginRegenerateKeys( - String resourceGroupName, String workspaceName, String name, RegenerateEndpointKeysRequest body, - Context context) { - return this.beginRegenerateKeysAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono regenerateKeysAsync(String resourceGroupName, String workspaceName, String name, - RegenerateEndpointKeysRequest body) { - return beginRegenerateKeysAsync(resourceGroupName, workspaceName, name, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono regenerateKeysAsync(String resourceGroupName, String workspaceName, String name, - RegenerateEndpointKeysRequest body, Context context) { - return beginRegenerateKeysAsync(resourceGroupName, workspaceName, name, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointAuthKeysInner regenerateKeys(String resourceGroupName, String workspaceName, String name, - RegenerateEndpointKeysRequest body) { - return regenerateKeysAsync(resourceGroupName, workspaceName, name, body).block(); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointAuthKeysInner regenerateKeys(String resourceGroupName, String workspaceName, String name, - RegenerateEndpointKeysRequest body, Context context) { - return regenerateKeysAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ServerlessEndpoint entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ServerlessEndpoint entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsImpl.java deleted file mode 100644 index b063241990c0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsImpl.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.machinelearning.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.machinelearning.fluent.ServerlessEndpointsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthKeys; -import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoint; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoints; - -public final class ServerlessEndpointsImpl implements ServerlessEndpoints { - private static final ClientLogger LOGGER = new ClientLogger(ServerlessEndpointsImpl.class); - - private final ServerlessEndpointsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public ServerlessEndpointsImpl(ServerlessEndpointsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ServerlessEndpointImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ServerlessEndpointImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, context); - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ServerlessEndpointImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ServerlessEndpoint get(String resourceGroupName, String workspaceName, String name) { - ServerlessEndpointInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new ServerlessEndpointImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - Response inner - = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EndpointAuthKeysImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String name) { - EndpointAuthKeysInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName, name); - if (inner != null) { - return new EndpointAuthKeysImpl(inner, this.manager()); - } else { - return null; - } - } - - public EndpointAuthKeys regenerateKeys(String resourceGroupName, String workspaceName, String name, - RegenerateEndpointKeysRequest body) { - EndpointAuthKeysInner inner = this.serviceClient().regenerateKeys(resourceGroupName, workspaceName, name, body); - if (inner != null) { - return new EndpointAuthKeysImpl(inner, this.manager()); - } else { - return null; - } - } - - public EndpointAuthKeys regenerateKeys(String resourceGroupName, String workspaceName, String name, - RegenerateEndpointKeysRequest body, Context context) { - EndpointAuthKeysInner inner - = this.serviceClient().regenerateKeys(resourceGroupName, workspaceName, name, body, context); - if (inner != null) { - return new EndpointAuthKeysImpl(inner, this.manager()); - } else { - return null; - } - } - - public ServerlessEndpoint getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "serverlessEndpoints"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'serverlessEndpoints'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "serverlessEndpoints"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'serverlessEndpoints'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "serverlessEndpoints"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'serverlessEndpoints'.", id))); - } - this.delete(resourceGroupName, workspaceName, name, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "serverlessEndpoints"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'serverlessEndpoints'.", id))); - } - this.delete(resourceGroupName, workspaceName, name, context); - } - - private ServerlessEndpointsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public ServerlessEndpointImpl define(String name) { - return new ServerlessEndpointImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.java deleted file mode 100644 index 7d3e193ce5f7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.machinelearning.models.SkuCapacity; -import com.azure.resourcemanager.machinelearning.models.SkuResource; -import com.azure.resourcemanager.machinelearning.models.SkuSetting; - -public final class SkuResourceImpl implements SkuResource { - private SkuResourceInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - SkuResourceImpl(SkuResourceInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String resourceType() { - return this.innerModel().resourceType(); - } - - public SkuSetting sku() { - return this.innerModel().sku(); - } - - public SkuCapacity capacity() { - return this.innerModel().capacity(); - } - - public SkuResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UpdateWorkspaceQuotasResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UpdateWorkspaceQuotasResultImpl.java deleted file mode 100644 index 84cfd25ec4b6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UpdateWorkspaceQuotasResultImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner; -import com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotas; -import com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotasResult; -import java.util.Collections; -import java.util.List; - -public final class UpdateWorkspaceQuotasResultImpl implements UpdateWorkspaceQuotasResult { - private UpdateWorkspaceQuotasResultInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - UpdateWorkspaceQuotasResultImpl(UpdateWorkspaceQuotasResultInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager 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 String nextLink() { - return this.innerModel().nextLink(); - } - - public UpdateWorkspaceQuotasResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageImpl.java deleted file mode 100644 index 393fe54fa983..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.UsageInner; -import com.azure.resourcemanager.machinelearning.models.Usage; -import com.azure.resourcemanager.machinelearning.models.UsageName; -import com.azure.resourcemanager.machinelearning.models.UsageUnit; - -public final class UsageImpl implements Usage { - private UsageInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - UsageImpl(UsageInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String amlWorkspaceLocation() { - return this.innerModel().amlWorkspaceLocation(); - } - - public String type() { - return this.innerModel().type(); - } - - public UsageUnit unit() { - return this.innerModel().unit(); - } - - public Long currentValue() { - return this.innerModel().currentValue(); - } - - public Long limit() { - return this.innerModel().limit(); - } - - public UsageName name() { - return this.innerModel().name(); - } - - public UsageInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java deleted file mode 100644 index 1d97ae953ac6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.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.machinelearning.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.machinelearning.fluent.UsagesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.UsageInner; -import com.azure.resourcemanager.machinelearning.models.ListUsagesResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in UsagesClient. - */ -public final class UsagesClientImpl implements UsagesClient { - /** - * The proxy service used to perform REST calls. - */ - private final UsagesService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of UsagesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - UsagesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(UsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesUsages to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface UsagesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @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 current usage information as well as limits for AML resources for given subscription and location - * along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(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.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, 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())); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @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 current usage information as well as limits for AML resources for given subscription and location - * along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(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 - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @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 current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location) { - return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @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 current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(location, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @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 current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location) { - return new PagedIterable<>(listAsync(location)); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @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 current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location, Context context) { - return new PagedIterable<>(listAsync(location, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Usages operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Usages operation response 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesImpl.java deleted file mode 100644 index fb42a3849996..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesImpl.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.machinelearning.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.machinelearning.fluent.UsagesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.UsageInner; -import com.azure.resourcemanager.machinelearning.models.Usage; -import com.azure.resourcemanager.machinelearning.models.Usages; - -public final class UsagesImpl implements Usages { - private static final ClientLogger LOGGER = new ClientLogger(UsagesImpl.class); - - private final UsagesClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public UsagesImpl(UsagesClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String location) { - PagedIterable inner = this.serviceClient().list(location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); - } - - public PagedIterable list(String location, Context context) { - PagedIterable inner = this.serviceClient().list(location, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); - } - - private UsagesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizeListResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizeListResultImpl.java deleted file mode 100644 index 21844b218b84..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizeListResultImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSize; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizeListResult; -import java.util.Collections; -import java.util.List; - -public final class VirtualMachineSizeListResultImpl implements VirtualMachineSizeListResult { - private VirtualMachineSizeListResultInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - VirtualMachineSizeListResultImpl(VirtualMachineSizeListResultInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager 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 VirtualMachineSizeListResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.java deleted file mode 100644 index ae6bb5ebcc99..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.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.machinelearning.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.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.VirtualMachineSizesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in VirtualMachineSizesClient. - */ -public final class VirtualMachineSizesClientImpl implements VirtualMachineSizesClient { - /** - * The proxy service used to perform REST calls. - */ - private final VirtualMachineSizesService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of VirtualMachineSizesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - VirtualMachineSizesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(VirtualMachineSizesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesVirtualMachineSizes to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface VirtualMachineSizesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("location") String location, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @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 List Virtual Machine size operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @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 List Virtual Machine size operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); - } - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @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 List Virtual Machine size operation response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String location) { - return listWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @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 List Virtual Machine size operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String location, Context context) { - return listWithResponseAsync(location, context).block(); - } - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @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 List Virtual Machine size operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineSizeListResultInner list(String location) { - return listWithResponse(location, Context.NONE).getValue(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java deleted file mode 100644 index 78ee3bbf2913..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.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.machinelearning.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.machinelearning.fluent.VirtualMachineSizesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizeListResult; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizes; - -public final class VirtualMachineSizesImpl implements VirtualMachineSizes { - private static final ClientLogger LOGGER = new ClientLogger(VirtualMachineSizesImpl.class); - - private final VirtualMachineSizesClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public VirtualMachineSizesImpl(VirtualMachineSizesClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response listWithResponse(String location, Context context) { - Response inner = this.serviceClient().listWithResponse(location, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VirtualMachineSizeListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public VirtualMachineSizeListResult list(String location) { - VirtualMachineSizeListResultInner inner = this.serviceClient().list(location); - if (inner != null) { - return new VirtualMachineSizeListResultImpl(inner, this.manager()); - } else { - return null; - } - } - - private VirtualMachineSizesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java deleted file mode 100644 index 8dbbeb5c5452..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.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.machinelearning.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; - -public final class WorkspaceConnectionPropertiesV2BasicResourceImpl - implements WorkspaceConnectionPropertiesV2BasicResource, WorkspaceConnectionPropertiesV2BasicResource.Definition { - private WorkspaceConnectionPropertiesV2BasicResourceInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - WorkspaceConnectionPropertiesV2BasicResourceImpl(WorkspaceConnectionPropertiesV2BasicResourceInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager 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 WorkspaceConnectionPropertiesV2 properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public WorkspaceConnectionPropertiesV2BasicResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String connectionName; - - public WorkspaceConnectionPropertiesV2BasicResourceImpl withExistingWorkspace(String resourceGroupName, - String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public WorkspaceConnectionPropertiesV2BasicResource create() { - this.innerObject = serviceManager.serviceClient() - .getWorkspaceConnections() - .createWithResponse(resourceGroupName, workspaceName, connectionName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public WorkspaceConnectionPropertiesV2BasicResource create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkspaceConnections() - .createWithResponse(resourceGroupName, workspaceName, connectionName, this.innerModel(), context) - .getValue(); - return this; - } - - WorkspaceConnectionPropertiesV2BasicResourceImpl(String name, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new WorkspaceConnectionPropertiesV2BasicResourceInner(); - this.serviceManager = serviceManager; - this.connectionName = name; - } - - public WorkspaceConnectionPropertiesV2BasicResource refresh() { - this.innerObject = serviceManager.serviceClient() - .getWorkspaceConnections() - .getWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE) - .getValue(); - return this; - } - - public WorkspaceConnectionPropertiesV2BasicResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkspaceConnections() - .getWithResponse(resourceGroupName, workspaceName, connectionName, context) - .getValue(); - return this; - } - - public Response listSecretsWithResponse(Context context) { - return serviceManager.workspaceConnections() - .listSecretsWithResponse(resourceGroupName, workspaceName, connectionName, context); - } - - public WorkspaceConnectionPropertiesV2BasicResource listSecrets() { - return serviceManager.workspaceConnections().listSecrets(resourceGroupName, workspaceName, connectionName); - } - - public WorkspaceConnectionPropertiesV2BasicResourceImpl withProperties(WorkspaceConnectionPropertiesV2 properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java deleted file mode 100644 index 62ef51558d03..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java +++ /dev/null @@ -1,898 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in WorkspaceConnectionsClient. - */ -public final class WorkspaceConnectionsClientImpl implements WorkspaceConnectionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final WorkspaceConnectionsService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of WorkspaceConnectionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkspaceConnectionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(WorkspaceConnectionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaceConnections to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface WorkspaceConnectionsService { - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkspaceConnectionPropertiesV2BasicResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("target") String target, @QueryParam("category") String category, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/listsecrets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSecrets( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * The create operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, connectionName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The create operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, connectionName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * The create operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, - String workspaceName, String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner parameters) { - return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The create operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(String resourceGroupName, - String workspaceName, String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner parameters, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, parameters, context).block(); - } - - /** - * The create operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionPropertiesV2BasicResourceInner create(String resourceGroupName, String workspaceName, - String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner parameters) { - return createWithResponse(resourceGroupName, workspaceName, connectionName, parameters, Context.NONE) - .getValue(); - } - - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getWithResponseAsync(String resourceGroupName, String workspaceName, String connectionName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getWithResponseAsync(String resourceGroupName, String workspaceName, String connectionName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName 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, workspaceName, - connectionName, this.client.getApiVersion(), accept, context); - } - - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, - String workspaceName, String connectionName) { - return getWithResponseAsync(resourceGroupName, workspaceName, connectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String workspaceName, String connectionName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); - } - - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionPropertiesV2BasicResourceInner get(String resourceGroupName, String workspaceName, - String connectionName) { - return getWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); - } - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String connectionName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String connectionName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName 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, - workspaceName, connectionName, this.client.getApiVersion(), accept, context); - } - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String connectionName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String connectionName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); - } - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String connectionName) { - deleteWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE); - } - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @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 response body along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listSinglePageAsync(String resourceGroupName, String workspaceName, String target, String category) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, target, category, 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())); - } - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @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 response body along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String target, String category, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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, workspaceName, target, - category, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @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 paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, - String workspaceName, String target, String category) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, target, category), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, - String workspaceName) { - final String target = null; - final String category = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, target, category), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @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 paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, - String workspaceName, String target, String category, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, target, category, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, - String workspaceName) { - final String target = null; - final String category = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, target, category)); - } - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @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 paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, - String workspaceName, String target, String category, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, target, category, context)); - } - - /** - * List all the secrets of a machine learning workspaces connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listSecretsWithResponseAsync(String resourceGroupName, String workspaceName, String connectionName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all the secrets of a machine learning workspaces connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName 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, - workspaceName, connectionName, this.client.getApiVersion(), accept, context); - } - - /** - * List all the secrets of a machine learning workspaces connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listSecretsAsync(String resourceGroupName, - String workspaceName, String connectionName) { - return listSecretsWithResponseAsync(resourceGroupName, workspaceName, connectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List all the secrets of a machine learning workspaces connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse(String resourceGroupName, - String workspaceName, String connectionName, Context context) { - return listSecretsWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); - } - - /** - * List all the secrets of a machine learning workspaces connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionPropertiesV2BasicResourceInner listSecrets(String resourceGroupName, String workspaceName, - String connectionName) { - return listSecretsWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java deleted file mode 100644 index 58050994047b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.WorkspaceConnectionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnections; - -public final class WorkspaceConnectionsImpl implements WorkspaceConnections { - private static final ClientLogger LOGGER = new ClientLogger(WorkspaceConnectionsImpl.class); - - private final WorkspaceConnectionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public WorkspaceConnectionsImpl(WorkspaceConnectionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, - String workspaceName, String connectionName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, connectionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkspaceConnectionPropertiesV2BasicResource get(String resourceGroupName, String workspaceName, - String connectionName) { - WorkspaceConnectionPropertiesV2BasicResourceInner inner - = this.serviceClient().get(resourceGroupName, workspaceName, connectionName); - if (inner != null) { - return new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String connectionName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, connectionName, context); - } - - public void delete(String resourceGroupName, String workspaceName, String connectionName) { - this.serviceClient().delete(resourceGroupName, workspaceName, connectionName); - } - - public PagedIterable list(String resourceGroupName, - String workspaceName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, - String workspaceName, String target, String category, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, target, category, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner1, this.manager())); - } - - public Response listSecretsWithResponse(String resourceGroupName, - String workspaceName, String connectionName, Context context) { - Response inner - = this.serviceClient().listSecretsWithResponse(resourceGroupName, workspaceName, connectionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkspaceConnectionPropertiesV2BasicResource listSecrets(String resourceGroupName, String workspaceName, - String connectionName) { - WorkspaceConnectionPropertiesV2BasicResourceInner inner - = this.serviceClient().listSecrets(resourceGroupName, workspaceName, connectionName); - if (inner != null) { - return new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public WorkspaceConnectionPropertiesV2BasicResource getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String connectionName = ResourceManagerUtils.getValueFromIdByName(id, "connections"); - if (connectionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String connectionName = ResourceManagerUtils.getValueFromIdByName(id, "connections"); - if (connectionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, connectionName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String connectionName = ResourceManagerUtils.getValueFromIdByName(id, "connections"); - if (connectionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String connectionName = ResourceManagerUtils.getValueFromIdByName(id, "connections"); - if (connectionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, connectionName, context); - } - - private WorkspaceConnectionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public WorkspaceConnectionPropertiesV2BasicResourceImpl define(String name) { - return new WorkspaceConnectionPropertiesV2BasicResourceImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java deleted file mode 100644 index 43a443320750..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.WorkspaceFeaturesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner; -import com.azure.resourcemanager.machinelearning.models.ListAmlUserFeatureResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in WorkspaceFeaturesClient. - */ -public final class WorkspaceFeaturesClientImpl implements WorkspaceFeaturesClient { - /** - * The proxy service used to perform REST calls. - */ - private final WorkspaceFeaturesService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of WorkspaceFeaturesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkspaceFeaturesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(WorkspaceFeaturesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaceFeatures to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface WorkspaceFeaturesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 List Aml user feature operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, 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 enabled features for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 List Aml user feature operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 List Aml user feature operation response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 List Aml user feature operation response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 List Aml user feature operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); - } - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 List Aml user feature operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesImpl.java deleted file mode 100644 index fb9af118f3f3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesImpl.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.machinelearning.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.machinelearning.fluent.WorkspaceFeaturesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner; -import com.azure.resourcemanager.machinelearning.models.AmlUserFeature; -import com.azure.resourcemanager.machinelearning.models.WorkspaceFeatures; - -public final class WorkspaceFeaturesImpl implements WorkspaceFeatures { - private static final ClientLogger LOGGER = new ClientLogger(WorkspaceFeaturesImpl.class); - - private final WorkspaceFeaturesClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public WorkspaceFeaturesImpl(WorkspaceFeaturesClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AmlUserFeatureImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AmlUserFeatureImpl(inner1, this.manager())); - } - - private WorkspaceFeaturesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceImpl.java deleted file mode 100644 index dea0ef544dde..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceImpl.java +++ /dev/null @@ -1,629 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.ManagedNetworkSettingsInner; -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.machinelearning.models.DiagnoseResponseResult; -import com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters; -import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; -import com.azure.resourcemanager.machinelearning.models.EncryptionUpdateProperties; -import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; -import com.azure.resourcemanager.machinelearning.models.ListNotebookKeysResult; -import com.azure.resourcemanager.machinelearning.models.ListStorageAccountKeysResult; -import com.azure.resourcemanager.machinelearning.models.ListWorkspaceKeysResult; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettings; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.NotebookAccessTokenResult; -import com.azure.resourcemanager.machinelearning.models.NotebookResourceInfo; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.ProvisioningState; -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; -import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; -import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; -import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.Workspace; -import com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig; -import com.azure.resourcemanager.machinelearning.models.WorkspaceUpdateParameters; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -public final class WorkspaceImpl implements Workspace, Workspace.Definition, Workspace.Update { - private WorkspaceInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public String kind() { - return this.innerModel().kind(); - } - - 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 Sku sku() { - return this.innerModel().sku(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String workspaceId() { - return this.innerModel().workspaceId(); - } - - public String description() { - return this.innerModel().description(); - } - - public String friendlyName() { - return this.innerModel().friendlyName(); - } - - public String keyVault() { - return this.innerModel().keyVault(); - } - - public String applicationInsights() { - return this.innerModel().applicationInsights(); - } - - public String containerRegistry() { - return this.innerModel().containerRegistry(); - } - - public String storageAccount() { - return this.innerModel().storageAccount(); - } - - public String discoveryUrl() { - return this.innerModel().discoveryUrl(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public EncryptionProperty encryption() { - return this.innerModel().encryption(); - } - - public Boolean hbiWorkspace() { - return this.innerModel().hbiWorkspace(); - } - - public String serviceProvisionedResourceGroup() { - return this.innerModel().serviceProvisionedResourceGroup(); - } - - public Integer privateLinkCount() { - return this.innerModel().privateLinkCount(); - } - - public String imageBuildCompute() { - return this.innerModel().imageBuildCompute(); - } - - public Boolean allowPublicAccessWhenBehindVnet() { - return this.innerModel().allowPublicAccessWhenBehindVnet(); - } - - public PublicNetworkAccess publicNetworkAccess() { - return this.innerModel().publicNetworkAccess(); - } - - public List privateEndpointConnections() { - List inner = this.innerModel().privateEndpointConnections(); - if (inner != null) { - return Collections.unmodifiableList(inner.stream() - .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public ServerlessComputeSettings serverlessComputeSettings() { - return this.innerModel().serverlessComputeSettings(); - } - - public List sharedPrivateLinkResources() { - List inner = this.innerModel().sharedPrivateLinkResources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public NotebookResourceInfo notebookInfo() { - NotebookResourceInfoInner inner = this.innerModel().notebookInfo(); - if (inner != null) { - return new NotebookResourceInfoImpl(inner, this.manager()); - } else { - return null; - } - } - - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.innerModel().serviceManagedResourcesSettings(); - } - - public String primaryUserAssignedIdentity() { - return this.innerModel().primaryUserAssignedIdentity(); - } - - public String tenantId() { - return this.innerModel().tenantId(); - } - - public Boolean storageHnsEnabled() { - return this.innerModel().storageHnsEnabled(); - } - - public String mlFlowTrackingUri() { - return this.innerModel().mlFlowTrackingUri(); - } - - public Boolean v1LegacyMode() { - return this.innerModel().v1LegacyMode(); - } - - public ManagedNetworkSettings managedNetwork() { - ManagedNetworkSettingsInner inner = this.innerModel().managedNetwork(); - if (inner != null) { - return new ManagedNetworkSettingsImpl(inner, this.manager()); - } else { - return null; - } - } - - public FeatureStoreSettings featureStoreSettings() { - return this.innerModel().featureStoreSettings(); - } - - public List associatedWorkspaces() { - List inner = this.innerModel().associatedWorkspaces(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Boolean enableDataIsolation() { - return this.innerModel().enableDataIsolation(); - } - - public String hubResourceId() { - return this.innerModel().hubResourceId(); - } - - public WorkspaceHubConfig workspaceHubConfig() { - return this.innerModel().workspaceHubConfig(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public WorkspaceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private WorkspaceUpdateParameters updateParameters; - - public WorkspaceImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public Workspace create() { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .createOrUpdate(resourceGroupName, workspaceName, this.innerModel(), Context.NONE); - return this; - } - - public Workspace create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .createOrUpdate(resourceGroupName, workspaceName, this.innerModel(), context); - return this; - } - - WorkspaceImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new WorkspaceInner(); - this.serviceManager = serviceManager; - this.workspaceName = name; - } - - public WorkspaceImpl update() { - this.updateParameters = new WorkspaceUpdateParameters(); - return this; - } - - public Workspace apply() { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .update(resourceGroupName, workspaceName, updateParameters, Context.NONE); - return this; - } - - public Workspace apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .update(resourceGroupName, workspaceName, updateParameters, context); - return this; - } - - WorkspaceImpl(WorkspaceInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - } - - public Workspace refresh() { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE) - .getValue(); - return this; - } - - public Workspace refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .getByResourceGroupWithResponse(resourceGroupName, workspaceName, context) - .getValue(); - return this; - } - - public DiagnoseResponseResult diagnose() { - return serviceManager.workspaces().diagnose(resourceGroupName, workspaceName); - } - - public DiagnoseResponseResult diagnose(DiagnoseWorkspaceParameters parameters, Context context) { - return serviceManager.workspaces().diagnose(resourceGroupName, workspaceName, parameters, context); - } - - public Response listKeysWithResponse(Context context) { - return serviceManager.workspaces().listKeysWithResponse(resourceGroupName, workspaceName, context); - } - - public ListWorkspaceKeysResult listKeys() { - return serviceManager.workspaces().listKeys(resourceGroupName, workspaceName); - } - - public void resyncKeys() { - serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName); - } - - public void resyncKeys(Context context) { - serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName, context); - } - - public Response listNotebookAccessTokenWithResponse(Context context) { - return serviceManager.workspaces() - .listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, context); - } - - public NotebookAccessTokenResult listNotebookAccessToken() { - return serviceManager.workspaces().listNotebookAccessToken(resourceGroupName, workspaceName); - } - - public NotebookResourceInfo prepareNotebook() { - return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName); - } - - public NotebookResourceInfo prepareNotebook(Context context) { - return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName, context); - } - - public Response listStorageAccountKeysWithResponse(Context context) { - return serviceManager.workspaces() - .listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, context); - } - - public ListStorageAccountKeysResult listStorageAccountKeys() { - return serviceManager.workspaces().listStorageAccountKeys(resourceGroupName, workspaceName); - } - - public Response listNotebookKeysWithResponse(Context context) { - return serviceManager.workspaces().listNotebookKeysWithResponse(resourceGroupName, workspaceName, context); - } - - public ListNotebookKeysResult listNotebookKeys() { - return serviceManager.workspaces().listNotebookKeys(resourceGroupName, workspaceName); - } - - public WorkspaceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public WorkspaceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public WorkspaceImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateParameters.withTags(tags); - return this; - } - } - - public WorkspaceImpl withIdentity(ManagedServiceIdentity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateParameters.withIdentity(identity); - return this; - } - } - - public WorkspaceImpl withKind(String kind) { - this.innerModel().withKind(kind); - return this; - } - - public WorkspaceImpl withSku(Sku sku) { - if (isInCreateMode()) { - this.innerModel().withSku(sku); - return this; - } else { - this.updateParameters.withSku(sku); - return this; - } - } - - public WorkspaceImpl withDescription(String description) { - if (isInCreateMode()) { - this.innerModel().withDescription(description); - return this; - } else { - this.updateParameters.withDescription(description); - return this; - } - } - - public WorkspaceImpl withFriendlyName(String friendlyName) { - if (isInCreateMode()) { - this.innerModel().withFriendlyName(friendlyName); - return this; - } else { - this.updateParameters.withFriendlyName(friendlyName); - return this; - } - } - - public WorkspaceImpl withKeyVault(String keyVault) { - this.innerModel().withKeyVault(keyVault); - return this; - } - - public WorkspaceImpl withApplicationInsights(String applicationInsights) { - if (isInCreateMode()) { - this.innerModel().withApplicationInsights(applicationInsights); - return this; - } else { - this.updateParameters.withApplicationInsights(applicationInsights); - return this; - } - } - - public WorkspaceImpl withContainerRegistry(String containerRegistry) { - if (isInCreateMode()) { - this.innerModel().withContainerRegistry(containerRegistry); - return this; - } else { - this.updateParameters.withContainerRegistry(containerRegistry); - return this; - } - } - - public WorkspaceImpl withStorageAccount(String storageAccount) { - this.innerModel().withStorageAccount(storageAccount); - return this; - } - - public WorkspaceImpl withDiscoveryUrl(String discoveryUrl) { - this.innerModel().withDiscoveryUrl(discoveryUrl); - return this; - } - - public WorkspaceImpl withEncryption(EncryptionProperty encryption) { - this.innerModel().withEncryption(encryption); - return this; - } - - public WorkspaceImpl withHbiWorkspace(Boolean hbiWorkspace) { - this.innerModel().withHbiWorkspace(hbiWorkspace); - return this; - } - - public WorkspaceImpl withImageBuildCompute(String imageBuildCompute) { - if (isInCreateMode()) { - this.innerModel().withImageBuildCompute(imageBuildCompute); - return this; - } else { - this.updateParameters.withImageBuildCompute(imageBuildCompute); - return this; - } - } - - public WorkspaceImpl withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { - this.innerModel().withAllowPublicAccessWhenBehindVnet(allowPublicAccessWhenBehindVnet); - return this; - } - - public WorkspaceImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - if (isInCreateMode()) { - this.innerModel().withPublicNetworkAccess(publicNetworkAccess); - return this; - } else { - this.updateParameters.withPublicNetworkAccess(publicNetworkAccess); - return this; - } - } - - public WorkspaceImpl withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { - if (isInCreateMode()) { - this.innerModel().withServerlessComputeSettings(serverlessComputeSettings); - return this; - } else { - this.updateParameters.withServerlessComputeSettings(serverlessComputeSettings); - return this; - } - } - - public WorkspaceImpl withSharedPrivateLinkResources(List sharedPrivateLinkResources) { - this.innerModel().withSharedPrivateLinkResources(sharedPrivateLinkResources); - return this; - } - - public WorkspaceImpl - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { - if (isInCreateMode()) { - this.innerModel().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); - return this; - } else { - this.updateParameters.withServiceManagedResourcesSettings(serviceManagedResourcesSettings); - return this; - } - } - - public WorkspaceImpl withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - if (isInCreateMode()) { - this.innerModel().withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); - return this; - } else { - this.updateParameters.withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); - return this; - } - } - - public WorkspaceImpl withV1LegacyMode(Boolean v1LegacyMode) { - if (isInCreateMode()) { - this.innerModel().withV1LegacyMode(v1LegacyMode); - return this; - } else { - this.updateParameters.withV1LegacyMode(v1LegacyMode); - return this; - } - } - - public WorkspaceImpl withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { - if (isInCreateMode()) { - this.innerModel().withManagedNetwork(managedNetwork); - return this; - } else { - this.updateParameters.withManagedNetwork(managedNetwork); - return this; - } - } - - public WorkspaceImpl withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { - if (isInCreateMode()) { - this.innerModel().withFeatureStoreSettings(featureStoreSettings); - return this; - } else { - this.updateParameters.withFeatureStoreSettings(featureStoreSettings); - return this; - } - } - - public WorkspaceImpl withAssociatedWorkspaces(List associatedWorkspaces) { - this.innerModel().withAssociatedWorkspaces(associatedWorkspaces); - return this; - } - - public WorkspaceImpl withEnableDataIsolation(Boolean enableDataIsolation) { - if (isInCreateMode()) { - this.innerModel().withEnableDataIsolation(enableDataIsolation); - return this; - } else { - this.updateParameters.withEnableDataIsolation(enableDataIsolation); - return this; - } - } - - public WorkspaceImpl withHubResourceId(String hubResourceId) { - this.innerModel().withHubResourceId(hubResourceId); - return this; - } - - public WorkspaceImpl withWorkspaceHubConfig(WorkspaceHubConfig workspaceHubConfig) { - this.innerModel().withWorkspaceHubConfig(workspaceHubConfig); - return this; - } - - public WorkspaceImpl withEncryption(EncryptionUpdateProperties encryption) { - this.updateParameters.withEncryption(encryption); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.java deleted file mode 100644 index 7b8461716398..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesInner; -import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; -import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettings; -import com.azure.resourcemanager.machinelearning.models.NotebookResourceInfo; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.ProvisioningState; -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; -import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; -import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; -import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig; -import com.azure.resourcemanager.machinelearning.models.WorkspaceProperties; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class WorkspacePropertiesImpl implements WorkspaceProperties { - private WorkspacePropertiesInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - WorkspacePropertiesImpl(WorkspacePropertiesInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String workspaceId() { - return this.innerModel().workspaceId(); - } - - public String description() { - return this.innerModel().description(); - } - - public String friendlyName() { - return this.innerModel().friendlyName(); - } - - public String keyVault() { - return this.innerModel().keyVault(); - } - - public String applicationInsights() { - return this.innerModel().applicationInsights(); - } - - public String containerRegistry() { - return this.innerModel().containerRegistry(); - } - - public String storageAccount() { - return this.innerModel().storageAccount(); - } - - public String discoveryUrl() { - return this.innerModel().discoveryUrl(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public EncryptionProperty encryption() { - return this.innerModel().encryption(); - } - - public Boolean hbiWorkspace() { - return this.innerModel().hbiWorkspace(); - } - - public String serviceProvisionedResourceGroup() { - return this.innerModel().serviceProvisionedResourceGroup(); - } - - public Integer privateLinkCount() { - return this.innerModel().privateLinkCount(); - } - - public String imageBuildCompute() { - return this.innerModel().imageBuildCompute(); - } - - public Boolean allowPublicAccessWhenBehindVnet() { - return this.innerModel().allowPublicAccessWhenBehindVnet(); - } - - public PublicNetworkAccess publicNetworkAccess() { - return this.innerModel().publicNetworkAccess(); - } - - public List privateEndpointConnections() { - List inner = this.innerModel().privateEndpointConnections(); - if (inner != null) { - return Collections.unmodifiableList(inner.stream() - .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public ServerlessComputeSettings serverlessComputeSettings() { - return this.innerModel().serverlessComputeSettings(); - } - - public List sharedPrivateLinkResources() { - List inner = this.innerModel().sharedPrivateLinkResources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public NotebookResourceInfo notebookInfo() { - NotebookResourceInfoInner inner = this.innerModel().notebookInfo(); - if (inner != null) { - return new NotebookResourceInfoImpl(inner, this.manager()); - } else { - return null; - } - } - - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.innerModel().serviceManagedResourcesSettings(); - } - - public String primaryUserAssignedIdentity() { - return this.innerModel().primaryUserAssignedIdentity(); - } - - public String tenantId() { - return this.innerModel().tenantId(); - } - - public Boolean storageHnsEnabled() { - return this.innerModel().storageHnsEnabled(); - } - - public String mlFlowTrackingUri() { - return this.innerModel().mlFlowTrackingUri(); - } - - public Boolean v1LegacyMode() { - return this.innerModel().v1LegacyMode(); - } - - public ManagedNetworkSettings managedNetwork() { - ManagedNetworkSettingsInner inner = this.innerModel().managedNetwork(); - if (inner != null) { - return new ManagedNetworkSettingsImpl(inner, this.manager()); - } else { - return null; - } - } - - public FeatureStoreSettings featureStoreSettings() { - return this.innerModel().featureStoreSettings(); - } - - public List associatedWorkspaces() { - List inner = this.innerModel().associatedWorkspaces(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Boolean enableDataIsolation() { - return this.innerModel().enableDataIsolation(); - } - - public String hubResourceId() { - return this.innerModel().hubResourceId(); - } - - public WorkspaceHubConfig workspaceHubConfig() { - return this.innerModel().workspaceHubConfig(); - } - - public WorkspacePropertiesInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesUpdateParametersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesUpdateParametersImpl.java deleted file mode 100644 index 33bff913658c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesUpdateParametersImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParametersInner; -import com.azure.resourcemanager.machinelearning.models.EncryptionUpdateProperties; -import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettings; -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; -import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; -import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; -import com.azure.resourcemanager.machinelearning.models.WorkspacePropertiesUpdateParameters; - -public final class WorkspacePropertiesUpdateParametersImpl implements WorkspacePropertiesUpdateParameters { - private WorkspacePropertiesUpdateParametersInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - WorkspacePropertiesUpdateParametersImpl(WorkspacePropertiesUpdateParametersInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String description() { - return this.innerModel().description(); - } - - public String friendlyName() { - return this.innerModel().friendlyName(); - } - - public String imageBuildCompute() { - return this.innerModel().imageBuildCompute(); - } - - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.innerModel().serviceManagedResourcesSettings(); - } - - public String primaryUserAssignedIdentity() { - return this.innerModel().primaryUserAssignedIdentity(); - } - - public ServerlessComputeSettings serverlessComputeSettings() { - return this.innerModel().serverlessComputeSettings(); - } - - public PublicNetworkAccess publicNetworkAccess() { - return this.innerModel().publicNetworkAccess(); - } - - public String applicationInsights() { - return this.innerModel().applicationInsights(); - } - - public String containerRegistry() { - return this.innerModel().containerRegistry(); - } - - public FeatureStoreSettings featureStoreSettings() { - return this.innerModel().featureStoreSettings(); - } - - public ManagedNetworkSettings managedNetwork() { - ManagedNetworkSettingsInner inner = this.innerModel().managedNetwork(); - if (inner != null) { - return new ManagedNetworkSettingsImpl(inner, this.manager()); - } else { - return null; - } - } - - public Boolean enableDataIsolation() { - return this.innerModel().enableDataIsolation(); - } - - public Boolean v1LegacyMode() { - return this.innerModel().v1LegacyMode(); - } - - public EncryptionUpdateProperties encryption() { - return this.innerModel().encryption(); - } - - public WorkspacePropertiesUpdateParametersInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java deleted file mode 100644 index a6b636792212..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java +++ /dev/null @@ -1,2748 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.WorkspacesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DiagnoseResponseResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListNotebookKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListStorageAccountKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListWorkspaceKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters; -import com.azure.resourcemanager.machinelearning.models.WorkspaceListResult; -import com.azure.resourcemanager.machinelearning.models.WorkspaceUpdateParameters; -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 WorkspacesClient. - */ -public final class WorkspacesClientImpl implements WorkspacesClient { - /** - * The proxy service used to perform REST calls. - */ - private final WorkspacesService service; - - /** - * The service client containing this operation class. - */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of WorkspacesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkspacesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(WorkspacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaces to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface WorkspacesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") WorkspaceInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("forceToPurge") Boolean forceToPurge, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") WorkspaceUpdateParameters parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> diagnose(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DiagnoseWorkspaceParameters parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resyncKeys(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNotebookAccessToken(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> prepareNotebook(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listStorageAccountKeys(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNotebookKeys(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listOutboundNetworkDependenciesEndpoints( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 the specified machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 the specified machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); - } - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 the specified machine learning workspace on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String workspaceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 the specified machine learning workspace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 the specified machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { - return getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @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 an object that represents a machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, WorkspaceInner parameters) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @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 an object that represents a machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, WorkspaceInner parameters, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, parameters, accept, context); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginCreateOrUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceInner.class, WorkspaceInner.class, this.client.getContext()); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginCreateOrUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceInner.class, WorkspaceInner.class, context); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @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 an object that represents a machine learning workspace on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - WorkspaceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @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 an object that represents a machine learning workspace on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - WorkspaceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @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 an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters) { - return createOrUpdateAsync(resourceGroupName, workspaceName, parameters).block(); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @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 an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters, - Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).block(); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - Boolean forceToPurge) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, forceToPurge, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - Boolean forceToPurge, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, forceToPurge, accept, context); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - Boolean forceToPurge) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, forceToPurge); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName) { - final Boolean forceToPurge = null; - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, forceToPurge); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - Boolean forceToPurge, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, forceToPurge, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName) { - final Boolean forceToPurge = null; - return this.beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge).getSyncPoller(); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - Boolean forceToPurge, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge, context).getSyncPoller(); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, Boolean forceToPurge) { - return beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName) { - final Boolean forceToPurge = null; - return beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, Boolean forceToPurge, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName) { - final Boolean forceToPurge = null; - deleteAsync(resourceGroupName, workspaceName, forceToPurge).block(); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context) { - deleteAsync(resourceGroupName, workspaceName, forceToPurge, context).block(); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @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 an object that represents a machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @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 an object that represents a machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, parameters, accept, context); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceUpdateParameters parameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, workspaceName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceInner.class, WorkspaceInner.class, this.client.getContext()); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceUpdateParameters parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceInner.class, WorkspaceInner.class, context); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, - String workspaceName, WorkspaceUpdateParameters parameters) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, - String workspaceName, WorkspaceUpdateParameters parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @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 an object that represents a machine learning workspace on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters) { - return beginUpdateAsync(resourceGroupName, workspaceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @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 an object that represents a machine learning workspace on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @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 an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters) { - return updateAsync(resourceGroupName, workspaceName, parameters).block(); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @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 an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters, - Context context) { - return updateAsync(resourceGroupName, workspaceName, parameters, context).block(); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. - * @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 result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String skip) { - 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.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, skip, 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 the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. - * @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 result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String skip, 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.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. - * @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 result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skip) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skip), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final String skip = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skip), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. - * @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 result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skip, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skip, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final String skip = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skip)); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. - * @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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skip, context)); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> diagnoseWithResponseAsync(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters != null) { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.diagnose(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> diagnoseWithResponseAsync(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters != null) { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.diagnose(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DiagnoseResponseResultInner> - beginDiagnoseAsync(String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters) { - Mono>> mono = diagnoseWithResponseAsync(resourceGroupName, workspaceName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DiagnoseResponseResultInner.class, DiagnoseResponseResultInner.class, - this.client.getContext()); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DiagnoseResponseResultInner> - beginDiagnoseAsync(String resourceGroupName, String workspaceName) { - final DiagnoseWorkspaceParameters parameters = null; - Mono>> mono = diagnoseWithResponseAsync(resourceGroupName, workspaceName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DiagnoseResponseResultInner.class, DiagnoseResponseResultInner.class, - this.client.getContext()); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DiagnoseResponseResultInner> beginDiagnoseAsync( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = diagnoseWithResponseAsync(resourceGroupName, workspaceName, parameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DiagnoseResponseResultInner.class, DiagnoseResponseResultInner.class, - context); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DiagnoseResponseResultInner> - beginDiagnose(String resourceGroupName, String workspaceName) { - final DiagnoseWorkspaceParameters parameters = null; - return this.beginDiagnoseAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DiagnoseResponseResultInner> beginDiagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context) { - return this.beginDiagnoseAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono diagnoseAsync(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters) { - return beginDiagnoseAsync(resourceGroupName, workspaceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono diagnoseAsync(String resourceGroupName, String workspaceName) { - final DiagnoseWorkspaceParameters parameters = null; - return beginDiagnoseAsync(resourceGroupName, workspaceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono diagnoseAsync(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters, Context context) { - return beginDiagnoseAsync(resourceGroupName, workspaceName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiagnoseResponseResultInner diagnose(String resourceGroupName, String workspaceName) { - final DiagnoseWorkspaceParameters parameters = null; - return diagnoseAsync(resourceGroupName, workspaceName, parameters).block(); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiagnoseResponseResultInner diagnose(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters, Context context) { - return diagnoseAsync(resourceGroupName, workspaceName, parameters, context).block(); - } - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, accept, context); - } - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listKeysAsync(String resourceGroupName, String workspaceName) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, - Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ListWorkspaceKeysResultInner listKeys(String resourceGroupName, String workspaceName) { - return listKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncKeysWithResponseAsync(String resourceGroupName, - String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.resyncKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncKeysWithResponseAsync(String resourceGroupName, String workspaceName, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.resyncKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResyncKeysAsync(String resourceGroupName, String workspaceName) { - Mono>> mono = resyncKeysWithResponseAsync(resourceGroupName, workspaceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResyncKeysAsync(String resourceGroupName, String workspaceName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = resyncKeysWithResponseAsync(resourceGroupName, workspaceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName) { - return this.beginResyncKeysAsync(resourceGroupName, workspaceName).getSyncPoller(); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName, - Context context) { - return this.beginResyncKeysAsync(resourceGroupName, workspaceName, context).getSyncPoller(); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncKeysAsync(String resourceGroupName, String workspaceName) { - return beginResyncKeysAsync(resourceGroupName, workspaceName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncKeysAsync(String resourceGroupName, String workspaceName, Context context) { - return beginResyncKeysAsync(resourceGroupName, workspaceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void resyncKeys(String resourceGroupName, String workspaceName) { - resyncKeysAsync(resourceGroupName, workspaceName).block(); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void resyncKeys(String resourceGroupName, String workspaceName, Context context) { - resyncKeysAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @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 result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String skip) { - 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.getApiVersion(), - this.client.getSubscriptionId(), skip, 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 the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @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 result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String skip, 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.getApiVersion(), this.client.getSubscriptionId(), skip, accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @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 result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(skip), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(skip), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @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 result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skip, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(skip, context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String skip = null; - return new PagedIterable<>(listAsync(skip)); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String skip, Context context) { - return new PagedIterable<>(listAsync(skip, context)); - } - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listNotebookAccessTokenWithResponseAsync(String resourceGroupName, String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listNotebookAccessToken(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listNotebookAccessTokenWithResponseAsync(String resourceGroupName, String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNotebookAccessToken(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); - } - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listNotebookAccessTokenAsync(String resourceGroupName, - String workspaceName) { - return listNotebookAccessTokenWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listNotebookAccessTokenWithResponse(String resourceGroupName, - String workspaceName, Context context) { - return listNotebookAccessTokenWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName) { - return listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> prepareNotebookWithResponseAsync(String resourceGroupName, - String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.prepareNotebook(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> prepareNotebookWithResponseAsync(String resourceGroupName, - String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.prepareNotebook(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NotebookResourceInfoInner> - beginPrepareNotebookAsync(String resourceGroupName, String workspaceName) { - Mono>> mono = prepareNotebookWithResponseAsync(resourceGroupName, workspaceName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NotebookResourceInfoInner.class, NotebookResourceInfoInner.class, - this.client.getContext()); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NotebookResourceInfoInner> - beginPrepareNotebookAsync(String resourceGroupName, String workspaceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = prepareNotebookWithResponseAsync(resourceGroupName, workspaceName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NotebookResourceInfoInner.class, NotebookResourceInfoInner.class, context); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NotebookResourceInfoInner> - beginPrepareNotebook(String resourceGroupName, String workspaceName) { - return this.beginPrepareNotebookAsync(resourceGroupName, workspaceName).getSyncPoller(); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NotebookResourceInfoInner> - beginPrepareNotebook(String resourceGroupName, String workspaceName, Context context) { - return this.beginPrepareNotebookAsync(resourceGroupName, workspaceName, context).getSyncPoller(); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono prepareNotebookAsync(String resourceGroupName, String workspaceName) { - return beginPrepareNotebookAsync(resourceGroupName, workspaceName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono prepareNotebookAsync(String resourceGroupName, String workspaceName, - Context context) { - return beginPrepareNotebookAsync(resourceGroupName, workspaceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName) { - return prepareNotebookAsync(resourceGroupName, workspaceName).block(); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName, Context context) { - return prepareNotebookAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listStorageAccountKeysWithResponseAsync(String resourceGroupName, String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listStorageAccountKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listStorageAccountKeysWithResponseAsync(String resourceGroupName, String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listStorageAccountKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); - } - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listStorageAccountKeysAsync(String resourceGroupName, - String workspaceName) { - return listStorageAccountKeysWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listStorageAccountKeysWithResponse(String resourceGroupName, - String workspaceName, Context context) { - return listStorageAccountKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceGroupName, String workspaceName) { - return listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNotebookKeysWithResponseAsync(String resourceGroupName, - String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNotebookKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNotebookKeysWithResponseAsync(String resourceGroupName, - String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNotebookKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); - } - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listNotebookKeysAsync(String resourceGroupName, String workspaceName) { - return listNotebookKeysWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listNotebookKeysWithResponse(String resourceGroupName, - String workspaceName, Context context) { - return listNotebookKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, String workspaceName) { - return listNotebookKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOutboundNetworkDependenciesEndpointsWithResponseAsync(String resourceGroupName, String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, this.client.getApiVersion(), accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listOutboundNetworkDependenciesEndpointsWithResponseAsync( - String resourceGroupName, String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, this.client.getApiVersion(), accept, - context); - } - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, - String workspaceName) { - return listOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listOutboundNetworkDependenciesEndpointsWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, workspaceName, context) - .block(); - } - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints(String resourceGroupName, - String workspaceName) { - return listOutboundNetworkDependenciesEndpointsWithResponse(resourceGroupName, workspaceName, Context.NONE) - .getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces 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. - * @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 result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces 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)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java deleted file mode 100644 index 380278379945..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java +++ /dev/null @@ -1,319 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.WorkspacesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DiagnoseResponseResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListNotebookKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListStorageAccountKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListWorkspaceKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.machinelearning.models.DiagnoseResponseResult; -import com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters; -import com.azure.resourcemanager.machinelearning.models.ExternalFqdnResponse; -import com.azure.resourcemanager.machinelearning.models.ListNotebookKeysResult; -import com.azure.resourcemanager.machinelearning.models.ListStorageAccountKeysResult; -import com.azure.resourcemanager.machinelearning.models.ListWorkspaceKeysResult; -import com.azure.resourcemanager.machinelearning.models.NotebookAccessTokenResult; -import com.azure.resourcemanager.machinelearning.models.NotebookResourceInfo; -import com.azure.resourcemanager.machinelearning.models.Workspace; -import com.azure.resourcemanager.machinelearning.models.Workspaces; - -public final class WorkspacesImpl implements Workspaces { - private static final ClientLogger LOGGER = new ClientLogger(WorkspacesImpl.class); - - private final WorkspacesClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public WorkspacesImpl(WorkspacesClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkspaceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Workspace getByResourceGroup(String resourceGroupName, String workspaceName) { - WorkspaceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, workspaceName); - if (inner != null) { - return new WorkspaceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName) { - this.serviceClient().delete(resourceGroupName, workspaceName); - } - - public void delete(String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, forceToPurge, context); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public DiagnoseResponseResult diagnose(String resourceGroupName, String workspaceName) { - DiagnoseResponseResultInner inner = this.serviceClient().diagnose(resourceGroupName, workspaceName); - if (inner != null) { - return new DiagnoseResponseResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public DiagnoseResponseResult diagnose(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters, Context context) { - DiagnoseResponseResultInner inner - = this.serviceClient().diagnose(resourceGroupName, workspaceName, parameters, context); - if (inner != null) { - return new DiagnoseResponseResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, - Context context) { - Response inner - = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ListWorkspaceKeysResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ListWorkspaceKeysResult listKeys(String resourceGroupName, String workspaceName) { - ListWorkspaceKeysResultInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName); - if (inner != null) { - return new ListWorkspaceKeysResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public void resyncKeys(String resourceGroupName, String workspaceName) { - this.serviceClient().resyncKeys(resourceGroupName, workspaceName); - } - - public void resyncKeys(String resourceGroupName, String workspaceName, Context context) { - this.serviceClient().resyncKeys(resourceGroupName, workspaceName, context); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public PagedIterable list(String skip, Context context) { - PagedIterable inner = this.serviceClient().list(skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public Response listNotebookAccessTokenWithResponse(String resourceGroupName, - String workspaceName, Context context) { - Response inner - = this.serviceClient().listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NotebookAccessTokenResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupName, String workspaceName) { - NotebookAccessTokenResultInner inner - = this.serviceClient().listNotebookAccessToken(resourceGroupName, workspaceName); - if (inner != null) { - return new NotebookAccessTokenResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName) { - NotebookResourceInfoInner inner = this.serviceClient().prepareNotebook(resourceGroupName, workspaceName); - if (inner != null) { - return new NotebookResourceInfoImpl(inner, this.manager()); - } else { - return null; - } - } - - public NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName, Context context) { - NotebookResourceInfoInner inner - = this.serviceClient().prepareNotebook(resourceGroupName, workspaceName, context); - if (inner != null) { - return new NotebookResourceInfoImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listStorageAccountKeysWithResponse(String resourceGroupName, - String workspaceName, Context context) { - Response inner - = this.serviceClient().listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ListStorageAccountKeysResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ListStorageAccountKeysResult listStorageAccountKeys(String resourceGroupName, String workspaceName) { - ListStorageAccountKeysResultInner inner - = this.serviceClient().listStorageAccountKeys(resourceGroupName, workspaceName); - if (inner != null) { - return new ListStorageAccountKeysResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listNotebookKeysWithResponse(String resourceGroupName, String workspaceName, - Context context) { - Response inner - = this.serviceClient().listNotebookKeysWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ListNotebookKeysResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ListNotebookKeysResult listNotebookKeys(String resourceGroupName, String workspaceName) { - ListNotebookKeysResultInner inner = this.serviceClient().listNotebookKeys(resourceGroupName, workspaceName); - if (inner != null) { - return new ListNotebookKeysResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listOutboundNetworkDependenciesEndpointsWithResponse(String resourceGroupName, - String workspaceName, Context context) { - Response inner = this.serviceClient() - .listOutboundNetworkDependenciesEndpointsWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ExternalFqdnResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ExternalFqdnResponse listOutboundNetworkDependenciesEndpoints(String resourceGroupName, - String workspaceName) { - ExternalFqdnResponseInner inner - = this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, workspaceName); - if (inner != null) { - return new ExternalFqdnResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Workspace getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - Boolean localForceToPurge = null; - this.delete(resourceGroupName, workspaceName, localForceToPurge, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Boolean forceToPurge, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - this.delete(resourceGroupName, workspaceName, forceToPurge, context); - } - - private WorkspacesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public WorkspaceImpl define(String name) { - return new WorkspaceImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java deleted file mode 100644 index 8e9ef253090c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the implementations for AzureMachineLearningWorkspaces. - * These APIs allow end users to operate on Azure Machine Learning Workspace resources. - */ -package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AadAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AadAuthTypeWorkspaceConnectionProperties.java deleted file mode 100644 index b9a569dc66e5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AadAuthTypeWorkspaceConnectionProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; - -/** - * This connection type covers the AAD auth for any applicable Azure service. - */ -@Fluent -public final class AadAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /* - * Authentication type of the connection target - */ - private ConnectionAuthType authType = ConnectionAuthType.AAD; - - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - - /** - * Creates an instance of AadAuthTypeWorkspaceConnectionProperties class. - */ - public AadAuthTypeWorkspaceConnectionProperties() { - } - - /** - * Get the authType property: Authentication type of the connection target. - * - * @return the authType value. - */ - @Override - public ConnectionAuthType authType() { - return this.authType; - } - - /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. - */ - @Override - public ConnectionGroup group() { - return this.group; - } - - /** - * {@inheritDoc} - */ - @Override - public AadAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AadAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AadAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AadAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AadAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AadAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { - super.withSharedUserList(sharedUserList); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AadAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AadAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", category() == null ? null : category().toString()); - jsonWriter.writeStringField("expiryTime", - expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); - jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); - jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("sharedUserList", sharedUserList(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AadAuthTypeWorkspaceConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AadAuthTypeWorkspaceConnectionProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AadAuthTypeWorkspaceConnectionProperties. - */ - public static AadAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AadAuthTypeWorkspaceConnectionProperties deserializedAadAuthTypeWorkspaceConnectionProperties - = new AadAuthTypeWorkspaceConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedAadAuthTypeWorkspaceConnectionProperties - .withCategory(ConnectionCategory.fromString(reader.getString())); - } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedAadAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); - } else if ("expiryTime".equals(fieldName)) { - deserializedAadAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("group".equals(fieldName)) { - deserializedAadAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); - } else if ("isSharedToAll".equals(fieldName)) { - deserializedAadAuthTypeWorkspaceConnectionProperties - .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedAadAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); - } else if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedAadAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); - } else if ("sharedUserList".equals(fieldName)) { - List sharedUserList = reader.readArray(reader1 -> reader1.getString()); - deserializedAadAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedAadAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { - deserializedAadAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { - deserializedAadAuthTypeWorkspaceConnectionProperties.authType - = ConnectionAuthType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAadAuthTypeWorkspaceConnectionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccessKeyAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccessKeyAuthTypeWorkspaceConnectionProperties.java deleted file mode 100644 index 7e2fcbcf6ffb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccessKeyAuthTypeWorkspaceConnectionProperties.java +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; - -/** - * The AccessKeyAuthTypeWorkspaceConnectionProperties model. - */ -@Fluent -public final class AccessKeyAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /* - * Authentication type of the connection target - */ - private ConnectionAuthType authType = ConnectionAuthType.ACCESS_KEY; - - /* - * The credentials property. - */ - private WorkspaceConnectionAccessKey credentials; - - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - - /** - * Creates an instance of AccessKeyAuthTypeWorkspaceConnectionProperties class. - */ - public AccessKeyAuthTypeWorkspaceConnectionProperties() { - } - - /** - * Get the authType property: Authentication type of the connection target. - * - * @return the authType value. - */ - @Override - public ConnectionAuthType authType() { - return this.authType; - } - - /** - * Get the credentials property: The credentials property. - * - * @return the credentials value. - */ - public WorkspaceConnectionAccessKey credentials() { - return this.credentials; - } - - /** - * Set the credentials property: The credentials property. - * - * @param credentials the credentials value to set. - * @return the AccessKeyAuthTypeWorkspaceConnectionProperties object itself. - */ - public AccessKeyAuthTypeWorkspaceConnectionProperties withCredentials(WorkspaceConnectionAccessKey credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. - */ - @Override - public ConnectionGroup group() { - return this.group; - } - - /** - * {@inheritDoc} - */ - @Override - public AccessKeyAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccessKeyAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccessKeyAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccessKeyAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccessKeyAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccessKeyAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { - super.withSharedUserList(sharedUserList); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccessKeyAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccessKeyAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", category() == null ? null : category().toString()); - jsonWriter.writeStringField("expiryTime", - expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); - jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); - jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("sharedUserList", sharedUserList(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeJsonField("credentials", this.credentials); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AccessKeyAuthTypeWorkspaceConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AccessKeyAuthTypeWorkspaceConnectionProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AccessKeyAuthTypeWorkspaceConnectionProperties. - */ - public static AccessKeyAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AccessKeyAuthTypeWorkspaceConnectionProperties deserializedAccessKeyAuthTypeWorkspaceConnectionProperties - = new AccessKeyAuthTypeWorkspaceConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties - .withCategory(ConnectionCategory.fromString(reader.getString())); - } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); - } else if ("expiryTime".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("group".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); - } else if ("isSharedToAll".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties - .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); - } else if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); - } else if ("sharedUserList".equals(fieldName)) { - List sharedUserList = reader.readArray(reader1 -> reader1.getString()); - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.authType - = ConnectionAuthType.fromString(reader.getString()); - } else if ("credentials".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.credentials - = WorkspaceConnectionAccessKey.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAccessKeyAuthTypeWorkspaceConnectionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyAuthTypeWorkspaceConnectionProperties.java deleted file mode 100644 index 47bc7db396dd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyAuthTypeWorkspaceConnectionProperties.java +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; - -/** - * This connection type covers the account key connection for Azure storage. - */ -@Fluent -public final class AccountKeyAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /* - * Authentication type of the connection target - */ - private ConnectionAuthType authType = ConnectionAuthType.ACCOUNT_KEY; - - /* - * The credentials property. - */ - private WorkspaceConnectionAccountKey credentials; - - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - - /** - * Creates an instance of AccountKeyAuthTypeWorkspaceConnectionProperties class. - */ - public AccountKeyAuthTypeWorkspaceConnectionProperties() { - } - - /** - * Get the authType property: Authentication type of the connection target. - * - * @return the authType value. - */ - @Override - public ConnectionAuthType authType() { - return this.authType; - } - - /** - * Get the credentials property: The credentials property. - * - * @return the credentials value. - */ - public WorkspaceConnectionAccountKey credentials() { - return this.credentials; - } - - /** - * Set the credentials property: The credentials property. - * - * @param credentials the credentials value to set. - * @return the AccountKeyAuthTypeWorkspaceConnectionProperties object itself. - */ - public AccountKeyAuthTypeWorkspaceConnectionProperties withCredentials(WorkspaceConnectionAccountKey credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. - */ - @Override - public ConnectionGroup group() { - return this.group; - } - - /** - * {@inheritDoc} - */ - @Override - public AccountKeyAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccountKeyAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccountKeyAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccountKeyAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccountKeyAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccountKeyAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { - super.withSharedUserList(sharedUserList); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccountKeyAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccountKeyAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", category() == null ? null : category().toString()); - jsonWriter.writeStringField("expiryTime", - expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); - jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); - jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("sharedUserList", sharedUserList(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeJsonField("credentials", this.credentials); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AccountKeyAuthTypeWorkspaceConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AccountKeyAuthTypeWorkspaceConnectionProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AccountKeyAuthTypeWorkspaceConnectionProperties. - */ - public static AccountKeyAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AccountKeyAuthTypeWorkspaceConnectionProperties deserializedAccountKeyAuthTypeWorkspaceConnectionProperties - = new AccountKeyAuthTypeWorkspaceConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties - .withCategory(ConnectionCategory.fromString(reader.getString())); - } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); - } else if ("expiryTime".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("group".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); - } else if ("isSharedToAll".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties - .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); - } else if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); - } else if ("sharedUserList".equals(fieldName)) { - List sharedUserList = reader.readArray(reader1 -> reader1.getString()); - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.authType - = ConnectionAuthType.fromString(reader.getString()); - } else if ("credentials".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.credentials - = WorkspaceConnectionAccountKey.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAccountKeyAuthTypeWorkspaceConnectionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java deleted file mode 100644 index 765b496c3b61..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Account key datastore credentials configuration. - */ -@Fluent -public final class AccountKeyDatastoreCredentials extends DatastoreCredentials { - /* - * [Required] Credential type used to authentication with storage. - */ - private CredentialsType credentialsType = CredentialsType.ACCOUNT_KEY; - - /* - * [Required] Storage account secrets. - */ - private AccountKeyDatastoreSecrets secrets; - - /** - * Creates an instance of AccountKeyDatastoreCredentials class. - */ - public AccountKeyDatastoreCredentials() { - } - - /** - * Get the credentialsType property: [Required] Credential type used to authentication with storage. - * - * @return the credentialsType value. - */ - @Override - public CredentialsType credentialsType() { - return this.credentialsType; - } - - /** - * Get the secrets property: [Required] Storage account secrets. - * - * @return the secrets value. - */ - public AccountKeyDatastoreSecrets secrets() { - return this.secrets; - } - - /** - * Set the secrets property: [Required] Storage account secrets. - * - * @param secrets the secrets value to set. - * @return the AccountKeyDatastoreCredentials object itself. - */ - public AccountKeyDatastoreCredentials withSecrets(AccountKeyDatastoreSecrets secrets) { - this.secrets = secrets; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (secrets() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property secrets in model AccountKeyDatastoreCredentials")); - } else { - secrets().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AccountKeyDatastoreCredentials.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("secrets", this.secrets); - jsonWriter.writeStringField("credentialsType", - this.credentialsType == null ? null : this.credentialsType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AccountKeyDatastoreCredentials from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AccountKeyDatastoreCredentials if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AccountKeyDatastoreCredentials. - */ - public static AccountKeyDatastoreCredentials fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AccountKeyDatastoreCredentials deserializedAccountKeyDatastoreCredentials - = new AccountKeyDatastoreCredentials(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("secrets".equals(fieldName)) { - deserializedAccountKeyDatastoreCredentials.secrets = AccountKeyDatastoreSecrets.fromJson(reader); - } else if ("credentialsType".equals(fieldName)) { - deserializedAccountKeyDatastoreCredentials.credentialsType - = CredentialsType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAccountKeyDatastoreCredentials; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java deleted file mode 100644 index f1920d696664..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import java.io.IOException; - -/** - * Datastore account key secrets. - */ -@Fluent -public final class AccountKeyDatastoreSecrets extends DatastoreSecretsInner { - /* - * [Required] Credential type used to authentication with storage. - */ - private SecretsType secretsType = SecretsType.ACCOUNT_KEY; - - /* - * Storage account key. - */ - private String key; - - /** - * Creates an instance of AccountKeyDatastoreSecrets class. - */ - public AccountKeyDatastoreSecrets() { - } - - /** - * Get the secretsType property: [Required] Credential type used to authentication with storage. - * - * @return the secretsType value. - */ - @Override - public SecretsType secretsType() { - return this.secretsType; - } - - /** - * Get the key property: Storage account key. - * - * @return the key value. - */ - public String key() { - return this.key; - } - - /** - * Set the key property: Storage account key. - * - * @param key the key value to set. - * @return the AccountKeyDatastoreSecrets object itself. - */ - public AccountKeyDatastoreSecrets withKey(String key) { - this.key = key; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("secretsType", this.secretsType == null ? null : this.secretsType.toString()); - jsonWriter.writeStringField("key", this.key); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AccountKeyDatastoreSecrets from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AccountKeyDatastoreSecrets if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AccountKeyDatastoreSecrets. - */ - public static AccountKeyDatastoreSecrets fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AccountKeyDatastoreSecrets deserializedAccountKeyDatastoreSecrets = new AccountKeyDatastoreSecrets(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("secretsType".equals(fieldName)) { - deserializedAccountKeyDatastoreSecrets.secretsType = SecretsType.fromString(reader.getString()); - } else if ("key".equals(fieldName)) { - deserializedAccountKeyDatastoreSecrets.key = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAccountKeyDatastoreSecrets; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.java deleted file mode 100644 index 548ec82202f6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Details of ACR account to be used for the Registry. - */ -@Fluent -public final class AcrDetails implements JsonSerializable { - /* - * Details of system created ACR account to be used for the Registry - */ - private SystemCreatedAcrAccount systemCreatedAcrAccount; - - /* - * Details of user created ACR account to be used for the Registry - */ - private UserCreatedAcrAccount userCreatedAcrAccount; - - /** - * Creates an instance of AcrDetails class. - */ - public AcrDetails() { - } - - /** - * Get the systemCreatedAcrAccount property: Details of system created ACR account to be used for the Registry. - * - * @return the systemCreatedAcrAccount value. - */ - public SystemCreatedAcrAccount systemCreatedAcrAccount() { - return this.systemCreatedAcrAccount; - } - - /** - * Set the systemCreatedAcrAccount property: Details of system created ACR account to be used for the Registry. - * - * @param systemCreatedAcrAccount the systemCreatedAcrAccount value to set. - * @return the AcrDetails object itself. - */ - public AcrDetails withSystemCreatedAcrAccount(SystemCreatedAcrAccount systemCreatedAcrAccount) { - this.systemCreatedAcrAccount = systemCreatedAcrAccount; - return this; - } - - /** - * Get the userCreatedAcrAccount property: Details of user created ACR account to be used for the Registry. - * - * @return the userCreatedAcrAccount value. - */ - public UserCreatedAcrAccount userCreatedAcrAccount() { - return this.userCreatedAcrAccount; - } - - /** - * Set the userCreatedAcrAccount property: Details of user created ACR account to be used for the Registry. - * - * @param userCreatedAcrAccount the userCreatedAcrAccount value to set. - * @return the AcrDetails object itself. - */ - public AcrDetails withUserCreatedAcrAccount(UserCreatedAcrAccount userCreatedAcrAccount) { - this.userCreatedAcrAccount = userCreatedAcrAccount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (systemCreatedAcrAccount() != null) { - systemCreatedAcrAccount().validate(); - } - if (userCreatedAcrAccount() != null) { - userCreatedAcrAccount().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("systemCreatedAcrAccount", this.systemCreatedAcrAccount); - jsonWriter.writeJsonField("userCreatedAcrAccount", this.userCreatedAcrAccount); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AcrDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AcrDetails if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the AcrDetails. - */ - public static AcrDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AcrDetails deserializedAcrDetails = new AcrDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("systemCreatedAcrAccount".equals(fieldName)) { - deserializedAcrDetails.systemCreatedAcrAccount = SystemCreatedAcrAccount.fromJson(reader); - } else if ("userCreatedAcrAccount".equals(fieldName)) { - deserializedAcrDetails.userCreatedAcrAccount = UserCreatedAcrAccount.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAcrDetails; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActionType.java deleted file mode 100644 index 6b932b0f71ef..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActionType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ -public final class ActionType extends ExpandableStringEnum { - /** - * Static value Internal for ActionType. - */ - public static final ActionType INTERNAL = fromString("Internal"); - - /** - * Creates a new instance of ActionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActionType() { - } - - /** - * Creates or finds a ActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActionType. - */ - public static ActionType fromString(String name) { - return fromString(name, ActionType.class); - } - - /** - * Gets known ActionType values. - * - * @return known ActionType values. - */ - public static Collection values() { - return values(ActionType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java deleted file mode 100644 index 76d48c600bfe..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * A Machine Learning compute based on AKS. - */ -@Fluent -public final class Aks extends Compute { - /* - * The type of compute - */ - private ComputeType computeType = ComputeType.AKS; - - /* - * AKS properties - */ - private AksSchemaProperties properties; - - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - - /** - * Creates an instance of Aks class. - */ - public Aks() { - } - - /** - * Get the computeType property: The type of compute. - * - * @return the computeType value. - */ - @Override - public ComputeType computeType() { - return this.computeType; - } - - /** - * Get the properties property: AKS properties. - * - * @return the properties value. - */ - public AksSchemaProperties properties() { - return this.properties; - } - - /** - * Set the properties property: AKS properties. - * - * @param properties the properties value to set. - * @return the Aks object itself. - */ - public Aks withProperties(AksSchemaProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - - /** - * {@inheritDoc} - */ - @Override - public Aks withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Aks withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Aks withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Aks withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeLocation", computeLocation()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("resourceId", resourceId()); - jsonWriter.writeBooleanField("disableLocalAuth", disableLocalAuth()); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Aks from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Aks if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Aks. - */ - public static Aks fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Aks deserializedAks = new Aks(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeLocation".equals(fieldName)) { - deserializedAks.withComputeLocation(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedAks.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedAks.withDescription(reader.getString()); - } else if ("createdOn".equals(fieldName)) { - deserializedAks.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("modifiedOn".equals(fieldName)) { - deserializedAks.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("resourceId".equals(fieldName)) { - deserializedAks.withResourceId(reader.getString()); - } else if ("provisioningErrors".equals(fieldName)) { - List provisioningErrors - = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedAks.provisioningErrors = provisioningErrors; - } else if ("isAttachedCompute".equals(fieldName)) { - deserializedAks.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); - } else if ("disableLocalAuth".equals(fieldName)) { - deserializedAks.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); - } else if ("computeType".equals(fieldName)) { - deserializedAks.computeType = ComputeType.fromString(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedAks.properties = AksSchemaProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAks; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecrets.java deleted file mode 100644 index 8a4bda318ec9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecrets.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; -import java.io.IOException; - -/** - * Secrets related to a Machine Learning compute based on AKS. - */ -@Fluent -public final class AksComputeSecrets extends ComputeSecretsInner { - /* - * The type of compute - */ - private ComputeType computeType = ComputeType.AKS; - - /* - * Content of kubeconfig file that can be used to connect to the Kubernetes cluster. - */ - private String userKubeConfig; - - /* - * Content of kubeconfig file that can be used to connect to the Kubernetes cluster. - */ - private String adminKubeConfig; - - /* - * Image registry pull secret. - */ - private String imagePullSecretName; - - /** - * Creates an instance of AksComputeSecrets class. - */ - public AksComputeSecrets() { - } - - /** - * Get the computeType property: The type of compute. - * - * @return the computeType value. - */ - @Override - public ComputeType computeType() { - return this.computeType; - } - - /** - * Get the userKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @return the userKubeConfig value. - */ - public String userKubeConfig() { - return this.userKubeConfig; - } - - /** - * Set the userKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @param userKubeConfig the userKubeConfig value to set. - * @return the AksComputeSecrets object itself. - */ - public AksComputeSecrets withUserKubeConfig(String userKubeConfig) { - this.userKubeConfig = userKubeConfig; - return this; - } - - /** - * Get the adminKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @return the adminKubeConfig value. - */ - public String adminKubeConfig() { - return this.adminKubeConfig; - } - - /** - * Set the adminKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @param adminKubeConfig the adminKubeConfig value to set. - * @return the AksComputeSecrets object itself. - */ - public AksComputeSecrets withAdminKubeConfig(String adminKubeConfig) { - this.adminKubeConfig = adminKubeConfig; - return this; - } - - /** - * Get the imagePullSecretName property: Image registry pull secret. - * - * @return the imagePullSecretName value. - */ - public String imagePullSecretName() { - return this.imagePullSecretName; - } - - /** - * Set the imagePullSecretName property: Image registry pull secret. - * - * @param imagePullSecretName the imagePullSecretName value to set. - * @return the AksComputeSecrets object itself. - */ - public AksComputeSecrets withImagePullSecretName(String imagePullSecretName) { - this.imagePullSecretName = imagePullSecretName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - jsonWriter.writeStringField("userKubeConfig", this.userKubeConfig); - jsonWriter.writeStringField("adminKubeConfig", this.adminKubeConfig); - jsonWriter.writeStringField("imagePullSecretName", this.imagePullSecretName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AksComputeSecrets from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AksComputeSecrets if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AksComputeSecrets. - */ - public static AksComputeSecrets fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AksComputeSecrets deserializedAksComputeSecrets = new AksComputeSecrets(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeType".equals(fieldName)) { - deserializedAksComputeSecrets.computeType = ComputeType.fromString(reader.getString()); - } else if ("userKubeConfig".equals(fieldName)) { - deserializedAksComputeSecrets.userKubeConfig = reader.getString(); - } else if ("adminKubeConfig".equals(fieldName)) { - deserializedAksComputeSecrets.adminKubeConfig = reader.getString(); - } else if ("imagePullSecretName".equals(fieldName)) { - deserializedAksComputeSecrets.imagePullSecretName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAksComputeSecrets; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecretsProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecretsProperties.java deleted file mode 100644 index 457bf72bcf36..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecretsProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties of AksComputeSecrets. - */ -@Fluent -public class AksComputeSecretsProperties implements JsonSerializable { - /* - * Content of kubeconfig file that can be used to connect to the Kubernetes cluster. - */ - private String userKubeConfig; - - /* - * Content of kubeconfig file that can be used to connect to the Kubernetes cluster. - */ - private String adminKubeConfig; - - /* - * Image registry pull secret. - */ - private String imagePullSecretName; - - /** - * Creates an instance of AksComputeSecretsProperties class. - */ - public AksComputeSecretsProperties() { - } - - /** - * Get the userKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @return the userKubeConfig value. - */ - public String userKubeConfig() { - return this.userKubeConfig; - } - - /** - * Set the userKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @param userKubeConfig the userKubeConfig value to set. - * @return the AksComputeSecretsProperties object itself. - */ - public AksComputeSecretsProperties withUserKubeConfig(String userKubeConfig) { - this.userKubeConfig = userKubeConfig; - return this; - } - - /** - * Get the adminKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @return the adminKubeConfig value. - */ - public String adminKubeConfig() { - return this.adminKubeConfig; - } - - /** - * Set the adminKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @param adminKubeConfig the adminKubeConfig value to set. - * @return the AksComputeSecretsProperties object itself. - */ - public AksComputeSecretsProperties withAdminKubeConfig(String adminKubeConfig) { - this.adminKubeConfig = adminKubeConfig; - return this; - } - - /** - * Get the imagePullSecretName property: Image registry pull secret. - * - * @return the imagePullSecretName value. - */ - public String imagePullSecretName() { - return this.imagePullSecretName; - } - - /** - * Set the imagePullSecretName property: Image registry pull secret. - * - * @param imagePullSecretName the imagePullSecretName value to set. - * @return the AksComputeSecretsProperties object itself. - */ - public AksComputeSecretsProperties withImagePullSecretName(String imagePullSecretName) { - this.imagePullSecretName = imagePullSecretName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("userKubeConfig", this.userKubeConfig); - jsonWriter.writeStringField("adminKubeConfig", this.adminKubeConfig); - jsonWriter.writeStringField("imagePullSecretName", this.imagePullSecretName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AksComputeSecretsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AksComputeSecretsProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AksComputeSecretsProperties. - */ - public static AksComputeSecretsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AksComputeSecretsProperties deserializedAksComputeSecretsProperties = new AksComputeSecretsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("userKubeConfig".equals(fieldName)) { - deserializedAksComputeSecretsProperties.userKubeConfig = reader.getString(); - } else if ("adminKubeConfig".equals(fieldName)) { - deserializedAksComputeSecretsProperties.adminKubeConfig = reader.getString(); - } else if ("imagePullSecretName".equals(fieldName)) { - deserializedAksComputeSecretsProperties.imagePullSecretName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAksComputeSecretsProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksNetworkingConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksNetworkingConfiguration.java deleted file mode 100644 index 77a0e89f149f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksNetworkingConfiguration.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Advance configuration for AKS networking. - */ -@Fluent -public final class AksNetworkingConfiguration implements JsonSerializable { - /* - * Virtual network subnet resource ID the compute nodes belong to - */ - private String subnetId; - - /* - * A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. - */ - private String serviceCidr; - - /* - * An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range - * specified in serviceCidr. - */ - private String dnsServiceIp; - - /* - * A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or - * the Kubernetes service address range. - */ - private String dockerBridgeCidr; - - /** - * Creates an instance of AksNetworkingConfiguration class. - */ - public AksNetworkingConfiguration() { - } - - /** - * Get the subnetId property: Virtual network subnet resource ID the compute nodes belong to. - * - * @return the subnetId value. - */ - public String subnetId() { - return this.subnetId; - } - - /** - * Set the subnetId property: Virtual network subnet resource ID the compute nodes belong to. - * - * @param subnetId the subnetId value to set. - * @return the AksNetworkingConfiguration object itself. - */ - public AksNetworkingConfiguration withSubnetId(String subnetId) { - this.subnetId = subnetId; - return this; - } - - /** - * Get the serviceCidr property: A CIDR notation IP range from which to assign service cluster IPs. It must not - * overlap with any Subnet IP ranges. - * - * @return the serviceCidr value. - */ - public String serviceCidr() { - return this.serviceCidr; - } - - /** - * Set the serviceCidr property: A CIDR notation IP range from which to assign service cluster IPs. It must not - * overlap with any Subnet IP ranges. - * - * @param serviceCidr the serviceCidr value to set. - * @return the AksNetworkingConfiguration object itself. - */ - public AksNetworkingConfiguration withServiceCidr(String serviceCidr) { - this.serviceCidr = serviceCidr; - return this; - } - - /** - * Get the dnsServiceIp property: An IP address assigned to the Kubernetes DNS service. It must be within the - * Kubernetes service address range specified in serviceCidr. - * - * @return the dnsServiceIp value. - */ - public String dnsServiceIp() { - return this.dnsServiceIp; - } - - /** - * Set the dnsServiceIp property: An IP address assigned to the Kubernetes DNS service. It must be within the - * Kubernetes service address range specified in serviceCidr. - * - * @param dnsServiceIp the dnsServiceIp value to set. - * @return the AksNetworkingConfiguration object itself. - */ - public AksNetworkingConfiguration withDnsServiceIp(String dnsServiceIp) { - this.dnsServiceIp = dnsServiceIp; - return this; - } - - /** - * Get the dockerBridgeCidr property: A CIDR notation IP range assigned to the Docker bridge network. It must not - * overlap with any Subnet IP ranges or the Kubernetes service address range. - * - * @return the dockerBridgeCidr value. - */ - public String dockerBridgeCidr() { - return this.dockerBridgeCidr; - } - - /** - * Set the dockerBridgeCidr property: A CIDR notation IP range assigned to the Docker bridge network. It must not - * overlap with any Subnet IP ranges or the Kubernetes service address range. - * - * @param dockerBridgeCidr the dockerBridgeCidr value to set. - * @return the AksNetworkingConfiguration object itself. - */ - public AksNetworkingConfiguration withDockerBridgeCidr(String dockerBridgeCidr) { - this.dockerBridgeCidr = dockerBridgeCidr; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("subnetId", this.subnetId); - jsonWriter.writeStringField("serviceCidr", this.serviceCidr); - jsonWriter.writeStringField("dnsServiceIP", this.dnsServiceIp); - jsonWriter.writeStringField("dockerBridgeCidr", this.dockerBridgeCidr); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AksNetworkingConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AksNetworkingConfiguration if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AksNetworkingConfiguration. - */ - public static AksNetworkingConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AksNetworkingConfiguration deserializedAksNetworkingConfiguration = new AksNetworkingConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("subnetId".equals(fieldName)) { - deserializedAksNetworkingConfiguration.subnetId = reader.getString(); - } else if ("serviceCidr".equals(fieldName)) { - deserializedAksNetworkingConfiguration.serviceCidr = reader.getString(); - } else if ("dnsServiceIP".equals(fieldName)) { - deserializedAksNetworkingConfiguration.dnsServiceIp = reader.getString(); - } else if ("dockerBridgeCidr".equals(fieldName)) { - deserializedAksNetworkingConfiguration.dockerBridgeCidr = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAksNetworkingConfiguration; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchema.java deleted file mode 100644 index 35ccb3e32574..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchema.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The AksSchema model. - */ -@Fluent -public class AksSchema implements JsonSerializable { - /* - * AKS properties - */ - private AksSchemaProperties properties; - - /** - * Creates an instance of AksSchema class. - */ - public AksSchema() { - } - - /** - * Get the properties property: AKS properties. - * - * @return the properties value. - */ - public AksSchemaProperties properties() { - return this.properties; - } - - /** - * Set the properties property: AKS properties. - * - * @param properties the properties value to set. - * @return the AksSchema object itself. - */ - public AksSchema withProperties(AksSchemaProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AksSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AksSchema if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the AksSchema. - */ - public static AksSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AksSchema deserializedAksSchema = new AksSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedAksSchema.properties = AksSchemaProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAksSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.java deleted file mode 100644 index 27256d2d9fc8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.java +++ /dev/null @@ -1,319 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * AKS properties. - */ -@Fluent -public final class AksSchemaProperties implements JsonSerializable { - /* - * Cluster full qualified domain name - */ - private String clusterFqdn; - - /* - * System services - */ - private List systemServices; - - /* - * Number of agents - */ - private Integer agentCount; - - /* - * Agent virtual machine size - */ - private String agentVmSize; - - /* - * Intended usage of the cluster - */ - private ClusterPurpose clusterPurpose; - - /* - * SSL configuration - */ - private SslConfiguration sslConfiguration; - - /* - * AKS networking configuration for vnet - */ - private AksNetworkingConfiguration aksNetworkingConfiguration; - - /* - * Load Balancer Type - */ - private LoadBalancerType loadBalancerType; - - /* - * Load Balancer Subnet - */ - private String loadBalancerSubnet; - - /** - * Creates an instance of AksSchemaProperties class. - */ - public AksSchemaProperties() { - } - - /** - * Get the clusterFqdn property: Cluster full qualified domain name. - * - * @return the clusterFqdn value. - */ - public String clusterFqdn() { - return this.clusterFqdn; - } - - /** - * Set the clusterFqdn property: Cluster full qualified domain name. - * - * @param clusterFqdn the clusterFqdn value to set. - * @return the AksSchemaProperties object itself. - */ - public AksSchemaProperties withClusterFqdn(String clusterFqdn) { - this.clusterFqdn = clusterFqdn; - return this; - } - - /** - * Get the systemServices property: System services. - * - * @return the systemServices value. - */ - public List systemServices() { - return this.systemServices; - } - - /** - * Get the agentCount property: Number of agents. - * - * @return the agentCount value. - */ - public Integer agentCount() { - return this.agentCount; - } - - /** - * Set the agentCount property: Number of agents. - * - * @param agentCount the agentCount value to set. - * @return the AksSchemaProperties object itself. - */ - public AksSchemaProperties withAgentCount(Integer agentCount) { - this.agentCount = agentCount; - return this; - } - - /** - * Get the agentVmSize property: Agent virtual machine size. - * - * @return the agentVmSize value. - */ - public String agentVmSize() { - return this.agentVmSize; - } - - /** - * Set the agentVmSize property: Agent virtual machine size. - * - * @param agentVmSize the agentVmSize value to set. - * @return the AksSchemaProperties object itself. - */ - public AksSchemaProperties withAgentVmSize(String agentVmSize) { - this.agentVmSize = agentVmSize; - return this; - } - - /** - * Get the clusterPurpose property: Intended usage of the cluster. - * - * @return the clusterPurpose value. - */ - public ClusterPurpose clusterPurpose() { - return this.clusterPurpose; - } - - /** - * Set the clusterPurpose property: Intended usage of the cluster. - * - * @param clusterPurpose the clusterPurpose value to set. - * @return the AksSchemaProperties object itself. - */ - public AksSchemaProperties withClusterPurpose(ClusterPurpose clusterPurpose) { - this.clusterPurpose = clusterPurpose; - return this; - } - - /** - * Get the sslConfiguration property: SSL configuration. - * - * @return the sslConfiguration value. - */ - public SslConfiguration sslConfiguration() { - return this.sslConfiguration; - } - - /** - * Set the sslConfiguration property: SSL configuration. - * - * @param sslConfiguration the sslConfiguration value to set. - * @return the AksSchemaProperties object itself. - */ - public AksSchemaProperties withSslConfiguration(SslConfiguration sslConfiguration) { - this.sslConfiguration = sslConfiguration; - return this; - } - - /** - * Get the aksNetworkingConfiguration property: AKS networking configuration for vnet. - * - * @return the aksNetworkingConfiguration value. - */ - public AksNetworkingConfiguration aksNetworkingConfiguration() { - return this.aksNetworkingConfiguration; - } - - /** - * Set the aksNetworkingConfiguration property: AKS networking configuration for vnet. - * - * @param aksNetworkingConfiguration the aksNetworkingConfiguration value to set. - * @return the AksSchemaProperties object itself. - */ - public AksSchemaProperties withAksNetworkingConfiguration(AksNetworkingConfiguration aksNetworkingConfiguration) { - this.aksNetworkingConfiguration = aksNetworkingConfiguration; - return this; - } - - /** - * Get the loadBalancerType property: Load Balancer Type. - * - * @return the loadBalancerType value. - */ - public LoadBalancerType loadBalancerType() { - return this.loadBalancerType; - } - - /** - * Set the loadBalancerType property: Load Balancer Type. - * - * @param loadBalancerType the loadBalancerType value to set. - * @return the AksSchemaProperties object itself. - */ - public AksSchemaProperties withLoadBalancerType(LoadBalancerType loadBalancerType) { - this.loadBalancerType = loadBalancerType; - return this; - } - - /** - * Get the loadBalancerSubnet property: Load Balancer Subnet. - * - * @return the loadBalancerSubnet value. - */ - public String loadBalancerSubnet() { - return this.loadBalancerSubnet; - } - - /** - * Set the loadBalancerSubnet property: Load Balancer Subnet. - * - * @param loadBalancerSubnet the loadBalancerSubnet value to set. - * @return the AksSchemaProperties object itself. - */ - public AksSchemaProperties withLoadBalancerSubnet(String loadBalancerSubnet) { - this.loadBalancerSubnet = loadBalancerSubnet; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (systemServices() != null) { - systemServices().forEach(e -> e.validate()); - } - if (sslConfiguration() != null) { - sslConfiguration().validate(); - } - if (aksNetworkingConfiguration() != null) { - aksNetworkingConfiguration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("clusterFqdn", this.clusterFqdn); - jsonWriter.writeNumberField("agentCount", this.agentCount); - jsonWriter.writeStringField("agentVmSize", this.agentVmSize); - jsonWriter.writeStringField("clusterPurpose", - this.clusterPurpose == null ? null : this.clusterPurpose.toString()); - jsonWriter.writeJsonField("sslConfiguration", this.sslConfiguration); - jsonWriter.writeJsonField("aksNetworkingConfiguration", this.aksNetworkingConfiguration); - jsonWriter.writeStringField("loadBalancerType", - this.loadBalancerType == null ? null : this.loadBalancerType.toString()); - jsonWriter.writeStringField("loadBalancerSubnet", this.loadBalancerSubnet); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AksSchemaProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AksSchemaProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AksSchemaProperties. - */ - public static AksSchemaProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AksSchemaProperties deserializedAksSchemaProperties = new AksSchemaProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("clusterFqdn".equals(fieldName)) { - deserializedAksSchemaProperties.clusterFqdn = reader.getString(); - } else if ("systemServices".equals(fieldName)) { - List systemServices = reader.readArray(reader1 -> SystemService.fromJson(reader1)); - deserializedAksSchemaProperties.systemServices = systemServices; - } else if ("agentCount".equals(fieldName)) { - deserializedAksSchemaProperties.agentCount = reader.getNullable(JsonReader::getInt); - } else if ("agentVmSize".equals(fieldName)) { - deserializedAksSchemaProperties.agentVmSize = reader.getString(); - } else if ("clusterPurpose".equals(fieldName)) { - deserializedAksSchemaProperties.clusterPurpose = ClusterPurpose.fromString(reader.getString()); - } else if ("sslConfiguration".equals(fieldName)) { - deserializedAksSchemaProperties.sslConfiguration = SslConfiguration.fromJson(reader); - } else if ("aksNetworkingConfiguration".equals(fieldName)) { - deserializedAksSchemaProperties.aksNetworkingConfiguration - = AksNetworkingConfiguration.fromJson(reader); - } else if ("loadBalancerType".equals(fieldName)) { - deserializedAksSchemaProperties.loadBalancerType = LoadBalancerType.fromString(reader.getString()); - } else if ("loadBalancerSubnet".equals(fieldName)) { - deserializedAksSchemaProperties.loadBalancerSubnet = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAksSchemaProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllFeatures.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllFeatures.java deleted file mode 100644 index 89e05a4ea432..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllFeatures.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The AllFeatures model. - */ -@Immutable -public final class AllFeatures extends MonitoringFeatureFilterBase { - /* - * [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. - */ - private MonitoringFeatureFilterType filterType = MonitoringFeatureFilterType.ALL_FEATURES; - - /** - * Creates an instance of AllFeatures class. - */ - public AllFeatures() { - } - - /** - * Get the filterType property: [Required] Specifies the feature filter to leverage when selecting features to - * calculate metrics over. - * - * @return the filterType value. - */ - @Override - public MonitoringFeatureFilterType filterType() { - return this.filterType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("filterType", this.filterType == null ? null : this.filterType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AllFeatures from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AllFeatures if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AllFeatures. - */ - public static AllFeatures fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AllFeatures deserializedAllFeatures = new AllFeatures(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("filterType".equals(fieldName)) { - deserializedAllFeatures.filterType = MonitoringFeatureFilterType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAllFeatures; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllNodes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllNodes.java deleted file mode 100644 index 2b729b4a09b0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllNodes.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * All nodes means the service will be running on all of the nodes of the job. - */ -@Immutable -public final class AllNodes extends Nodes { - /* - * [Required] Type of the Nodes value - */ - private NodesValueType nodesValueType = NodesValueType.ALL; - - /** - * Creates an instance of AllNodes class. - */ - public AllNodes() { - } - - /** - * Get the nodesValueType property: [Required] Type of the Nodes value. - * - * @return the nodesValueType value. - */ - @Override - public NodesValueType nodesValueType() { - return this.nodesValueType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nodesValueType", - this.nodesValueType == null ? null : this.nodesValueType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AllNodes from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AllNodes if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the AllNodes. - */ - public static AllNodes fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AllNodes deserializedAllNodes = new AllNodes(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nodesValueType".equals(fieldName)) { - deserializedAllNodes.nodesValueType = NodesValueType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAllNodes; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.java deleted file mode 100644 index 0639b5203e75..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Allocation state. - * - * Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are - * no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created - * and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates - * that the compute is resizing; that is, compute nodes are being added to or removed from the compute. - */ -public final class AllocationState extends ExpandableStringEnum { - /** - * Static value Steady for AllocationState. - */ - public static final AllocationState STEADY = fromString("Steady"); - - /** - * Static value Resizing for AllocationState. - */ - public static final AllocationState RESIZING = fromString("Resizing"); - - /** - * Creates a new instance of AllocationState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AllocationState() { - } - - /** - * Creates or finds a AllocationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding AllocationState. - */ - public static AllocationState fromString(String name) { - return fromString(name, AllocationState.class); - } - - /** - * Gets known AllocationState values. - * - * @return known AllocationState values. - */ - public static Collection values() { - return values(AllocationState.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java deleted file mode 100644 index 25b3ad2c53f7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * An Azure Machine Learning compute. - */ -@Fluent -public final class AmlCompute extends Compute { - /* - * The type of compute - */ - private ComputeType computeType = ComputeType.AML_COMPUTE; - - /* - * Properties of AmlCompute - */ - private AmlComputeProperties properties; - - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - - /** - * Creates an instance of AmlCompute class. - */ - public AmlCompute() { - } - - /** - * Get the computeType property: The type of compute. - * - * @return the computeType value. - */ - @Override - public ComputeType computeType() { - return this.computeType; - } - - /** - * Get the properties property: Properties of AmlCompute. - * - * @return the properties value. - */ - public AmlComputeProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of AmlCompute. - * - * @param properties the properties value to set. - * @return the AmlCompute object itself. - */ - public AmlCompute withProperties(AmlComputeProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - - /** - * {@inheritDoc} - */ - @Override - public AmlCompute withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AmlCompute withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AmlCompute withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AmlCompute withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeLocation", computeLocation()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("resourceId", resourceId()); - jsonWriter.writeBooleanField("disableLocalAuth", disableLocalAuth()); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AmlCompute from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AmlCompute if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the AmlCompute. - */ - public static AmlCompute fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AmlCompute deserializedAmlCompute = new AmlCompute(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeLocation".equals(fieldName)) { - deserializedAmlCompute.withComputeLocation(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedAmlCompute.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedAmlCompute.withDescription(reader.getString()); - } else if ("createdOn".equals(fieldName)) { - deserializedAmlCompute.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("modifiedOn".equals(fieldName)) { - deserializedAmlCompute.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("resourceId".equals(fieldName)) { - deserializedAmlCompute.withResourceId(reader.getString()); - } else if ("provisioningErrors".equals(fieldName)) { - List provisioningErrors - = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedAmlCompute.provisioningErrors = provisioningErrors; - } else if ("isAttachedCompute".equals(fieldName)) { - deserializedAmlCompute.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); - } else if ("disableLocalAuth".equals(fieldName)) { - deserializedAmlCompute.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); - } else if ("computeType".equals(fieldName)) { - deserializedAmlCompute.computeType = ComputeType.fromString(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedAmlCompute.properties = AmlComputeProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAmlCompute; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodeInformation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodeInformation.java deleted file mode 100644 index 6923604357b9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodeInformation.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Compute node information related to a AmlCompute. - */ -@Immutable -public final class AmlComputeNodeInformation implements JsonSerializable { - /* - * ID of the compute node. - */ - private String nodeId; - - /* - * Private IP address of the compute node. - */ - private String privateIpAddress; - - /* - * Public IP address of the compute node. - */ - private String publicIpAddress; - - /* - * SSH port number of the node. - */ - private Integer port; - - /* - * State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. - */ - private NodeState nodeState; - - /* - * ID of the Experiment running on the node, if any else null. - */ - private String runId; - - /** - * Creates an instance of AmlComputeNodeInformation class. - */ - public AmlComputeNodeInformation() { - } - - /** - * Get the nodeId property: ID of the compute node. - * - * @return the nodeId value. - */ - public String nodeId() { - return this.nodeId; - } - - /** - * Get the privateIpAddress property: Private IP address of the compute node. - * - * @return the privateIpAddress value. - */ - public String privateIpAddress() { - return this.privateIpAddress; - } - - /** - * Get the publicIpAddress property: Public IP address of the compute node. - * - * @return the publicIpAddress value. - */ - public String publicIpAddress() { - return this.publicIpAddress; - } - - /** - * Get the port property: SSH port number of the node. - * - * @return the port value. - */ - public Integer port() { - return this.port; - } - - /** - * Get the nodeState property: State of the compute node. Values are idle, running, preparing, unusable, leaving and - * preempted. - * - * @return the nodeState value. - */ - public NodeState nodeState() { - return this.nodeState; - } - - /** - * Get the runId property: ID of the Experiment running on the node, if any else null. - * - * @return the runId value. - */ - public String runId() { - return this.runId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AmlComputeNodeInformation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AmlComputeNodeInformation if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AmlComputeNodeInformation. - */ - public static AmlComputeNodeInformation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AmlComputeNodeInformation deserializedAmlComputeNodeInformation = new AmlComputeNodeInformation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nodeId".equals(fieldName)) { - deserializedAmlComputeNodeInformation.nodeId = reader.getString(); - } else if ("privateIpAddress".equals(fieldName)) { - deserializedAmlComputeNodeInformation.privateIpAddress = reader.getString(); - } else if ("publicIpAddress".equals(fieldName)) { - deserializedAmlComputeNodeInformation.publicIpAddress = reader.getString(); - } else if ("port".equals(fieldName)) { - deserializedAmlComputeNodeInformation.port = reader.getNullable(JsonReader::getInt); - } else if ("nodeState".equals(fieldName)) { - deserializedAmlComputeNodeInformation.nodeState = NodeState.fromString(reader.getString()); - } else if ("runId".equals(fieldName)) { - deserializedAmlComputeNodeInformation.runId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAmlComputeNodeInformation; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodesInformation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodesInformation.java deleted file mode 100644 index d3062e6f3b56..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodesInformation.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Result of AmlCompute Nodes. - */ -@Immutable -public final class AmlComputeNodesInformation implements JsonSerializable { - /* - * The collection of returned AmlCompute nodes details. - */ - private List nodes; - - /* - * The continuation token. - */ - private String nextLink; - - /** - * Creates an instance of AmlComputeNodesInformation class. - */ - public AmlComputeNodesInformation() { - } - - /** - * Get the nodes property: The collection of returned AmlCompute nodes details. - * - * @return the nodes value. - */ - public List nodes() { - return this.nodes; - } - - /** - * Get the nextLink property: The continuation token. - * - * @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 (nodes() != null) { - nodes().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AmlComputeNodesInformation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AmlComputeNodesInformation if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AmlComputeNodesInformation. - */ - public static AmlComputeNodesInformation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AmlComputeNodesInformation deserializedAmlComputeNodesInformation = new AmlComputeNodesInformation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nodes".equals(fieldName)) { - List nodes - = reader.readArray(reader1 -> AmlComputeNodeInformation.fromJson(reader1)); - deserializedAmlComputeNodesInformation.nodes = nodes; - } else if ("nextLink".equals(fieldName)) { - deserializedAmlComputeNodesInformation.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAmlComputeNodesInformation; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeProperties.java deleted file mode 100644 index a34d71abb56e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeProperties.java +++ /dev/null @@ -1,525 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * AML Compute properties. - */ -@Fluent -public final class AmlComputeProperties implements JsonSerializable { - /* - * Compute OS Type - */ - private OsType osType; - - /* - * Virtual Machine Size - */ - private String vmSize; - - /* - * Virtual Machine priority - */ - private VmPriority vmPriority; - - /* - * Virtual Machine image for AML Compute - windows only - */ - private VirtualMachineImage virtualMachineImage; - - /* - * Network is isolated or not - */ - private Boolean isolatedNetwork; - - /* - * Scale settings for AML Compute - */ - private ScaleSettings scaleSettings; - - /* - * Credentials for an administrator user account that will be created on each compute node. - */ - private UserAccountCredentials userAccountCredentials; - - /* - * Virtual network subnet resource ID the compute nodes belong to. - */ - private ResourceId subnet; - - /* - * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all - * nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. - * NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else - * is open all public nodes. It can be default only during cluster creation time, after creation it will be either - * enabled or disabled. - */ - private RemoteLoginPortPublicAccess remoteLoginPortPublicAccess; - - /* - * Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There - * are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is - * created and when no operations are being performed on the compute to change the number of compute nodes. resizing - * - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. - */ - private AllocationState allocationState; - - /* - * The time at which the compute entered its current allocation state. - */ - private OffsetDateTime allocationStateTransitionTime; - - /* - * Collection of errors encountered by various compute nodes during node setup. - */ - private List errors; - - /* - * The number of compute nodes currently assigned to the compute. - */ - private Integer currentNodeCount; - - /* - * The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the - * target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the - * target node count for the previous resize operation. - */ - private Integer targetNodeCount; - - /* - * Counts of various node states on the compute. - */ - private NodeStateCounts nodeStateCounts; - - /* - * Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates - * that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a - * private endpoint and no public IPs. - */ - private Boolean enableNodePublicIp; - - /* - * A property bag containing additional properties. - */ - private Object propertyBag; - - /** - * Creates an instance of AmlComputeProperties class. - */ - public AmlComputeProperties() { - } - - /** - * Get the osType property: Compute OS Type. - * - * @return the osType value. - */ - public OsType osType() { - return this.osType; - } - - /** - * Set the osType property: Compute OS Type. - * - * @param osType the osType value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withOsType(OsType osType) { - this.osType = osType; - return this; - } - - /** - * Get the vmSize property: Virtual Machine Size. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: Virtual Machine Size. - * - * @param vmSize the vmSize value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the vmPriority property: Virtual Machine priority. - * - * @return the vmPriority value. - */ - public VmPriority vmPriority() { - return this.vmPriority; - } - - /** - * Set the vmPriority property: Virtual Machine priority. - * - * @param vmPriority the vmPriority value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withVmPriority(VmPriority vmPriority) { - this.vmPriority = vmPriority; - return this; - } - - /** - * Get the virtualMachineImage property: Virtual Machine image for AML Compute - windows only. - * - * @return the virtualMachineImage value. - */ - public VirtualMachineImage virtualMachineImage() { - return this.virtualMachineImage; - } - - /** - * Set the virtualMachineImage property: Virtual Machine image for AML Compute - windows only. - * - * @param virtualMachineImage the virtualMachineImage value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withVirtualMachineImage(VirtualMachineImage virtualMachineImage) { - this.virtualMachineImage = virtualMachineImage; - return this; - } - - /** - * Get the isolatedNetwork property: Network is isolated or not. - * - * @return the isolatedNetwork value. - */ - public Boolean isolatedNetwork() { - return this.isolatedNetwork; - } - - /** - * Set the isolatedNetwork property: Network is isolated or not. - * - * @param isolatedNetwork the isolatedNetwork value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withIsolatedNetwork(Boolean isolatedNetwork) { - this.isolatedNetwork = isolatedNetwork; - return this; - } - - /** - * Get the scaleSettings property: Scale settings for AML Compute. - * - * @return the scaleSettings value. - */ - public ScaleSettings scaleSettings() { - return this.scaleSettings; - } - - /** - * Set the scaleSettings property: Scale settings for AML Compute. - * - * @param scaleSettings the scaleSettings value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withScaleSettings(ScaleSettings scaleSettings) { - this.scaleSettings = scaleSettings; - return this; - } - - /** - * Get the userAccountCredentials property: Credentials for an administrator user account that will be created on - * each compute node. - * - * @return the userAccountCredentials value. - */ - public UserAccountCredentials userAccountCredentials() { - return this.userAccountCredentials; - } - - /** - * Set the userAccountCredentials property: Credentials for an administrator user account that will be created on - * each compute node. - * - * @param userAccountCredentials the userAccountCredentials value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withUserAccountCredentials(UserAccountCredentials userAccountCredentials) { - this.userAccountCredentials = userAccountCredentials; - return this; - } - - /** - * Get the subnet property: Virtual network subnet resource ID the compute nodes belong to. - * - * @return the subnet value. - */ - public ResourceId subnet() { - return this.subnet; - } - - /** - * Set the subnet property: Virtual network subnet resource ID the compute nodes belong to. - * - * @param subnet the subnet value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withSubnet(ResourceId subnet) { - this.subnet = subnet; - return this; - } - - /** - * Get the remoteLoginPortPublicAccess property: State of the public SSH port. Possible values are: Disabled - - * Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh - * port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all - * nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster - * creation time, after creation it will be either enabled or disabled. - * - * @return the remoteLoginPortPublicAccess value. - */ - public RemoteLoginPortPublicAccess remoteLoginPortPublicAccess() { - return this.remoteLoginPortPublicAccess; - } - - /** - * Set the remoteLoginPortPublicAccess property: State of the public SSH port. Possible values are: Disabled - - * Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh - * port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all - * nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster - * creation time, after creation it will be either enabled or disabled. - * - * @param remoteLoginPortPublicAccess the remoteLoginPortPublicAccess value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties - withRemoteLoginPortPublicAccess(RemoteLoginPortPublicAccess remoteLoginPortPublicAccess) { - this.remoteLoginPortPublicAccess = remoteLoginPortPublicAccess; - return this; - } - - /** - * Get the allocationState property: Allocation state of the compute. Possible values are: steady - Indicates that - * the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A - * compute enters this state when it is created and when no operations are being performed on the compute to change - * the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being - * added to or removed from the compute. - * - * @return the allocationState value. - */ - public AllocationState allocationState() { - return this.allocationState; - } - - /** - * Get the allocationStateTransitionTime property: The time at which the compute entered its current allocation - * state. - * - * @return the allocationStateTransitionTime value. - */ - public OffsetDateTime allocationStateTransitionTime() { - return this.allocationStateTransitionTime; - } - - /** - * Get the errors property: Collection of errors encountered by various compute nodes during node setup. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Get the currentNodeCount property: The number of compute nodes currently assigned to the compute. - * - * @return the currentNodeCount value. - */ - public Integer currentNodeCount() { - return this.currentNodeCount; - } - - /** - * Get the targetNodeCount property: The target number of compute nodes for the compute. If the allocationState is - * resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is - * steady, this property denotes the target node count for the previous resize operation. - * - * @return the targetNodeCount value. - */ - public Integer targetNodeCount() { - return this.targetNodeCount; - } - - /** - * Get the nodeStateCounts property: Counts of various node states on the compute. - * - * @return the nodeStateCounts value. - */ - public NodeStateCounts nodeStateCounts() { - return this.nodeStateCounts; - } - - /** - * Get the enableNodePublicIp property: Enable or disable node public IP address provisioning. Possible values are: - * Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates - * that the compute nodes will have a private endpoint and no public IPs. - * - * @return the enableNodePublicIp value. - */ - public Boolean enableNodePublicIp() { - return this.enableNodePublicIp; - } - - /** - * Set the enableNodePublicIp property: Enable or disable node public IP address provisioning. Possible values are: - * Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates - * that the compute nodes will have a private endpoint and no public IPs. - * - * @param enableNodePublicIp the enableNodePublicIp value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withEnableNodePublicIp(Boolean enableNodePublicIp) { - this.enableNodePublicIp = enableNodePublicIp; - return this; - } - - /** - * Get the propertyBag property: A property bag containing additional properties. - * - * @return the propertyBag value. - */ - public Object propertyBag() { - return this.propertyBag; - } - - /** - * Set the propertyBag property: A property bag containing additional properties. - * - * @param propertyBag the propertyBag value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withPropertyBag(Object propertyBag) { - this.propertyBag = propertyBag; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (virtualMachineImage() != null) { - virtualMachineImage().validate(); - } - if (scaleSettings() != null) { - scaleSettings().validate(); - } - if (userAccountCredentials() != null) { - userAccountCredentials().validate(); - } - if (subnet() != null) { - subnet().validate(); - } - if (nodeStateCounts() != null) { - nodeStateCounts().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); - jsonWriter.writeStringField("vmSize", this.vmSize); - jsonWriter.writeStringField("vmPriority", this.vmPriority == null ? null : this.vmPriority.toString()); - jsonWriter.writeJsonField("virtualMachineImage", this.virtualMachineImage); - jsonWriter.writeBooleanField("isolatedNetwork", this.isolatedNetwork); - jsonWriter.writeJsonField("scaleSettings", this.scaleSettings); - jsonWriter.writeJsonField("userAccountCredentials", this.userAccountCredentials); - jsonWriter.writeJsonField("subnet", this.subnet); - jsonWriter.writeStringField("remoteLoginPortPublicAccess", - this.remoteLoginPortPublicAccess == null ? null : this.remoteLoginPortPublicAccess.toString()); - jsonWriter.writeBooleanField("enableNodePublicIp", this.enableNodePublicIp); - jsonWriter.writeUntypedField("propertyBag", this.propertyBag); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AmlComputeProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AmlComputeProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the AmlComputeProperties. - */ - public static AmlComputeProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AmlComputeProperties deserializedAmlComputeProperties = new AmlComputeProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("osType".equals(fieldName)) { - deserializedAmlComputeProperties.osType = OsType.fromString(reader.getString()); - } else if ("vmSize".equals(fieldName)) { - deserializedAmlComputeProperties.vmSize = reader.getString(); - } else if ("vmPriority".equals(fieldName)) { - deserializedAmlComputeProperties.vmPriority = VmPriority.fromString(reader.getString()); - } else if ("virtualMachineImage".equals(fieldName)) { - deserializedAmlComputeProperties.virtualMachineImage = VirtualMachineImage.fromJson(reader); - } else if ("isolatedNetwork".equals(fieldName)) { - deserializedAmlComputeProperties.isolatedNetwork = reader.getNullable(JsonReader::getBoolean); - } else if ("scaleSettings".equals(fieldName)) { - deserializedAmlComputeProperties.scaleSettings = ScaleSettings.fromJson(reader); - } else if ("userAccountCredentials".equals(fieldName)) { - deserializedAmlComputeProperties.userAccountCredentials = UserAccountCredentials.fromJson(reader); - } else if ("subnet".equals(fieldName)) { - deserializedAmlComputeProperties.subnet = ResourceId.fromJson(reader); - } else if ("remoteLoginPortPublicAccess".equals(fieldName)) { - deserializedAmlComputeProperties.remoteLoginPortPublicAccess - = RemoteLoginPortPublicAccess.fromString(reader.getString()); - } else if ("allocationState".equals(fieldName)) { - deserializedAmlComputeProperties.allocationState = AllocationState.fromString(reader.getString()); - } else if ("allocationStateTransitionTime".equals(fieldName)) { - deserializedAmlComputeProperties.allocationStateTransitionTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("errors".equals(fieldName)) { - List errors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedAmlComputeProperties.errors = errors; - } else if ("currentNodeCount".equals(fieldName)) { - deserializedAmlComputeProperties.currentNodeCount = reader.getNullable(JsonReader::getInt); - } else if ("targetNodeCount".equals(fieldName)) { - deserializedAmlComputeProperties.targetNodeCount = reader.getNullable(JsonReader::getInt); - } else if ("nodeStateCounts".equals(fieldName)) { - deserializedAmlComputeProperties.nodeStateCounts = NodeStateCounts.fromJson(reader); - } else if ("enableNodePublicIp".equals(fieldName)) { - deserializedAmlComputeProperties.enableNodePublicIp = reader.getNullable(JsonReader::getBoolean); - } else if ("propertyBag".equals(fieldName)) { - deserializedAmlComputeProperties.propertyBag = reader.readUntyped(); - } else { - reader.skipChildren(); - } - } - - return deserializedAmlComputeProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeSchema.java deleted file mode 100644 index a9716c1fae72..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeSchema.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties(top level) of AmlCompute. - */ -@Fluent -public class AmlComputeSchema implements JsonSerializable { - /* - * Properties of AmlCompute - */ - private AmlComputeProperties properties; - - /** - * Creates an instance of AmlComputeSchema class. - */ - public AmlComputeSchema() { - } - - /** - * Get the properties property: Properties of AmlCompute. - * - * @return the properties value. - */ - public AmlComputeProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of AmlCompute. - * - * @param properties the properties value to set. - * @return the AmlComputeSchema object itself. - */ - public AmlComputeSchema withProperties(AmlComputeProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AmlComputeSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AmlComputeSchema if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AmlComputeSchema. - */ - public static AmlComputeSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AmlComputeSchema deserializedAmlComputeSchema = new AmlComputeSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedAmlComputeSchema.properties = AmlComputeProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAmlComputeSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.java deleted file mode 100644 index daa2130aeb64..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * AML Token identity configuration. - */ -@Immutable -public final class AmlToken extends IdentityConfiguration { - /* - * [Required] Specifies the type of identity framework. - */ - private IdentityConfigurationType identityType = IdentityConfigurationType.AMLTOKEN; - - /** - * Creates an instance of AmlToken class. - */ - public AmlToken() { - } - - /** - * Get the identityType property: [Required] Specifies the type of identity framework. - * - * @return the identityType value. - */ - @Override - public IdentityConfigurationType identityType() { - return this.identityType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("identityType", this.identityType == null ? null : this.identityType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AmlToken from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AmlToken if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the AmlToken. - */ - public static AmlToken fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AmlToken deserializedAmlToken = new AmlToken(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("identityType".equals(fieldName)) { - deserializedAmlToken.identityType = IdentityConfigurationType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAmlToken; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlTokenComputeIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlTokenComputeIdentity.java deleted file mode 100644 index 4e321bb69e32..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlTokenComputeIdentity.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * AML token compute identity definition. - */ -@Immutable -public final class AmlTokenComputeIdentity extends MonitorComputeIdentityBase { - /* - * [Required] Specifies the type of identity to use within the monitoring jobs. - */ - private MonitorComputeIdentityType computeIdentityType = MonitorComputeIdentityType.AML_TOKEN; - - /** - * Creates an instance of AmlTokenComputeIdentity class. - */ - public AmlTokenComputeIdentity() { - } - - /** - * Get the computeIdentityType property: [Required] Specifies the type of identity to use within the monitoring - * jobs. - * - * @return the computeIdentityType value. - */ - @Override - public MonitorComputeIdentityType computeIdentityType() { - return this.computeIdentityType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeIdentityType", - this.computeIdentityType == null ? null : this.computeIdentityType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AmlTokenComputeIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AmlTokenComputeIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the AmlTokenComputeIdentity. - */ - public static AmlTokenComputeIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AmlTokenComputeIdentity deserializedAmlTokenComputeIdentity = new AmlTokenComputeIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeIdentityType".equals(fieldName)) { - deserializedAmlTokenComputeIdentity.computeIdentityType - = MonitorComputeIdentityType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAmlTokenComputeIdentity; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlUserFeature.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlUserFeature.java deleted file mode 100644 index e1d9a199d698..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlUserFeature.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner; - -/** - * An immutable client-side representation of AmlUserFeature. - */ -public interface AmlUserFeature { - /** - * Gets the id property: Specifies the feature ID. - * - * @return the id value. - */ - String id(); - - /** - * Gets the displayName property: Specifies the feature name. - * - * @return the displayName value. - */ - String displayName(); - - /** - * Gets the description property: Describes the feature for user experience. - * - * @return the description value. - */ - String description(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner object. - * - * @return the inner object. - */ - AmlUserFeatureInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AnonymousAccessCredential.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AnonymousAccessCredential.java deleted file mode 100644 index 062a8ec3b179..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AnonymousAccessCredential.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Access credential with no credentials. - */ -@Immutable -public final class AnonymousAccessCredential extends DataReferenceCredential { - /* - * [Required] Credential type used to authentication with storage. - */ - private DataReferenceCredentialType credentialType = DataReferenceCredentialType.NO_CREDENTIALS; - - /** - * Creates an instance of AnonymousAccessCredential class. - */ - public AnonymousAccessCredential() { - } - - /** - * Get the credentialType property: [Required] Credential type used to authentication with storage. - * - * @return the credentialType value. - */ - @Override - public DataReferenceCredentialType credentialType() { - return this.credentialType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("credentialType", - this.credentialType == null ? null : this.credentialType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AnonymousAccessCredential from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AnonymousAccessCredential if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AnonymousAccessCredential. - */ - public static AnonymousAccessCredential fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AnonymousAccessCredential deserializedAnonymousAccessCredential = new AnonymousAccessCredential(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("credentialType".equals(fieldName)) { - deserializedAnonymousAccessCredential.credentialType - = DataReferenceCredentialType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAnonymousAccessCredential; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApiKeyAuthWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApiKeyAuthWorkspaceConnectionProperties.java deleted file mode 100644 index cab43ca41a15..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApiKeyAuthWorkspaceConnectionProperties.java +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; - -/** - * This connection type covers the generic ApiKey auth connection categories, for examples: - * AzureOpenAI: - * Category:= AzureOpenAI - * AuthType:= ApiKey (as type discriminator) - * Credentials:= {ApiKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey - * Target:= {ApiBase} - * - * CognitiveService: - * Category:= CognitiveService - * AuthType:= ApiKey (as type discriminator) - * Credentials:= {SubscriptionKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey - * Target:= ServiceRegion={serviceRegion} - * - * CognitiveSearch: - * Category:= CognitiveSearch - * AuthType:= ApiKey (as type discriminator) - * Credentials:= {Key} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey - * Target:= {Endpoint} - * - * Use Metadata property bag for ApiType, ApiVersion, Kind and other metadata fields. - */ -@Fluent -public final class ApiKeyAuthWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /* - * Authentication type of the connection target - */ - private ConnectionAuthType authType = ConnectionAuthType.API_KEY; - - /* - * Api key object for workspace connection credential. - */ - private WorkspaceConnectionApiKey credentials; - - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - - /** - * Creates an instance of ApiKeyAuthWorkspaceConnectionProperties class. - */ - public ApiKeyAuthWorkspaceConnectionProperties() { - } - - /** - * Get the authType property: Authentication type of the connection target. - * - * @return the authType value. - */ - @Override - public ConnectionAuthType authType() { - return this.authType; - } - - /** - * Get the credentials property: Api key object for workspace connection credential. - * - * @return the credentials value. - */ - public WorkspaceConnectionApiKey credentials() { - return this.credentials; - } - - /** - * Set the credentials property: Api key object for workspace connection credential. - * - * @param credentials the credentials value to set. - * @return the ApiKeyAuthWorkspaceConnectionProperties object itself. - */ - public ApiKeyAuthWorkspaceConnectionProperties withCredentials(WorkspaceConnectionApiKey credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. - */ - @Override - public ConnectionGroup group() { - return this.group; - } - - /** - * {@inheritDoc} - */ - @Override - public ApiKeyAuthWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ApiKeyAuthWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ApiKeyAuthWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ApiKeyAuthWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ApiKeyAuthWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ApiKeyAuthWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { - super.withSharedUserList(sharedUserList); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ApiKeyAuthWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ApiKeyAuthWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", category() == null ? null : category().toString()); - jsonWriter.writeStringField("expiryTime", - expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); - jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); - jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("sharedUserList", sharedUserList(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeJsonField("credentials", this.credentials); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ApiKeyAuthWorkspaceConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ApiKeyAuthWorkspaceConnectionProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ApiKeyAuthWorkspaceConnectionProperties. - */ - public static ApiKeyAuthWorkspaceConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ApiKeyAuthWorkspaceConnectionProperties deserializedApiKeyAuthWorkspaceConnectionProperties - = new ApiKeyAuthWorkspaceConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties - .withCategory(ConnectionCategory.fromString(reader.getString())); - } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); - } else if ("expiryTime".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties.withExpiryTime(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("group".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); - } else if ("isSharedToAll".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties - .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties.withTarget(reader.getString()); - } else if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedApiKeyAuthWorkspaceConnectionProperties.withMetadata(metadata); - } else if ("sharedUserList".equals(fieldName)) { - List sharedUserList = reader.readArray(reader1 -> reader1.getString()); - deserializedApiKeyAuthWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties.authType - = ConnectionAuthType.fromString(reader.getString()); - } else if ("credentials".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties.credentials - = WorkspaceConnectionApiKey.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedApiKeyAuthWorkspaceConnectionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java deleted file mode 100644 index daa001324d7e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Sharing policy for applications on this compute instance - * - * Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the - * creator can access applications on this compute instance. When Shared, any workspace user can access applications on - * this instance depending on his/her assigned role. - */ -public final class ApplicationSharingPolicy extends ExpandableStringEnum { - /** - * Static value Personal for ApplicationSharingPolicy. - */ - public static final ApplicationSharingPolicy PERSONAL = fromString("Personal"); - - /** - * Static value Shared for ApplicationSharingPolicy. - */ - public static final ApplicationSharingPolicy SHARED = fromString("Shared"); - - /** - * Creates a new instance of ApplicationSharingPolicy value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ApplicationSharingPolicy() { - } - - /** - * Creates or finds a ApplicationSharingPolicy from its string representation. - * - * @param name a name to look for. - * @return the corresponding ApplicationSharingPolicy. - */ - public static ApplicationSharingPolicy fromString(String name) { - return fromString(name, ApplicationSharingPolicy.class); - } - - /** - * Gets known ApplicationSharingPolicy values. - * - * @return known ApplicationSharingPolicy values. - */ - public static Collection values() { - return values(ApplicationSharingPolicy.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java deleted file mode 100644 index 406b7f948206..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * ARM ResourceId of a resource. - */ -@Fluent -public final class ArmResourceId implements JsonSerializable { - /* - * Arm ResourceId is in the format - * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" - * or - * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}" - */ - private String resourceId; - - /** - * Creates an instance of ArmResourceId class. - */ - public ArmResourceId() { - } - - /** - * Get the resourceId property: Arm ResourceId is in the format - * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" - * or - * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}". - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: Arm ResourceId is in the format - * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" - * or - * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}". - * - * @param resourceId the resourceId value to set. - * @return the ArmResourceId object itself. - */ - public ArmResourceId withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceId", this.resourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ArmResourceId from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ArmResourceId if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ArmResourceId. - */ - public static ArmResourceId fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ArmResourceId deserializedArmResourceId = new ArmResourceId(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceId".equals(fieldName)) { - deserializedArmResourceId.resourceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedArmResourceId; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java deleted file mode 100644 index 40f0a0158c4f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The AssetBase model. - */ -@Fluent -public class AssetBase extends ResourceBase { - /* - * Is the asset archived? - */ - private Boolean isArchived; - - /* - * If the name version are system generated (anonymous registration). - */ - private Boolean isAnonymous; - - /** - * Creates an instance of AssetBase class. - */ - public AssetBase() { - } - - /** - * Get the isArchived property: Is the asset archived?. - * - * @return the isArchived value. - */ - public Boolean isArchived() { - return this.isArchived; - } - - /** - * Set the isArchived property: Is the asset archived?. - * - * @param isArchived the isArchived value to set. - * @return the AssetBase object itself. - */ - public AssetBase withIsArchived(Boolean isArchived) { - this.isArchived = isArchived; - return this; - } - - /** - * Get the isAnonymous property: If the name version are system generated (anonymous registration). - * - * @return the isAnonymous value. - */ - public Boolean isAnonymous() { - return this.isAnonymous; - } - - /** - * Set the isAnonymous property: If the name version are system generated (anonymous registration). - * - * @param isAnonymous the isAnonymous value to set. - * @return the AssetBase object itself. - */ - public AssetBase withIsAnonymous(Boolean isAnonymous) { - this.isAnonymous = isAnonymous; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AssetBase withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AssetBase withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AssetBase withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", this.isArchived); - jsonWriter.writeBooleanField("isAnonymous", this.isAnonymous); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AssetBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AssetBase if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the AssetBase. - */ - public static AssetBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AssetBase deserializedAssetBase = new AssetBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedAssetBase.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAssetBase.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedAssetBase.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedAssetBase.isArchived = reader.getNullable(JsonReader::getBoolean); - } else if ("isAnonymous".equals(fieldName)) { - deserializedAssetBase.isAnonymous = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedAssetBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.java deleted file mode 100644 index 3361874f3160..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The AssetContainer model. - */ -@Fluent -public class AssetContainer extends ResourceBase { - /* - * Is the asset archived? - */ - private Boolean isArchived; - - /* - * The latest version inside this container. - */ - private String latestVersion; - - /* - * The next auto incremental version - */ - private String nextVersion; - - /** - * Creates an instance of AssetContainer class. - */ - public AssetContainer() { - } - - /** - * Get the isArchived property: Is the asset archived?. - * - * @return the isArchived value. - */ - public Boolean isArchived() { - return this.isArchived; - } - - /** - * Set the isArchived property: Is the asset archived?. - * - * @param isArchived the isArchived value to set. - * @return the AssetContainer object itself. - */ - public AssetContainer withIsArchived(Boolean isArchived) { - this.isArchived = isArchived; - return this; - } - - /** - * Get the latestVersion property: The latest version inside this container. - * - * @return the latestVersion value. - */ - public String latestVersion() { - return this.latestVersion; - } - - /** - * Set the latestVersion property: The latest version inside this container. - * - * @param latestVersion the latestVersion value to set. - * @return the AssetContainer object itself. - */ - AssetContainer withLatestVersion(String latestVersion) { - this.latestVersion = latestVersion; - return this; - } - - /** - * Get the nextVersion property: The next auto incremental version. - * - * @return the nextVersion value. - */ - public String nextVersion() { - return this.nextVersion; - } - - /** - * Set the nextVersion property: The next auto incremental version. - * - * @param nextVersion the nextVersion value to set. - * @return the AssetContainer object itself. - */ - AssetContainer withNextVersion(String nextVersion) { - this.nextVersion = nextVersion; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AssetContainer withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AssetContainer withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AssetContainer withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", this.isArchived); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AssetContainer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AssetContainer if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AssetContainer. - */ - public static AssetContainer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AssetContainer deserializedAssetContainer = new AssetContainer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedAssetContainer.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAssetContainer.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedAssetContainer.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedAssetContainer.isArchived = reader.getNullable(JsonReader::getBoolean); - } else if ("latestVersion".equals(fieldName)) { - deserializedAssetContainer.latestVersion = reader.getString(); - } else if ("nextVersion".equals(fieldName)) { - deserializedAssetContainer.nextVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAssetContainer; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobInput.java deleted file mode 100644 index 3f22adaf3d73..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobInput.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Asset input type. - */ -@Fluent -public class AssetJobInput implements JsonSerializable { - /* - * [Required] Input Asset URI. - */ - private String uri; - - /* - * Input Asset Delivery Mode. - */ - private InputDeliveryMode mode; - - /** - * Creates an instance of AssetJobInput class. - */ - public AssetJobInput() { - } - - /** - * Get the uri property: [Required] Input Asset URI. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: [Required] Input Asset URI. - * - * @param uri the uri value to set. - * @return the AssetJobInput object itself. - */ - public AssetJobInput withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the mode property: Input Asset Delivery Mode. - * - * @return the mode value. - */ - public InputDeliveryMode mode() { - return this.mode; - } - - /** - * Set the mode property: Input Asset Delivery Mode. - * - * @param mode the mode value to set. - * @return the AssetJobInput object itself. - */ - public AssetJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model AssetJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AssetJobInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AssetJobInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AssetJobInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AssetJobInput. - */ - public static AssetJobInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AssetJobInput deserializedAssetJobInput = new AssetJobInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("uri".equals(fieldName)) { - deserializedAssetJobInput.uri = reader.getString(); - } else if ("mode".equals(fieldName)) { - deserializedAssetJobInput.mode = InputDeliveryMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAssetJobInput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobOutput.java deleted file mode 100644 index 777d853f2ca6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobOutput.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Asset output type. - */ -@Fluent -public class AssetJobOutput implements JsonSerializable { - /* - * Output Asset URI. - */ - private String uri; - - /* - * Output Asset Delivery Mode. - */ - private OutputDeliveryMode mode; - - /** - * Creates an instance of AssetJobOutput class. - */ - public AssetJobOutput() { - } - - /** - * Get the uri property: Output Asset URI. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: Output Asset URI. - * - * @param uri the uri value to set. - * @return the AssetJobOutput object itself. - */ - public AssetJobOutput withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the mode property: Output Asset Delivery Mode. - * - * @return the mode value. - */ - public OutputDeliveryMode mode() { - return this.mode; - } - - /** - * Set the mode property: Output Asset Delivery Mode. - * - * @param mode the mode value to set. - * @return the AssetJobOutput object itself. - */ - public AssetJobOutput withMode(OutputDeliveryMode mode) { - this.mode = mode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AssetJobOutput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AssetJobOutput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AssetJobOutput. - */ - public static AssetJobOutput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AssetJobOutput deserializedAssetJobOutput = new AssetJobOutput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("uri".equals(fieldName)) { - deserializedAssetJobOutput.uri = reader.getString(); - } else if ("mode".equals(fieldName)) { - deserializedAssetJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAssetJobOutput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.java deleted file mode 100644 index 4dab2c6ed452..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Provisioning state of registry asset. - */ -public final class AssetProvisioningState extends ExpandableStringEnum { - /** - * Static value Succeeded for AssetProvisioningState. - */ - public static final AssetProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for AssetProvisioningState. - */ - public static final AssetProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for AssetProvisioningState. - */ - public static final AssetProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Creating for AssetProvisioningState. - */ - public static final AssetProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Updating for AssetProvisioningState. - */ - public static final AssetProvisioningState UPDATING = fromString("Updating"); - - /** - * Static value Deleting for AssetProvisioningState. - */ - public static final AssetProvisioningState DELETING = fromString("Deleting"); - - /** - * Creates a new instance of AssetProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AssetProvisioningState() { - } - - /** - * Creates or finds a AssetProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding AssetProvisioningState. - */ - public static AssetProvisioningState fromString(String name) { - return fromString(name, AssetProvisioningState.class); - } - - /** - * Gets known AssetProvisioningState values. - * - * @return known AssetProvisioningState values. - */ - public static Collection values() { - return values(AssetProvisioningState.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.java deleted file mode 100644 index 7afbb2dd6401..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base definition for asset references. - */ -@Immutable -public class AssetReferenceBase implements JsonSerializable { - /* - * [Required] Specifies the type of asset reference. - */ - private ReferenceType referenceType = ReferenceType.fromString("AssetReferenceBase"); - - /** - * Creates an instance of AssetReferenceBase class. - */ - public AssetReferenceBase() { - } - - /** - * Get the referenceType property: [Required] Specifies the type of asset reference. - * - * @return the referenceType value. - */ - public ReferenceType referenceType() { - return this.referenceType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("referenceType", this.referenceType == null ? null : this.referenceType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AssetReferenceBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AssetReferenceBase if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AssetReferenceBase. - */ - public static AssetReferenceBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("referenceType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Id".equals(discriminatorValue)) { - return IdAssetReference.fromJson(readerToUse.reset()); - } else if ("DataPath".equals(discriminatorValue)) { - return DataPathAssetReference.fromJson(readerToUse.reset()); - } else if ("OutputPath".equals(discriminatorValue)) { - return OutputPathAssetReference.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static AssetReferenceBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AssetReferenceBase deserializedAssetReferenceBase = new AssetReferenceBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("referenceType".equals(fieldName)) { - deserializedAssetReferenceBase.referenceType = ReferenceType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAssetReferenceBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.java deleted file mode 100644 index 8a2c105c6ab7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A user that can be assigned to a compute instance. - */ -@Fluent -public final class AssignedUser implements JsonSerializable { - /* - * User’s AAD Object Id. - */ - private String objectId; - - /* - * User’s AAD Tenant Id. - */ - private String tenantId; - - /** - * Creates an instance of AssignedUser class. - */ - public AssignedUser() { - } - - /** - * Get the objectId property: User’s AAD Object Id. - * - * @return the objectId value. - */ - public String objectId() { - return this.objectId; - } - - /** - * Set the objectId property: User’s AAD Object Id. - * - * @param objectId the objectId value to set. - * @return the AssignedUser object itself. - */ - public AssignedUser withObjectId(String objectId) { - this.objectId = objectId; - return this; - } - - /** - * Get the tenantId property: User’s AAD Tenant Id. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: User’s AAD Tenant Id. - * - * @param tenantId the tenantId value to set. - * @return the AssignedUser object itself. - */ - public AssignedUser withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (objectId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property objectId in model AssignedUser")); - } - if (tenantId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property tenantId in model AssignedUser")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AssignedUser.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("objectId", this.objectId); - jsonWriter.writeStringField("tenantId", this.tenantId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AssignedUser from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AssignedUser if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AssignedUser. - */ - public static AssignedUser fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AssignedUser deserializedAssignedUser = new AssignedUser(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("objectId".equals(fieldName)) { - deserializedAssignedUser.objectId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedAssignedUser.tenantId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAssignedUser; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.java deleted file mode 100644 index 3a85d223e13d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Forecast horizon determined automatically by system. - */ -@Immutable -public final class AutoForecastHorizon extends ForecastHorizon { - /* - * [Required] Set forecast horizon value selection mode. - */ - private ForecastHorizonMode mode = ForecastHorizonMode.AUTO; - - /** - * Creates an instance of AutoForecastHorizon class. - */ - public AutoForecastHorizon() { - } - - /** - * Get the mode property: [Required] Set forecast horizon value selection mode. - * - * @return the mode value. - */ - @Override - public ForecastHorizonMode mode() { - return this.mode; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AutoForecastHorizon from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AutoForecastHorizon if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AutoForecastHorizon. - */ - public static AutoForecastHorizon fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AutoForecastHorizon deserializedAutoForecastHorizon = new AutoForecastHorizon(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedAutoForecastHorizon.mode = ForecastHorizonMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAutoForecastHorizon; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.java deleted file mode 100644 index f616e2956874..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.java +++ /dev/null @@ -1,439 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * AutoMLJob class. - * Use this class for executing AutoML tasks like Classification/Regression etc. - * See TaskType enum for all the tasks supported. - */ -@Fluent -public final class AutoMLJob extends JobBaseProperties { - /* - * [Required] Specifies the type of job. - */ - private JobType jobType = JobType.AUTO_ML; - - /* - * Compute Resource configuration for the job. - */ - private JobResourceConfiguration resources; - - /* - * The ARM resource ID of the Environment specification for the job. - * This is optional value to provide, if not provided, AutoML will default this to Production AutoML curated - * environment version when running the job. - */ - private String environmentId; - - /* - * Environment variables included in the job. - */ - private Map environmentVariables; - - /* - * [Required] This represents scenario which can be one of Tables/NLP/Image - */ - private AutoMLVertical taskDetails; - - /* - * Mapping of output data bindings used in the job. - */ - private Map outputs; - - /* - * Queue settings for the job - */ - private QueueSettings queueSettings; - - /* - * Status of the job. - */ - private JobStatus status; - - /** - * Creates an instance of AutoMLJob class. - */ - public AutoMLJob() { - } - - /** - * Get the jobType property: [Required] Specifies the type of job. - * - * @return the jobType value. - */ - @Override - public JobType jobType() { - return this.jobType; - } - - /** - * Get the resources property: Compute Resource configuration for the job. - * - * @return the resources value. - */ - public JobResourceConfiguration resources() { - return this.resources; - } - - /** - * Set the resources property: Compute Resource configuration for the job. - * - * @param resources the resources value to set. - * @return the AutoMLJob object itself. - */ - public AutoMLJob withResources(JobResourceConfiguration resources) { - this.resources = resources; - return this; - } - - /** - * Get the environmentId property: The ARM resource ID of the Environment specification for the job. - * This is optional value to provide, if not provided, AutoML will default this to Production AutoML curated - * environment version when running the job. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId property: The ARM resource ID of the Environment specification for the job. - * This is optional value to provide, if not provided, AutoML will default this to Production AutoML curated - * environment version when running the job. - * - * @param environmentId the environmentId value to set. - * @return the AutoMLJob object itself. - */ - public AutoMLJob withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Get the environmentVariables property: Environment variables included in the job. - * - * @return the environmentVariables value. - */ - public Map environmentVariables() { - return this.environmentVariables; - } - - /** - * Set the environmentVariables property: Environment variables included in the job. - * - * @param environmentVariables the environmentVariables value to set. - * @return the AutoMLJob object itself. - */ - public AutoMLJob withEnvironmentVariables(Map environmentVariables) { - this.environmentVariables = environmentVariables; - return this; - } - - /** - * Get the taskDetails property: [Required] This represents scenario which can be one of Tables/NLP/Image. - * - * @return the taskDetails value. - */ - public AutoMLVertical taskDetails() { - return this.taskDetails; - } - - /** - * Set the taskDetails property: [Required] This represents scenario which can be one of Tables/NLP/Image. - * - * @param taskDetails the taskDetails value to set. - * @return the AutoMLJob object itself. - */ - public AutoMLJob withTaskDetails(AutoMLVertical taskDetails) { - this.taskDetails = taskDetails; - return this; - } - - /** - * Get the outputs property: Mapping of output data bindings used in the job. - * - * @return the outputs value. - */ - public Map outputs() { - return this.outputs; - } - - /** - * Set the outputs property: Mapping of output data bindings used in the job. - * - * @param outputs the outputs value to set. - * @return the AutoMLJob object itself. - */ - public AutoMLJob withOutputs(Map outputs) { - this.outputs = outputs; - return this; - } - - /** - * Get the queueSettings property: Queue settings for the job. - * - * @return the queueSettings value. - */ - public QueueSettings queueSettings() { - return this.queueSettings; - } - - /** - * Set the queueSettings property: Queue settings for the job. - * - * @param queueSettings the queueSettings value to set. - * @return the AutoMLJob object itself. - */ - public AutoMLJob withQueueSettings(QueueSettings queueSettings) { - this.queueSettings = queueSettings; - return this; - } - - /** - * Get the status property: Status of the job. - * - * @return the status value. - */ - @Override - public JobStatus status() { - return this.status; - } - - /** - * {@inheritDoc} - */ - @Override - public AutoMLJob withDisplayName(String displayName) { - super.withDisplayName(displayName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AutoMLJob withExperimentName(String experimentName) { - super.withExperimentName(experimentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AutoMLJob withServices(Map services) { - super.withServices(services); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AutoMLJob withComputeId(String computeId) { - super.withComputeId(computeId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AutoMLJob withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AutoMLJob withIdentity(IdentityConfiguration identity) { - super.withIdentity(identity); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AutoMLJob withComponentId(String componentId) { - super.withComponentId(componentId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AutoMLJob withNotificationSetting(NotificationSetting notificationSetting) { - super.withNotificationSetting(notificationSetting); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AutoMLJob withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AutoMLJob withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AutoMLJob withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (resources() != null) { - resources().validate(); - } - if (taskDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property taskDetails in model AutoMLJob")); - } else { - taskDetails().validate(); - } - if (outputs() != null) { - outputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (queueSettings() != null) { - queueSettings().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AutoMLJob.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("displayName", displayName()); - jsonWriter.writeStringField("experimentName", experimentName()); - jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", computeId()); - jsonWriter.writeBooleanField("isArchived", isArchived()); - jsonWriter.writeJsonField("identity", identity()); - jsonWriter.writeStringField("componentId", componentId()); - jsonWriter.writeJsonField("notificationSetting", notificationSetting()); - jsonWriter.writeJsonField("taskDetails", this.taskDetails); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeJsonField("resources", this.resources); - jsonWriter.writeStringField("environmentId", this.environmentId); - jsonWriter.writeMapField("environmentVariables", this.environmentVariables, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("queueSettings", this.queueSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AutoMLJob from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AutoMLJob if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AutoMLJob. - */ - public static AutoMLJob fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AutoMLJob deserializedAutoMLJob = new AutoMLJob(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedAutoMLJob.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAutoMLJob.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedAutoMLJob.withProperties(properties); - } else if ("displayName".equals(fieldName)) { - deserializedAutoMLJob.withDisplayName(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedAutoMLJob.status = JobStatus.fromString(reader.getString()); - } else if ("experimentName".equals(fieldName)) { - deserializedAutoMLJob.withExperimentName(reader.getString()); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedAutoMLJob.withServices(services); - } else if ("computeId".equals(fieldName)) { - deserializedAutoMLJob.withComputeId(reader.getString()); - } else if ("isArchived".equals(fieldName)) { - deserializedAutoMLJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("identity".equals(fieldName)) { - deserializedAutoMLJob.withIdentity(IdentityConfiguration.fromJson(reader)); - } else if ("componentId".equals(fieldName)) { - deserializedAutoMLJob.withComponentId(reader.getString()); - } else if ("notificationSetting".equals(fieldName)) { - deserializedAutoMLJob.withNotificationSetting(NotificationSetting.fromJson(reader)); - } else if ("taskDetails".equals(fieldName)) { - deserializedAutoMLJob.taskDetails = AutoMLVertical.fromJson(reader); - } else if ("jobType".equals(fieldName)) { - deserializedAutoMLJob.jobType = JobType.fromString(reader.getString()); - } else if ("resources".equals(fieldName)) { - deserializedAutoMLJob.resources = JobResourceConfiguration.fromJson(reader); - } else if ("environmentId".equals(fieldName)) { - deserializedAutoMLJob.environmentId = reader.getString(); - } else if ("environmentVariables".equals(fieldName)) { - Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); - deserializedAutoMLJob.environmentVariables = environmentVariables; - } else if ("outputs".equals(fieldName)) { - Map outputs = reader.readMap(reader1 -> JobOutput.fromJson(reader1)); - deserializedAutoMLJob.outputs = outputs; - } else if ("queueSettings".equals(fieldName)) { - deserializedAutoMLJob.queueSettings = QueueSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAutoMLJob; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLVertical.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLVertical.java deleted file mode 100644 index 322da20d956b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLVertical.java +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * AutoML vertical class. - * Base class for AutoML verticals - TableVertical/ImageVertical/NLPVertical. - */ -@Fluent -public class AutoMLVertical implements JsonSerializable { - /* - * [Required] Task type for AutoMLJob. - */ - private TaskType taskType = TaskType.fromString("AutoMLVertical"); - - /* - * Log verbosity for the job. - */ - private LogVerbosity logVerbosity; - - /* - * [Required] Training data input. - */ - private MLTableJobInput trainingData; - - /* - * Target column name: This is prediction values column. - * Also known as label column name in context of classification tasks. - */ - private String targetColumnName; - - /** - * Creates an instance of AutoMLVertical class. - */ - public AutoMLVertical() { - } - - /** - * Get the taskType property: [Required] Task type for AutoMLJob. - * - * @return the taskType value. - */ - public TaskType taskType() { - return this.taskType; - } - - /** - * Get the logVerbosity property: Log verbosity for the job. - * - * @return the logVerbosity value. - */ - public LogVerbosity logVerbosity() { - return this.logVerbosity; - } - - /** - * Set the logVerbosity property: Log verbosity for the job. - * - * @param logVerbosity the logVerbosity value to set. - * @return the AutoMLVertical object itself. - */ - public AutoMLVertical withLogVerbosity(LogVerbosity logVerbosity) { - this.logVerbosity = logVerbosity; - return this; - } - - /** - * Get the trainingData property: [Required] Training data input. - * - * @return the trainingData value. - */ - public MLTableJobInput trainingData() { - return this.trainingData; - } - - /** - * Set the trainingData property: [Required] Training data input. - * - * @param trainingData the trainingData value to set. - * @return the AutoMLVertical object itself. - */ - public AutoMLVertical withTrainingData(MLTableJobInput trainingData) { - this.trainingData = trainingData; - return this; - } - - /** - * Get the targetColumnName property: Target column name: This is prediction values column. - * Also known as label column name in context of classification tasks. - * - * @return the targetColumnName value. - */ - public String targetColumnName() { - return this.targetColumnName; - } - - /** - * Set the targetColumnName property: Target column name: This is prediction values column. - * Also known as label column name in context of classification tasks. - * - * @param targetColumnName the targetColumnName value to set. - * @return the AutoMLVertical object itself. - */ - public AutoMLVertical withTargetColumnName(String targetColumnName) { - this.targetColumnName = targetColumnName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (trainingData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property trainingData in model AutoMLVertical")); - } else { - trainingData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AutoMLVertical.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("trainingData", this.trainingData); - jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("logVerbosity", this.logVerbosity == null ? null : this.logVerbosity.toString()); - jsonWriter.writeStringField("targetColumnName", this.targetColumnName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AutoMLVertical from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AutoMLVertical if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AutoMLVertical. - */ - public static AutoMLVertical fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("taskType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Classification".equals(discriminatorValue)) { - return Classification.fromJson(readerToUse.reset()); - } else if ("Forecasting".equals(discriminatorValue)) { - return Forecasting.fromJson(readerToUse.reset()); - } else if ("ImageClassification".equals(discriminatorValue)) { - return ImageClassification.fromJson(readerToUse.reset()); - } else if ("ImageClassificationMultilabel".equals(discriminatorValue)) { - return ImageClassificationMultilabel.fromJson(readerToUse.reset()); - } else if ("ImageInstanceSegmentation".equals(discriminatorValue)) { - return ImageInstanceSegmentation.fromJson(readerToUse.reset()); - } else if ("ImageObjectDetection".equals(discriminatorValue)) { - return ImageObjectDetection.fromJson(readerToUse.reset()); - } else if ("Regression".equals(discriminatorValue)) { - return Regression.fromJson(readerToUse.reset()); - } else if ("TextClassification".equals(discriminatorValue)) { - return TextClassification.fromJson(readerToUse.reset()); - } else if ("TextClassificationMultilabel".equals(discriminatorValue)) { - return TextClassificationMultilabel.fromJson(readerToUse.reset()); - } else if ("TextNER".equals(discriminatorValue)) { - return TextNer.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static AutoMLVertical fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AutoMLVertical deserializedAutoMLVertical = new AutoMLVertical(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("trainingData".equals(fieldName)) { - deserializedAutoMLVertical.trainingData = MLTableJobInput.fromJson(reader); - } else if ("taskType".equals(fieldName)) { - deserializedAutoMLVertical.taskType = TaskType.fromString(reader.getString()); - } else if ("logVerbosity".equals(fieldName)) { - deserializedAutoMLVertical.logVerbosity = LogVerbosity.fromString(reader.getString()); - } else if ("targetColumnName".equals(fieldName)) { - deserializedAutoMLVertical.targetColumnName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAutoMLVertical; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.java deleted file mode 100644 index ee0332610783..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * N-Cross validations determined automatically. - */ -@Immutable -public final class AutoNCrossValidations extends NCrossValidations { - /* - * [Required] Mode for determining N-Cross validations. - */ - private NCrossValidationsMode mode = NCrossValidationsMode.AUTO; - - /** - * Creates an instance of AutoNCrossValidations class. - */ - public AutoNCrossValidations() { - } - - /** - * Get the mode property: [Required] Mode for determining N-Cross validations. - * - * @return the mode value. - */ - @Override - public NCrossValidationsMode mode() { - return this.mode; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AutoNCrossValidations from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AutoNCrossValidations if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the AutoNCrossValidations. - */ - public static AutoNCrossValidations fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AutoNCrossValidations deserializedAutoNCrossValidations = new AutoNCrossValidations(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedAutoNCrossValidations.mode = NCrossValidationsMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAutoNCrossValidations; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java deleted file mode 100644 index 69ca2322eb0a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Auto pause properties. - */ -@Fluent -public final class AutoPauseProperties implements JsonSerializable { - /* - * The delayInMinutes property. - */ - private Integer delayInMinutes; - - /* - * The enabled property. - */ - private Boolean enabled; - - /** - * Creates an instance of AutoPauseProperties class. - */ - public AutoPauseProperties() { - } - - /** - * Get the delayInMinutes property: The delayInMinutes property. - * - * @return the delayInMinutes value. - */ - public Integer delayInMinutes() { - return this.delayInMinutes; - } - - /** - * Set the delayInMinutes property: The delayInMinutes property. - * - * @param delayInMinutes the delayInMinutes value to set. - * @return the AutoPauseProperties object itself. - */ - public AutoPauseProperties withDelayInMinutes(Integer delayInMinutes) { - this.delayInMinutes = delayInMinutes; - return this; - } - - /** - * Get the enabled property: The enabled property. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: The enabled property. - * - * @param enabled the enabled value to set. - * @return the AutoPauseProperties object itself. - */ - public AutoPauseProperties withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("delayInMinutes", this.delayInMinutes); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AutoPauseProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AutoPauseProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AutoPauseProperties. - */ - public static AutoPauseProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AutoPauseProperties deserializedAutoPauseProperties = new AutoPauseProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("delayInMinutes".equals(fieldName)) { - deserializedAutoPauseProperties.delayInMinutes = reader.getNullable(JsonReader::getInt); - } else if ("enabled".equals(fieldName)) { - deserializedAutoPauseProperties.enabled = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedAutoPauseProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoRebuildSetting.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoRebuildSetting.java deleted file mode 100644 index 90ca957d2bc8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoRebuildSetting.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * AutoRebuild setting for the derived image. - */ -public final class AutoRebuildSetting extends ExpandableStringEnum { - /** - * Static value Disabled for AutoRebuildSetting. - */ - public static final AutoRebuildSetting DISABLED = fromString("Disabled"); - - /** - * Static value OnBaseImageUpdate for AutoRebuildSetting. - */ - public static final AutoRebuildSetting ON_BASE_IMAGE_UPDATE = fromString("OnBaseImageUpdate"); - - /** - * Creates a new instance of AutoRebuildSetting value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AutoRebuildSetting() { - } - - /** - * Creates or finds a AutoRebuildSetting from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutoRebuildSetting. - */ - public static AutoRebuildSetting fromString(String name) { - return fromString(name, AutoRebuildSetting.class); - } - - /** - * Gets known AutoRebuildSetting values. - * - * @return known AutoRebuildSetting values. - */ - public static Collection values() { - return values(AutoRebuildSetting.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java deleted file mode 100644 index d4367d067375..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Auto scale properties. - */ -@Fluent -public final class AutoScaleProperties implements JsonSerializable { - /* - * The minNodeCount property. - */ - private Integer minNodeCount; - - /* - * The enabled property. - */ - private Boolean enabled; - - /* - * The maxNodeCount property. - */ - private Integer maxNodeCount; - - /** - * Creates an instance of AutoScaleProperties class. - */ - public AutoScaleProperties() { - } - - /** - * Get the minNodeCount property: The minNodeCount property. - * - * @return the minNodeCount value. - */ - public Integer minNodeCount() { - return this.minNodeCount; - } - - /** - * Set the minNodeCount property: The minNodeCount property. - * - * @param minNodeCount the minNodeCount value to set. - * @return the AutoScaleProperties object itself. - */ - public AutoScaleProperties withMinNodeCount(Integer minNodeCount) { - this.minNodeCount = minNodeCount; - return this; - } - - /** - * Get the enabled property: The enabled property. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: The enabled property. - * - * @param enabled the enabled value to set. - * @return the AutoScaleProperties object itself. - */ - public AutoScaleProperties withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the maxNodeCount property: The maxNodeCount property. - * - * @return the maxNodeCount value. - */ - public Integer maxNodeCount() { - return this.maxNodeCount; - } - - /** - * Set the maxNodeCount property: The maxNodeCount property. - * - * @param maxNodeCount the maxNodeCount value to set. - * @return the AutoScaleProperties object itself. - */ - public AutoScaleProperties withMaxNodeCount(Integer maxNodeCount) { - this.maxNodeCount = maxNodeCount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("minNodeCount", this.minNodeCount); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeNumberField("maxNodeCount", this.maxNodeCount); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AutoScaleProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AutoScaleProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AutoScaleProperties. - */ - public static AutoScaleProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AutoScaleProperties deserializedAutoScaleProperties = new AutoScaleProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("minNodeCount".equals(fieldName)) { - deserializedAutoScaleProperties.minNodeCount = reader.getNullable(JsonReader::getInt); - } else if ("enabled".equals(fieldName)) { - deserializedAutoScaleProperties.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("maxNodeCount".equals(fieldName)) { - deserializedAutoScaleProperties.maxNodeCount = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedAutoScaleProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.java deleted file mode 100644 index 4964bfdf4740..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The AutoSeasonality model. - */ -@Immutable -public final class AutoSeasonality extends Seasonality { - /* - * [Required] Seasonality mode. - */ - private SeasonalityMode mode = SeasonalityMode.AUTO; - - /** - * Creates an instance of AutoSeasonality class. - */ - public AutoSeasonality() { - } - - /** - * Get the mode property: [Required] Seasonality mode. - * - * @return the mode value. - */ - @Override - public SeasonalityMode mode() { - return this.mode; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AutoSeasonality from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AutoSeasonality if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AutoSeasonality. - */ - public static AutoSeasonality fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AutoSeasonality deserializedAutoSeasonality = new AutoSeasonality(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedAutoSeasonality.mode = SeasonalityMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAutoSeasonality; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.java deleted file mode 100644 index db38b2851e9c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The AutoTargetLags model. - */ -@Immutable -public final class AutoTargetLags extends TargetLags { - /* - * [Required] Set target lags mode - Auto/Custom - */ - private TargetLagsMode mode = TargetLagsMode.AUTO; - - /** - * Creates an instance of AutoTargetLags class. - */ - public AutoTargetLags() { - } - - /** - * Get the mode property: [Required] Set target lags mode - Auto/Custom. - * - * @return the mode value. - */ - @Override - public TargetLagsMode mode() { - return this.mode; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AutoTargetLags from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AutoTargetLags if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AutoTargetLags. - */ - public static AutoTargetLags fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AutoTargetLags deserializedAutoTargetLags = new AutoTargetLags(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedAutoTargetLags.mode = TargetLagsMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAutoTargetLags; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.java deleted file mode 100644 index e323336c4253..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Target lags rolling window determined automatically. - */ -@Immutable -public final class AutoTargetRollingWindowSize extends TargetRollingWindowSize { - /* - * [Required] TargetRollingWindowSiz detection mode. - */ - private TargetRollingWindowSizeMode mode = TargetRollingWindowSizeMode.AUTO; - - /** - * Creates an instance of AutoTargetRollingWindowSize class. - */ - public AutoTargetRollingWindowSize() { - } - - /** - * Get the mode property: [Required] TargetRollingWindowSiz detection mode. - * - * @return the mode value. - */ - @Override - public TargetRollingWindowSizeMode mode() { - return this.mode; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AutoTargetRollingWindowSize from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AutoTargetRollingWindowSize if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AutoTargetRollingWindowSize. - */ - public static AutoTargetRollingWindowSize fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AutoTargetRollingWindowSize deserializedAutoTargetRollingWindowSize = new AutoTargetRollingWindowSize(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedAutoTargetRollingWindowSize.mode - = TargetRollingWindowSizeMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAutoTargetRollingWindowSize; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.java deleted file mode 100644 index 2df4fb435612..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Auto save settings. - */ -public final class Autosave extends ExpandableStringEnum { - /** - * Static value None for Autosave. - */ - public static final Autosave NONE = fromString("None"); - - /** - * Static value Local for Autosave. - */ - public static final Autosave LOCAL = fromString("Local"); - - /** - * Static value Remote for Autosave. - */ - public static final Autosave REMOTE = fromString("Remote"); - - /** - * Creates a new instance of Autosave value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Autosave() { - } - - /** - * Creates or finds a Autosave from its string representation. - * - * @param name a name to look for. - * @return the corresponding Autosave. - */ - public static Autosave fromString(String name) { - return fromString(name, Autosave.class); - } - - /** - * Gets known Autosave values. - * - * @return known Autosave values. - */ - public static Collection values() { - return values(Autosave.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureBlobDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureBlobDatastore.java deleted file mode 100644 index 472b1f8d525d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureBlobDatastore.java +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Azure Blob datastore configuration. - */ -@Fluent -public final class AzureBlobDatastore extends DatastoreProperties { - /* - * [Required] Storage type backing the datastore. - */ - private DatastoreType datastoreType = DatastoreType.AZURE_BLOB; - - /* - * Storage account name. - */ - private String accountName; - - /* - * Storage account container name. - */ - private String containerName; - - /* - * Azure cloud endpoint for the storage account. - */ - private String endpoint; - - /* - * Protocol used to communicate with the storage account. - */ - private String protocol; - - /* - * Indicates which identity to use to authenticate service data access to customer's storage. - */ - private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; - - /* - * Azure Subscription Id - */ - private String subscriptionId; - - /* - * Azure Resource Group name - */ - private String resourceGroup; - - /* - * Readonly property to indicate if datastore is the workspace default datastore - */ - private Boolean isDefault; - - /** - * Creates an instance of AzureBlobDatastore class. - */ - public AzureBlobDatastore() { - } - - /** - * Get the datastoreType property: [Required] Storage type backing the datastore. - * - * @return the datastoreType value. - */ - @Override - public DatastoreType datastoreType() { - return this.datastoreType; - } - - /** - * Get the accountName property: Storage account name. - * - * @return the accountName value. - */ - public String accountName() { - return this.accountName; - } - - /** - * Set the accountName property: Storage account name. - * - * @param accountName the accountName value to set. - * @return the AzureBlobDatastore object itself. - */ - public AzureBlobDatastore withAccountName(String accountName) { - this.accountName = accountName; - return this; - } - - /** - * Get the containerName property: Storage account container name. - * - * @return the containerName value. - */ - public String containerName() { - return this.containerName; - } - - /** - * Set the containerName property: Storage account container name. - * - * @param containerName the containerName value to set. - * @return the AzureBlobDatastore object itself. - */ - public AzureBlobDatastore withContainerName(String containerName) { - this.containerName = containerName; - return this; - } - - /** - * Get the endpoint property: Azure cloud endpoint for the storage account. - * - * @return the endpoint value. - */ - public String endpoint() { - return this.endpoint; - } - - /** - * Set the endpoint property: Azure cloud endpoint for the storage account. - * - * @param endpoint the endpoint value to set. - * @return the AzureBlobDatastore object itself. - */ - public AzureBlobDatastore withEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * Get the protocol property: Protocol used to communicate with the storage account. - * - * @return the protocol value. - */ - public String protocol() { - return this.protocol; - } - - /** - * Set the protocol property: Protocol used to communicate with the storage account. - * - * @param protocol the protocol value to set. - * @return the AzureBlobDatastore object itself. - */ - public AzureBlobDatastore withProtocol(String protocol) { - this.protocol = protocol; - return this; - } - - /** - * Get the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data - * access to customer's storage. - * - * @return the serviceDataAccessAuthIdentity value. - */ - public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { - return this.serviceDataAccessAuthIdentity; - } - - /** - * Set the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data - * access to customer's storage. - * - * @param serviceDataAccessAuthIdentity the serviceDataAccessAuthIdentity value to set. - * @return the AzureBlobDatastore object itself. - */ - public AzureBlobDatastore - withServiceDataAccessAuthIdentity(ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity) { - this.serviceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; - return this; - } - - /** - * Get the subscriptionId property: Azure Subscription Id. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure Subscription Id. - * - * @param subscriptionId the subscriptionId value to set. - * @return the AzureBlobDatastore object itself. - */ - public AzureBlobDatastore withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the resourceGroup property: Azure Resource Group name. - * - * @return the resourceGroup value. - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup property: Azure Resource Group name. - * - * @param resourceGroup the resourceGroup value to set. - * @return the AzureBlobDatastore object itself. - */ - public AzureBlobDatastore withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - return this; - } - - /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. - * - * @return the isDefault value. - */ - @Override - public Boolean isDefault() { - return this.isDefault; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureBlobDatastore withCredentials(DatastoreCredentials credentials) { - super.withCredentials(credentials); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureBlobDatastore withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureBlobDatastore withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureBlobDatastore withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("credentials", credentials()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); - jsonWriter.writeStringField("accountName", this.accountName); - jsonWriter.writeStringField("containerName", this.containerName); - jsonWriter.writeStringField("endpoint", this.endpoint); - jsonWriter.writeStringField("protocol", this.protocol); - jsonWriter.writeStringField("serviceDataAccessAuthIdentity", - this.serviceDataAccessAuthIdentity == null ? null : this.serviceDataAccessAuthIdentity.toString()); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - jsonWriter.writeStringField("resourceGroup", this.resourceGroup); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureBlobDatastore from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureBlobDatastore if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AzureBlobDatastore. - */ - public static AzureBlobDatastore fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureBlobDatastore deserializedAzureBlobDatastore = new AzureBlobDatastore(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("credentials".equals(fieldName)) { - deserializedAzureBlobDatastore.withCredentials(DatastoreCredentials.fromJson(reader)); - } else if ("description".equals(fieldName)) { - deserializedAzureBlobDatastore.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureBlobDatastore.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureBlobDatastore.withProperties(properties); - } else if ("isDefault".equals(fieldName)) { - deserializedAzureBlobDatastore.isDefault = reader.getNullable(JsonReader::getBoolean); - } else if ("datastoreType".equals(fieldName)) { - deserializedAzureBlobDatastore.datastoreType = DatastoreType.fromString(reader.getString()); - } else if ("accountName".equals(fieldName)) { - deserializedAzureBlobDatastore.accountName = reader.getString(); - } else if ("containerName".equals(fieldName)) { - deserializedAzureBlobDatastore.containerName = reader.getString(); - } else if ("endpoint".equals(fieldName)) { - deserializedAzureBlobDatastore.endpoint = reader.getString(); - } else if ("protocol".equals(fieldName)) { - deserializedAzureBlobDatastore.protocol = reader.getString(); - } else if ("serviceDataAccessAuthIdentity".equals(fieldName)) { - deserializedAzureBlobDatastore.serviceDataAccessAuthIdentity - = ServiceDataAccessAuthIdentity.fromString(reader.getString()); - } else if ("subscriptionId".equals(fieldName)) { - deserializedAzureBlobDatastore.subscriptionId = reader.getString(); - } else if ("resourceGroup".equals(fieldName)) { - deserializedAzureBlobDatastore.resourceGroup = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureBlobDatastore; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen1Datastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen1Datastore.java deleted file mode 100644 index 1c46952a1c49..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen1Datastore.java +++ /dev/null @@ -1,278 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Azure Data Lake Gen1 datastore configuration. - */ -@Fluent -public final class AzureDataLakeGen1Datastore extends DatastoreProperties { - /* - * [Required] Storage type backing the datastore. - */ - private DatastoreType datastoreType = DatastoreType.AZURE_DATA_LAKE_GEN1; - - /* - * [Required] Azure Data Lake store name. - */ - private String storeName; - - /* - * Indicates which identity to use to authenticate service data access to customer's storage. - */ - private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; - - /* - * Azure Subscription Id - */ - private String subscriptionId; - - /* - * Azure Resource Group name - */ - private String resourceGroup; - - /* - * Readonly property to indicate if datastore is the workspace default datastore - */ - private Boolean isDefault; - - /** - * Creates an instance of AzureDataLakeGen1Datastore class. - */ - public AzureDataLakeGen1Datastore() { - } - - /** - * Get the datastoreType property: [Required] Storage type backing the datastore. - * - * @return the datastoreType value. - */ - @Override - public DatastoreType datastoreType() { - return this.datastoreType; - } - - /** - * Get the storeName property: [Required] Azure Data Lake store name. - * - * @return the storeName value. - */ - public String storeName() { - return this.storeName; - } - - /** - * Set the storeName property: [Required] Azure Data Lake store name. - * - * @param storeName the storeName value to set. - * @return the AzureDataLakeGen1Datastore object itself. - */ - public AzureDataLakeGen1Datastore withStoreName(String storeName) { - this.storeName = storeName; - return this; - } - - /** - * Get the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data - * access to customer's storage. - * - * @return the serviceDataAccessAuthIdentity value. - */ - public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { - return this.serviceDataAccessAuthIdentity; - } - - /** - * Set the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data - * access to customer's storage. - * - * @param serviceDataAccessAuthIdentity the serviceDataAccessAuthIdentity value to set. - * @return the AzureDataLakeGen1Datastore object itself. - */ - public AzureDataLakeGen1Datastore - withServiceDataAccessAuthIdentity(ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity) { - this.serviceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; - return this; - } - - /** - * Get the subscriptionId property: Azure Subscription Id. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure Subscription Id. - * - * @param subscriptionId the subscriptionId value to set. - * @return the AzureDataLakeGen1Datastore object itself. - */ - public AzureDataLakeGen1Datastore withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the resourceGroup property: Azure Resource Group name. - * - * @return the resourceGroup value. - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup property: Azure Resource Group name. - * - * @param resourceGroup the resourceGroup value to set. - * @return the AzureDataLakeGen1Datastore object itself. - */ - public AzureDataLakeGen1Datastore withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - return this; - } - - /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. - * - * @return the isDefault value. - */ - @Override - public Boolean isDefault() { - return this.isDefault; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureDataLakeGen1Datastore withCredentials(DatastoreCredentials credentials) { - super.withCredentials(credentials); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureDataLakeGen1Datastore withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureDataLakeGen1Datastore withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureDataLakeGen1Datastore withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (storeName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property storeName in model AzureDataLakeGen1Datastore")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AzureDataLakeGen1Datastore.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("credentials", credentials()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("storeName", this.storeName); - jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); - jsonWriter.writeStringField("serviceDataAccessAuthIdentity", - this.serviceDataAccessAuthIdentity == null ? null : this.serviceDataAccessAuthIdentity.toString()); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - jsonWriter.writeStringField("resourceGroup", this.resourceGroup); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureDataLakeGen1Datastore from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureDataLakeGen1Datastore if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AzureDataLakeGen1Datastore. - */ - public static AzureDataLakeGen1Datastore fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureDataLakeGen1Datastore deserializedAzureDataLakeGen1Datastore = new AzureDataLakeGen1Datastore(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("credentials".equals(fieldName)) { - deserializedAzureDataLakeGen1Datastore.withCredentials(DatastoreCredentials.fromJson(reader)); - } else if ("description".equals(fieldName)) { - deserializedAzureDataLakeGen1Datastore.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureDataLakeGen1Datastore.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureDataLakeGen1Datastore.withProperties(properties); - } else if ("isDefault".equals(fieldName)) { - deserializedAzureDataLakeGen1Datastore.isDefault = reader.getNullable(JsonReader::getBoolean); - } else if ("storeName".equals(fieldName)) { - deserializedAzureDataLakeGen1Datastore.storeName = reader.getString(); - } else if ("datastoreType".equals(fieldName)) { - deserializedAzureDataLakeGen1Datastore.datastoreType = DatastoreType.fromString(reader.getString()); - } else if ("serviceDataAccessAuthIdentity".equals(fieldName)) { - deserializedAzureDataLakeGen1Datastore.serviceDataAccessAuthIdentity - = ServiceDataAccessAuthIdentity.fromString(reader.getString()); - } else if ("subscriptionId".equals(fieldName)) { - deserializedAzureDataLakeGen1Datastore.subscriptionId = reader.getString(); - } else if ("resourceGroup".equals(fieldName)) { - deserializedAzureDataLakeGen1Datastore.resourceGroup = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureDataLakeGen1Datastore; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen2Datastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen2Datastore.java deleted file mode 100644 index cdf22c3f8a1c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen2Datastore.java +++ /dev/null @@ -1,367 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Azure Data Lake Gen2 datastore configuration. - */ -@Fluent -public final class AzureDataLakeGen2Datastore extends DatastoreProperties { - /* - * [Required] Storage type backing the datastore. - */ - private DatastoreType datastoreType = DatastoreType.AZURE_DATA_LAKE_GEN2; - - /* - * [Required] The name of the Data Lake Gen2 filesystem. - */ - private String filesystem; - - /* - * [Required] Storage account name. - */ - private String accountName; - - /* - * Azure cloud endpoint for the storage account. - */ - private String endpoint; - - /* - * Protocol used to communicate with the storage account. - */ - private String protocol; - - /* - * Indicates which identity to use to authenticate service data access to customer's storage. - */ - private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; - - /* - * Azure Subscription Id - */ - private String subscriptionId; - - /* - * Azure Resource Group name - */ - private String resourceGroup; - - /* - * Readonly property to indicate if datastore is the workspace default datastore - */ - private Boolean isDefault; - - /** - * Creates an instance of AzureDataLakeGen2Datastore class. - */ - public AzureDataLakeGen2Datastore() { - } - - /** - * Get the datastoreType property: [Required] Storage type backing the datastore. - * - * @return the datastoreType value. - */ - @Override - public DatastoreType datastoreType() { - return this.datastoreType; - } - - /** - * Get the filesystem property: [Required] The name of the Data Lake Gen2 filesystem. - * - * @return the filesystem value. - */ - public String filesystem() { - return this.filesystem; - } - - /** - * Set the filesystem property: [Required] The name of the Data Lake Gen2 filesystem. - * - * @param filesystem the filesystem value to set. - * @return the AzureDataLakeGen2Datastore object itself. - */ - public AzureDataLakeGen2Datastore withFilesystem(String filesystem) { - this.filesystem = filesystem; - return this; - } - - /** - * Get the accountName property: [Required] Storage account name. - * - * @return the accountName value. - */ - public String accountName() { - return this.accountName; - } - - /** - * Set the accountName property: [Required] Storage account name. - * - * @param accountName the accountName value to set. - * @return the AzureDataLakeGen2Datastore object itself. - */ - public AzureDataLakeGen2Datastore withAccountName(String accountName) { - this.accountName = accountName; - return this; - } - - /** - * Get the endpoint property: Azure cloud endpoint for the storage account. - * - * @return the endpoint value. - */ - public String endpoint() { - return this.endpoint; - } - - /** - * Set the endpoint property: Azure cloud endpoint for the storage account. - * - * @param endpoint the endpoint value to set. - * @return the AzureDataLakeGen2Datastore object itself. - */ - public AzureDataLakeGen2Datastore withEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * Get the protocol property: Protocol used to communicate with the storage account. - * - * @return the protocol value. - */ - public String protocol() { - return this.protocol; - } - - /** - * Set the protocol property: Protocol used to communicate with the storage account. - * - * @param protocol the protocol value to set. - * @return the AzureDataLakeGen2Datastore object itself. - */ - public AzureDataLakeGen2Datastore withProtocol(String protocol) { - this.protocol = protocol; - return this; - } - - /** - * Get the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data - * access to customer's storage. - * - * @return the serviceDataAccessAuthIdentity value. - */ - public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { - return this.serviceDataAccessAuthIdentity; - } - - /** - * Set the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data - * access to customer's storage. - * - * @param serviceDataAccessAuthIdentity the serviceDataAccessAuthIdentity value to set. - * @return the AzureDataLakeGen2Datastore object itself. - */ - public AzureDataLakeGen2Datastore - withServiceDataAccessAuthIdentity(ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity) { - this.serviceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; - return this; - } - - /** - * Get the subscriptionId property: Azure Subscription Id. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure Subscription Id. - * - * @param subscriptionId the subscriptionId value to set. - * @return the AzureDataLakeGen2Datastore object itself. - */ - public AzureDataLakeGen2Datastore withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the resourceGroup property: Azure Resource Group name. - * - * @return the resourceGroup value. - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup property: Azure Resource Group name. - * - * @param resourceGroup the resourceGroup value to set. - * @return the AzureDataLakeGen2Datastore object itself. - */ - public AzureDataLakeGen2Datastore withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - return this; - } - - /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. - * - * @return the isDefault value. - */ - @Override - public Boolean isDefault() { - return this.isDefault; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureDataLakeGen2Datastore withCredentials(DatastoreCredentials credentials) { - super.withCredentials(credentials); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureDataLakeGen2Datastore withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureDataLakeGen2Datastore withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureDataLakeGen2Datastore withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (filesystem() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property filesystem in model AzureDataLakeGen2Datastore")); - } - if (accountName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property accountName in model AzureDataLakeGen2Datastore")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AzureDataLakeGen2Datastore.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("credentials", credentials()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("filesystem", this.filesystem); - jsonWriter.writeStringField("accountName", this.accountName); - jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); - jsonWriter.writeStringField("endpoint", this.endpoint); - jsonWriter.writeStringField("protocol", this.protocol); - jsonWriter.writeStringField("serviceDataAccessAuthIdentity", - this.serviceDataAccessAuthIdentity == null ? null : this.serviceDataAccessAuthIdentity.toString()); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - jsonWriter.writeStringField("resourceGroup", this.resourceGroup); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureDataLakeGen2Datastore from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureDataLakeGen2Datastore if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AzureDataLakeGen2Datastore. - */ - public static AzureDataLakeGen2Datastore fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureDataLakeGen2Datastore deserializedAzureDataLakeGen2Datastore = new AzureDataLakeGen2Datastore(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("credentials".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.withCredentials(DatastoreCredentials.fromJson(reader)); - } else if ("description".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureDataLakeGen2Datastore.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureDataLakeGen2Datastore.withProperties(properties); - } else if ("isDefault".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.isDefault = reader.getNullable(JsonReader::getBoolean); - } else if ("filesystem".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.filesystem = reader.getString(); - } else if ("accountName".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.accountName = reader.getString(); - } else if ("datastoreType".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.datastoreType = DatastoreType.fromString(reader.getString()); - } else if ("endpoint".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.endpoint = reader.getString(); - } else if ("protocol".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.protocol = reader.getString(); - } else if ("serviceDataAccessAuthIdentity".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.serviceDataAccessAuthIdentity - = ServiceDataAccessAuthIdentity.fromString(reader.getString()); - } else if ("subscriptionId".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.subscriptionId = reader.getString(); - } else if ("resourceGroup".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.resourceGroup = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureDataLakeGen2Datastore; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDatastore.java deleted file mode 100644 index f358e4ee4c35..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDatastore.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base definition for Azure datastore contents configuration. - */ -@Fluent -public class AzureDatastore implements JsonSerializable { - /* - * Azure Subscription Id - */ - private String subscriptionId; - - /* - * Azure Resource Group name - */ - private String resourceGroup; - - /** - * Creates an instance of AzureDatastore class. - */ - public AzureDatastore() { - } - - /** - * Get the subscriptionId property: Azure Subscription Id. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure Subscription Id. - * - * @param subscriptionId the subscriptionId value to set. - * @return the AzureDatastore object itself. - */ - public AzureDatastore withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the resourceGroup property: Azure Resource Group name. - * - * @return the resourceGroup value. - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup property: Azure Resource Group name. - * - * @param resourceGroup the resourceGroup value to set. - * @return the AzureDatastore object itself. - */ - public AzureDatastore withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - jsonWriter.writeStringField("resourceGroup", this.resourceGroup); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureDatastore from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureDatastore if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureDatastore. - */ - public static AzureDatastore fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureDatastore deserializedAzureDatastore = new AzureDatastore(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("subscriptionId".equals(fieldName)) { - deserializedAzureDatastore.subscriptionId = reader.getString(); - } else if ("resourceGroup".equals(fieldName)) { - deserializedAzureDatastore.resourceGroup = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureDatastore; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDevOpsWebhook.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDevOpsWebhook.java deleted file mode 100644 index d9c92e528d79..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDevOpsWebhook.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Webhook details specific for Azure DevOps. - */ -@Fluent -public final class AzureDevOpsWebhook extends Webhook { - /* - * [Required] Specifies the type of service to send a callback - */ - private WebhookType webhookType = WebhookType.AZURE_DEV_OPS; - - /** - * Creates an instance of AzureDevOpsWebhook class. - */ - public AzureDevOpsWebhook() { - } - - /** - * Get the webhookType property: [Required] Specifies the type of service to send a callback. - * - * @return the webhookType value. - */ - @Override - public WebhookType webhookType() { - return this.webhookType; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureDevOpsWebhook withEventType(String eventType) { - super.withEventType(eventType); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("eventType", eventType()); - jsonWriter.writeStringField("webhookType", this.webhookType == null ? null : this.webhookType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureDevOpsWebhook from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureDevOpsWebhook if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureDevOpsWebhook. - */ - public static AzureDevOpsWebhook fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureDevOpsWebhook deserializedAzureDevOpsWebhook = new AzureDevOpsWebhook(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("eventType".equals(fieldName)) { - deserializedAzureDevOpsWebhook.withEventType(reader.getString()); - } else if ("webhookType".equals(fieldName)) { - deserializedAzureDevOpsWebhook.webhookType = WebhookType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureDevOpsWebhook; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureFileDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureFileDatastore.java deleted file mode 100644 index 6896cf837ca5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureFileDatastore.java +++ /dev/null @@ -1,366 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Azure File datastore configuration. - */ -@Fluent -public final class AzureFileDatastore extends DatastoreProperties { - /* - * [Required] Storage type backing the datastore. - */ - private DatastoreType datastoreType = DatastoreType.AZURE_FILE; - - /* - * [Required] Storage account name. - */ - private String accountName; - - /* - * [Required] The name of the Azure file share that the datastore points to. - */ - private String fileShareName; - - /* - * Azure cloud endpoint for the storage account. - */ - private String endpoint; - - /* - * Protocol used to communicate with the storage account. - */ - private String protocol; - - /* - * Indicates which identity to use to authenticate service data access to customer's storage. - */ - private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; - - /* - * Azure Subscription Id - */ - private String subscriptionId; - - /* - * Azure Resource Group name - */ - private String resourceGroup; - - /* - * Readonly property to indicate if datastore is the workspace default datastore - */ - private Boolean isDefault; - - /** - * Creates an instance of AzureFileDatastore class. - */ - public AzureFileDatastore() { - } - - /** - * Get the datastoreType property: [Required] Storage type backing the datastore. - * - * @return the datastoreType value. - */ - @Override - public DatastoreType datastoreType() { - return this.datastoreType; - } - - /** - * Get the accountName property: [Required] Storage account name. - * - * @return the accountName value. - */ - public String accountName() { - return this.accountName; - } - - /** - * Set the accountName property: [Required] Storage account name. - * - * @param accountName the accountName value to set. - * @return the AzureFileDatastore object itself. - */ - public AzureFileDatastore withAccountName(String accountName) { - this.accountName = accountName; - return this; - } - - /** - * Get the fileShareName property: [Required] The name of the Azure file share that the datastore points to. - * - * @return the fileShareName value. - */ - public String fileShareName() { - return this.fileShareName; - } - - /** - * Set the fileShareName property: [Required] The name of the Azure file share that the datastore points to. - * - * @param fileShareName the fileShareName value to set. - * @return the AzureFileDatastore object itself. - */ - public AzureFileDatastore withFileShareName(String fileShareName) { - this.fileShareName = fileShareName; - return this; - } - - /** - * Get the endpoint property: Azure cloud endpoint for the storage account. - * - * @return the endpoint value. - */ - public String endpoint() { - return this.endpoint; - } - - /** - * Set the endpoint property: Azure cloud endpoint for the storage account. - * - * @param endpoint the endpoint value to set. - * @return the AzureFileDatastore object itself. - */ - public AzureFileDatastore withEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * Get the protocol property: Protocol used to communicate with the storage account. - * - * @return the protocol value. - */ - public String protocol() { - return this.protocol; - } - - /** - * Set the protocol property: Protocol used to communicate with the storage account. - * - * @param protocol the protocol value to set. - * @return the AzureFileDatastore object itself. - */ - public AzureFileDatastore withProtocol(String protocol) { - this.protocol = protocol; - return this; - } - - /** - * Get the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data - * access to customer's storage. - * - * @return the serviceDataAccessAuthIdentity value. - */ - public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { - return this.serviceDataAccessAuthIdentity; - } - - /** - * Set the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data - * access to customer's storage. - * - * @param serviceDataAccessAuthIdentity the serviceDataAccessAuthIdentity value to set. - * @return the AzureFileDatastore object itself. - */ - public AzureFileDatastore - withServiceDataAccessAuthIdentity(ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity) { - this.serviceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; - return this; - } - - /** - * Get the subscriptionId property: Azure Subscription Id. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure Subscription Id. - * - * @param subscriptionId the subscriptionId value to set. - * @return the AzureFileDatastore object itself. - */ - public AzureFileDatastore withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the resourceGroup property: Azure Resource Group name. - * - * @return the resourceGroup value. - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup property: Azure Resource Group name. - * - * @param resourceGroup the resourceGroup value to set. - * @return the AzureFileDatastore object itself. - */ - public AzureFileDatastore withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - return this; - } - - /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. - * - * @return the isDefault value. - */ - @Override - public Boolean isDefault() { - return this.isDefault; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureFileDatastore withCredentials(DatastoreCredentials credentials) { - super.withCredentials(credentials); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureFileDatastore withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureFileDatastore withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureFileDatastore withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (accountName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property accountName in model AzureFileDatastore")); - } - if (fileShareName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property fileShareName in model AzureFileDatastore")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AzureFileDatastore.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("credentials", credentials()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("accountName", this.accountName); - jsonWriter.writeStringField("fileShareName", this.fileShareName); - jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); - jsonWriter.writeStringField("endpoint", this.endpoint); - jsonWriter.writeStringField("protocol", this.protocol); - jsonWriter.writeStringField("serviceDataAccessAuthIdentity", - this.serviceDataAccessAuthIdentity == null ? null : this.serviceDataAccessAuthIdentity.toString()); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - jsonWriter.writeStringField("resourceGroup", this.resourceGroup); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureFileDatastore from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureFileDatastore if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AzureFileDatastore. - */ - public static AzureFileDatastore fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureFileDatastore deserializedAzureFileDatastore = new AzureFileDatastore(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("credentials".equals(fieldName)) { - deserializedAzureFileDatastore.withCredentials(DatastoreCredentials.fromJson(reader)); - } else if ("description".equals(fieldName)) { - deserializedAzureFileDatastore.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureFileDatastore.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureFileDatastore.withProperties(properties); - } else if ("isDefault".equals(fieldName)) { - deserializedAzureFileDatastore.isDefault = reader.getNullable(JsonReader::getBoolean); - } else if ("accountName".equals(fieldName)) { - deserializedAzureFileDatastore.accountName = reader.getString(); - } else if ("fileShareName".equals(fieldName)) { - deserializedAzureFileDatastore.fileShareName = reader.getString(); - } else if ("datastoreType".equals(fieldName)) { - deserializedAzureFileDatastore.datastoreType = DatastoreType.fromString(reader.getString()); - } else if ("endpoint".equals(fieldName)) { - deserializedAzureFileDatastore.endpoint = reader.getString(); - } else if ("protocol".equals(fieldName)) { - deserializedAzureFileDatastore.protocol = reader.getString(); - } else if ("serviceDataAccessAuthIdentity".equals(fieldName)) { - deserializedAzureFileDatastore.serviceDataAccessAuthIdentity - = ServiceDataAccessAuthIdentity.fromString(reader.getString()); - } else if ("subscriptionId".equals(fieldName)) { - deserializedAzureFileDatastore.subscriptionId = reader.getString(); - } else if ("resourceGroup".equals(fieldName)) { - deserializedAzureFileDatastore.resourceGroup = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureFileDatastore; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.java deleted file mode 100644 index a1a49af990d9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation. - */ -@Fluent -public final class BanditPolicy extends EarlyTerminationPolicy { - /* - * [Required] Name of policy configuration - */ - private EarlyTerminationPolicyType policyType = EarlyTerminationPolicyType.BANDIT; - - /* - * Ratio of the allowed distance from the best performing run. - */ - private Float slackFactor; - - /* - * Absolute distance allowed from the best performing run. - */ - private Float slackAmount; - - /** - * Creates an instance of BanditPolicy class. - */ - public BanditPolicy() { - } - - /** - * Get the policyType property: [Required] Name of policy configuration. - * - * @return the policyType value. - */ - @Override - public EarlyTerminationPolicyType policyType() { - return this.policyType; - } - - /** - * Get the slackFactor property: Ratio of the allowed distance from the best performing run. - * - * @return the slackFactor value. - */ - public Float slackFactor() { - return this.slackFactor; - } - - /** - * Set the slackFactor property: Ratio of the allowed distance from the best performing run. - * - * @param slackFactor the slackFactor value to set. - * @return the BanditPolicy object itself. - */ - public BanditPolicy withSlackFactor(Float slackFactor) { - this.slackFactor = slackFactor; - return this; - } - - /** - * Get the slackAmount property: Absolute distance allowed from the best performing run. - * - * @return the slackAmount value. - */ - public Float slackAmount() { - return this.slackAmount; - } - - /** - * Set the slackAmount property: Absolute distance allowed from the best performing run. - * - * @param slackAmount the slackAmount value to set. - * @return the BanditPolicy object itself. - */ - public BanditPolicy withSlackAmount(Float slackAmount) { - this.slackAmount = slackAmount; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BanditPolicy withEvaluationInterval(Integer evaluationInterval) { - super.withEvaluationInterval(evaluationInterval); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BanditPolicy withDelayEvaluation(Integer delayEvaluation) { - super.withDelayEvaluation(delayEvaluation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("evaluationInterval", evaluationInterval()); - jsonWriter.writeNumberField("delayEvaluation", delayEvaluation()); - jsonWriter.writeStringField("policyType", this.policyType == null ? null : this.policyType.toString()); - jsonWriter.writeNumberField("slackFactor", this.slackFactor); - jsonWriter.writeNumberField("slackAmount", this.slackAmount); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BanditPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BanditPolicy if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the BanditPolicy. - */ - public static BanditPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BanditPolicy deserializedBanditPolicy = new BanditPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("evaluationInterval".equals(fieldName)) { - deserializedBanditPolicy.withEvaluationInterval(reader.getNullable(JsonReader::getInt)); - } else if ("delayEvaluation".equals(fieldName)) { - deserializedBanditPolicy.withDelayEvaluation(reader.getNullable(JsonReader::getInt)); - } else if ("policyType".equals(fieldName)) { - deserializedBanditPolicy.policyType = EarlyTerminationPolicyType.fromString(reader.getString()); - } else if ("slackFactor".equals(fieldName)) { - deserializedBanditPolicy.slackFactor = reader.getNullable(JsonReader::getFloat); - } else if ("slackAmount".equals(fieldName)) { - deserializedBanditPolicy.slackAmount = reader.getNullable(JsonReader::getFloat); - } else { - reader.skipChildren(); - } - } - - return deserializedBanditPolicy; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java deleted file mode 100644 index b79d166cd256..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java +++ /dev/null @@ -1,333 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; -import java.util.Map; - -/** - * An immutable client-side representation of BatchDeployment. - */ -public interface BatchDeployment { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - BatchDeploymentProperties properties(); - - /** - * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - String kind(); - - /** - * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - Sku sku(); - - /** - * 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.machinelearning.fluent.models.BatchDeploymentInner object. - * - * @return the inner object. - */ - BatchDeploymentInner innerModel(); - - /** - * The entirety of the BatchDeployment definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The BatchDeployment definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the BatchDeployment definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the BatchDeployment 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 BatchDeployment definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, endpointName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @return the next definition stage. - */ - WithProperties withExistingBatchEndpoint(String resourceGroupName, String workspaceName, - String endpointName); - } - - /** - * The stage of the BatchDeployment definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(BatchDeploymentProperties properties); - } - - /** - * The stage of the BatchDeployment 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.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithSku { - /** - * Executes the create request. - * - * @return the created resource. - */ - BatchDeployment create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - BatchDeployment create(Context context); - } - - /** - * The stage of the BatchDeployment 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 BatchDeployment definition allowing to specify kind. - */ - interface WithKind { - /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. - * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. - * @return the next definition stage. - */ - WithCreate withKind(String kind); - } - - /** - * The stage of the BatchDeployment definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the BatchDeployment definition allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. - * - * @param sku Sku details required for ARM contract for Autoscaling. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - } - - /** - * Begins update for the BatchDeployment resource. - * - * @return the stage of resource update. - */ - BatchDeployment.Update update(); - - /** - * The template for BatchDeployment update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - BatchDeployment apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - BatchDeployment apply(Context context); - } - - /** - * The BatchDeployment update stages. - */ - interface UpdateStages { - /** - * The stage of the BatchDeployment 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 BatchDeployment update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Additional attributes of the entity.. - * - * @param properties Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(PartialBatchDeployment properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - BatchDeployment refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - BatchDeployment refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfiguration.java deleted file mode 100644 index 9cb759f0b14f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfiguration.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties relevant to different deployment types. - */ -@Immutable -public class BatchDeploymentConfiguration implements JsonSerializable { - /* - * [Required] The type of the deployment - */ - private BatchDeploymentConfigurationType deploymentConfigurationType - = BatchDeploymentConfigurationType.fromString("BatchDeploymentConfiguration"); - - /** - * Creates an instance of BatchDeploymentConfiguration class. - */ - public BatchDeploymentConfiguration() { - } - - /** - * Get the deploymentConfigurationType property: [Required] The type of the deployment. - * - * @return the deploymentConfigurationType value. - */ - public BatchDeploymentConfigurationType deploymentConfigurationType() { - return this.deploymentConfigurationType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deploymentConfigurationType", - this.deploymentConfigurationType == null ? null : this.deploymentConfigurationType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BatchDeploymentConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BatchDeploymentConfiguration if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BatchDeploymentConfiguration. - */ - public static BatchDeploymentConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("deploymentConfigurationType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("PipelineComponent".equals(discriminatorValue)) { - return BatchPipelineComponentDeploymentConfiguration.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static BatchDeploymentConfiguration fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BatchDeploymentConfiguration deserializedBatchDeploymentConfiguration = new BatchDeploymentConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentConfigurationType".equals(fieldName)) { - deserializedBatchDeploymentConfiguration.deploymentConfigurationType - = BatchDeploymentConfigurationType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBatchDeploymentConfiguration; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfigurationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfigurationType.java deleted file mode 100644 index bf9f0030c2ae..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfigurationType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The enumerated property types for batch deployments. - */ -public final class BatchDeploymentConfigurationType extends ExpandableStringEnum { - /** - * Static value Model for BatchDeploymentConfigurationType. - */ - public static final BatchDeploymentConfigurationType MODEL = fromString("Model"); - - /** - * Static value PipelineComponent for BatchDeploymentConfigurationType. - */ - public static final BatchDeploymentConfigurationType PIPELINE_COMPONENT = fromString("PipelineComponent"); - - /** - * Creates a new instance of BatchDeploymentConfigurationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BatchDeploymentConfigurationType() { - } - - /** - * Creates or finds a BatchDeploymentConfigurationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding BatchDeploymentConfigurationType. - */ - public static BatchDeploymentConfigurationType fromString(String name) { - return fromString(name, BatchDeploymentConfigurationType.class); - } - - /** - * Gets known BatchDeploymentConfigurationType values. - * - * @return known BatchDeploymentConfigurationType values. - */ - public static Collection values() { - return values(BatchDeploymentConfigurationType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java deleted file mode 100644 index c42c99f95b9c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java +++ /dev/null @@ -1,495 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Batch inference settings per deployment. - */ -@Fluent -public final class BatchDeploymentProperties extends EndpointDeploymentPropertiesBase { - /* - * Compute target for batch inference operation. - */ - private String compute; - - /* - * Properties relevant to different deployment types. - */ - private BatchDeploymentConfiguration deploymentConfiguration; - - /* - * Error threshold, if the error count for the entire input goes above this value, - * the batch inference will be aborted. Range is [-1, int.MaxValue]. - * For FileDataset, this value is the count of file failures. - * For TabularDataset, this value is the count of record failures. - * If set to -1 (the lower bound), all failures during batch inference will be ignored. - */ - private Integer errorThreshold; - - /* - * Retry Settings for the batch inference operation. - * If not provided, will default to the defaults defined in BatchRetrySettings. - */ - private BatchRetrySettings retrySettings; - - /* - * Size of the mini-batch passed to each batch invocation. - * For FileDataset, this is the number of files per mini-batch. - * For TabularDataset, this is the size of the records in bytes, per mini-batch. - */ - private Long miniBatchSize; - - /* - * Logging level for batch inference operation. - */ - private BatchLoggingLevel loggingLevel; - - /* - * Reference to the model asset for the endpoint deployment. - */ - private AssetReferenceBase model; - - /* - * Indicates maximum number of parallelism per instance. - */ - private Integer maxConcurrencyPerInstance; - - /* - * Indicates how the output will be organized. - */ - private BatchOutputAction outputAction; - - /* - * Customized output file name for append_row output action. - */ - private String outputFileName; - - /* - * Indicates compute configuration for the job. - * If not provided, will default to the defaults defined in ResourceConfiguration. - */ - private DeploymentResourceConfiguration resources; - - /* - * Provisioning state for the endpoint deployment. - */ - private DeploymentProvisioningState provisioningState; - - /** - * Creates an instance of BatchDeploymentProperties class. - */ - public BatchDeploymentProperties() { - } - - /** - * Get the compute property: Compute target for batch inference operation. - * - * @return the compute value. - */ - public String compute() { - return this.compute; - } - - /** - * Set the compute property: Compute target for batch inference operation. - * - * @param compute the compute value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withCompute(String compute) { - this.compute = compute; - return this; - } - - /** - * Get the deploymentConfiguration property: Properties relevant to different deployment types. - * - * @return the deploymentConfiguration value. - */ - public BatchDeploymentConfiguration deploymentConfiguration() { - return this.deploymentConfiguration; - } - - /** - * Set the deploymentConfiguration property: Properties relevant to different deployment types. - * - * @param deploymentConfiguration the deploymentConfiguration value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withDeploymentConfiguration(BatchDeploymentConfiguration deploymentConfiguration) { - this.deploymentConfiguration = deploymentConfiguration; - return this; - } - - /** - * Get the errorThreshold property: Error threshold, if the error count for the entire input goes above this value, - * the batch inference will be aborted. Range is [-1, int.MaxValue]. - * For FileDataset, this value is the count of file failures. - * For TabularDataset, this value is the count of record failures. - * If set to -1 (the lower bound), all failures during batch inference will be ignored. - * - * @return the errorThreshold value. - */ - public Integer errorThreshold() { - return this.errorThreshold; - } - - /** - * Set the errorThreshold property: Error threshold, if the error count for the entire input goes above this value, - * the batch inference will be aborted. Range is [-1, int.MaxValue]. - * For FileDataset, this value is the count of file failures. - * For TabularDataset, this value is the count of record failures. - * If set to -1 (the lower bound), all failures during batch inference will be ignored. - * - * @param errorThreshold the errorThreshold value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withErrorThreshold(Integer errorThreshold) { - this.errorThreshold = errorThreshold; - return this; - } - - /** - * Get the retrySettings property: Retry Settings for the batch inference operation. - * If not provided, will default to the defaults defined in BatchRetrySettings. - * - * @return the retrySettings value. - */ - public BatchRetrySettings retrySettings() { - return this.retrySettings; - } - - /** - * Set the retrySettings property: Retry Settings for the batch inference operation. - * If not provided, will default to the defaults defined in BatchRetrySettings. - * - * @param retrySettings the retrySettings value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withRetrySettings(BatchRetrySettings retrySettings) { - this.retrySettings = retrySettings; - return this; - } - - /** - * Get the miniBatchSize property: Size of the mini-batch passed to each batch invocation. - * For FileDataset, this is the number of files per mini-batch. - * For TabularDataset, this is the size of the records in bytes, per mini-batch. - * - * @return the miniBatchSize value. - */ - public Long miniBatchSize() { - return this.miniBatchSize; - } - - /** - * Set the miniBatchSize property: Size of the mini-batch passed to each batch invocation. - * For FileDataset, this is the number of files per mini-batch. - * For TabularDataset, this is the size of the records in bytes, per mini-batch. - * - * @param miniBatchSize the miniBatchSize value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withMiniBatchSize(Long miniBatchSize) { - this.miniBatchSize = miniBatchSize; - return this; - } - - /** - * Get the loggingLevel property: Logging level for batch inference operation. - * - * @return the loggingLevel value. - */ - public BatchLoggingLevel loggingLevel() { - return this.loggingLevel; - } - - /** - * Set the loggingLevel property: Logging level for batch inference operation. - * - * @param loggingLevel the loggingLevel value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withLoggingLevel(BatchLoggingLevel loggingLevel) { - this.loggingLevel = loggingLevel; - return this; - } - - /** - * Get the model property: Reference to the model asset for the endpoint deployment. - * - * @return the model value. - */ - public AssetReferenceBase model() { - return this.model; - } - - /** - * Set the model property: Reference to the model asset for the endpoint deployment. - * - * @param model the model value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withModel(AssetReferenceBase model) { - this.model = model; - return this; - } - - /** - * Get the maxConcurrencyPerInstance property: Indicates maximum number of parallelism per instance. - * - * @return the maxConcurrencyPerInstance value. - */ - public Integer maxConcurrencyPerInstance() { - return this.maxConcurrencyPerInstance; - } - - /** - * Set the maxConcurrencyPerInstance property: Indicates maximum number of parallelism per instance. - * - * @param maxConcurrencyPerInstance the maxConcurrencyPerInstance value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withMaxConcurrencyPerInstance(Integer maxConcurrencyPerInstance) { - this.maxConcurrencyPerInstance = maxConcurrencyPerInstance; - return this; - } - - /** - * Get the outputAction property: Indicates how the output will be organized. - * - * @return the outputAction value. - */ - public BatchOutputAction outputAction() { - return this.outputAction; - } - - /** - * Set the outputAction property: Indicates how the output will be organized. - * - * @param outputAction the outputAction value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withOutputAction(BatchOutputAction outputAction) { - this.outputAction = outputAction; - return this; - } - - /** - * Get the outputFileName property: Customized output file name for append_row output action. - * - * @return the outputFileName value. - */ - public String outputFileName() { - return this.outputFileName; - } - - /** - * Set the outputFileName property: Customized output file name for append_row output action. - * - * @param outputFileName the outputFileName value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withOutputFileName(String outputFileName) { - this.outputFileName = outputFileName; - return this; - } - - /** - * Get the resources property: Indicates compute configuration for the job. - * If not provided, will default to the defaults defined in ResourceConfiguration. - * - * @return the resources value. - */ - public DeploymentResourceConfiguration resources() { - return this.resources; - } - - /** - * Set the resources property: Indicates compute configuration for the job. - * If not provided, will default to the defaults defined in ResourceConfiguration. - * - * @param resources the resources value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withResources(DeploymentResourceConfiguration resources) { - this.resources = resources; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the endpoint deployment. - * - * @return the provisioningState value. - */ - public DeploymentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public BatchDeploymentProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BatchDeploymentProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BatchDeploymentProperties withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BatchDeploymentProperties withEnvironmentId(String environmentId) { - super.withEnvironmentId(environmentId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BatchDeploymentProperties withEnvironmentVariables(Map environmentVariables) { - super.withEnvironmentVariables(environmentVariables); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (deploymentConfiguration() != null) { - deploymentConfiguration().validate(); - } - if (retrySettings() != null) { - retrySettings().validate(); - } - if (model() != null) { - model().validate(); - } - if (resources() != null) { - resources().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("codeConfiguration", codeConfiguration()); - jsonWriter.writeStringField("environmentId", environmentId()); - jsonWriter.writeMapField("environmentVariables", environmentVariables(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("compute", this.compute); - jsonWriter.writeJsonField("deploymentConfiguration", this.deploymentConfiguration); - jsonWriter.writeNumberField("errorThreshold", this.errorThreshold); - jsonWriter.writeJsonField("retrySettings", this.retrySettings); - jsonWriter.writeNumberField("miniBatchSize", this.miniBatchSize); - jsonWriter.writeStringField("loggingLevel", this.loggingLevel == null ? null : this.loggingLevel.toString()); - jsonWriter.writeJsonField("model", this.model); - jsonWriter.writeNumberField("maxConcurrencyPerInstance", this.maxConcurrencyPerInstance); - jsonWriter.writeStringField("outputAction", this.outputAction == null ? null : this.outputAction.toString()); - jsonWriter.writeStringField("outputFileName", this.outputFileName); - jsonWriter.writeJsonField("resources", this.resources); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BatchDeploymentProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BatchDeploymentProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BatchDeploymentProperties. - */ - public static BatchDeploymentProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BatchDeploymentProperties deserializedBatchDeploymentProperties = new BatchDeploymentProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedBatchDeploymentProperties.withDescription(reader.getString()); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedBatchDeploymentProperties.withProperties(properties); - } else if ("codeConfiguration".equals(fieldName)) { - deserializedBatchDeploymentProperties.withCodeConfiguration(CodeConfiguration.fromJson(reader)); - } else if ("environmentId".equals(fieldName)) { - deserializedBatchDeploymentProperties.withEnvironmentId(reader.getString()); - } else if ("environmentVariables".equals(fieldName)) { - Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); - deserializedBatchDeploymentProperties.withEnvironmentVariables(environmentVariables); - } else if ("compute".equals(fieldName)) { - deserializedBatchDeploymentProperties.compute = reader.getString(); - } else if ("deploymentConfiguration".equals(fieldName)) { - deserializedBatchDeploymentProperties.deploymentConfiguration - = BatchDeploymentConfiguration.fromJson(reader); - } else if ("errorThreshold".equals(fieldName)) { - deserializedBatchDeploymentProperties.errorThreshold = reader.getNullable(JsonReader::getInt); - } else if ("retrySettings".equals(fieldName)) { - deserializedBatchDeploymentProperties.retrySettings = BatchRetrySettings.fromJson(reader); - } else if ("miniBatchSize".equals(fieldName)) { - deserializedBatchDeploymentProperties.miniBatchSize = reader.getNullable(JsonReader::getLong); - } else if ("loggingLevel".equals(fieldName)) { - deserializedBatchDeploymentProperties.loggingLevel - = BatchLoggingLevel.fromString(reader.getString()); - } else if ("model".equals(fieldName)) { - deserializedBatchDeploymentProperties.model = AssetReferenceBase.fromJson(reader); - } else if ("maxConcurrencyPerInstance".equals(fieldName)) { - deserializedBatchDeploymentProperties.maxConcurrencyPerInstance - = reader.getNullable(JsonReader::getInt); - } else if ("outputAction".equals(fieldName)) { - deserializedBatchDeploymentProperties.outputAction - = BatchOutputAction.fromString(reader.getString()); - } else if ("outputFileName".equals(fieldName)) { - deserializedBatchDeploymentProperties.outputFileName = reader.getString(); - } else if ("resources".equals(fieldName)) { - deserializedBatchDeploymentProperties.resources = DeploymentResourceConfiguration.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedBatchDeploymentProperties.provisioningState - = DeploymentProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBatchDeploymentProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentTrackedResourceArmPaginatedResult.java deleted file mode 100644 index e51a5f0a5748..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentTrackedResourceArmPaginatedResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of BatchDeployment entities. - */ -@Fluent -public final class BatchDeploymentTrackedResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type BatchDeployment. - */ - private List value; - - /* - * The link to the next page of BatchDeployment objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of BatchDeploymentTrackedResourceArmPaginatedResult class. - */ - public BatchDeploymentTrackedResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type BatchDeployment. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type BatchDeployment. - * - * @param value the value value to set. - * @return the BatchDeploymentTrackedResourceArmPaginatedResult object itself. - */ - public BatchDeploymentTrackedResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of BatchDeployment objects. If null, there are no additional - * pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of BatchDeployment objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the BatchDeploymentTrackedResourceArmPaginatedResult object itself. - */ - public BatchDeploymentTrackedResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BatchDeploymentTrackedResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BatchDeploymentTrackedResourceArmPaginatedResult if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BatchDeploymentTrackedResourceArmPaginatedResult. - */ - public static BatchDeploymentTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BatchDeploymentTrackedResourceArmPaginatedResult deserializedBatchDeploymentTrackedResourceArmPaginatedResult - = new BatchDeploymentTrackedResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> BatchDeploymentInner.fromJson(reader1)); - deserializedBatchDeploymentTrackedResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedBatchDeploymentTrackedResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBatchDeploymentTrackedResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployments.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployments.java deleted file mode 100644 index e01f17695683..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployments.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.machinelearning.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 BatchDeployments. - */ -public interface BatchDeployments { - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @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 a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @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 a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, - String orderBy, Integer top, String skip, Context context); - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - Context context); - - /** - * Gets a batch inference deployment by id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @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 a batch inference deployment by id along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Context context); - - /** - * Gets a batch inference deployment by id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @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 a batch inference deployment by id. - */ - BatchDeployment get(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * Gets a batch inference deployment by id. - * - * @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 a batch inference deployment by id along with {@link Response}. - */ - BatchDeployment getById(String id); - - /** - * Gets a batch inference deployment by id. - * - * @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 a batch inference deployment by id along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @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. - */ - void deleteById(String id); - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new BatchDeployment resource. - * - * @param name resource name. - * @return the first stage of the new BatchDeployment definition. - */ - BatchDeployment.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java deleted file mode 100644 index 33ce2fff6eaa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java +++ /dev/null @@ -1,353 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.BatchEndpointInner; -import java.util.Map; - -/** - * An immutable client-side representation of BatchEndpoint. - */ -public interface BatchEndpoint { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - BatchEndpointProperties properties(); - - /** - * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - String kind(); - - /** - * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - Sku sku(); - - /** - * 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.machinelearning.fluent.models.BatchEndpointInner object. - * - * @return the inner object. - */ - BatchEndpointInner innerModel(); - - /** - * The entirety of the BatchEndpoint definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The BatchEndpoint definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the BatchEndpoint definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the BatchEndpoint 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 BatchEndpoint definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the BatchEndpoint definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(BatchEndpointProperties properties); - } - - /** - * The stage of the BatchEndpoint 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.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithSku { - /** - * Executes the create request. - * - * @return the created resource. - */ - BatchEndpoint create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - BatchEndpoint create(Context context); - } - - /** - * The stage of the BatchEndpoint 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 BatchEndpoint definition allowing to specify kind. - */ - interface WithKind { - /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. - * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. - * @return the next definition stage. - */ - WithCreate withKind(String kind); - } - - /** - * The stage of the BatchEndpoint definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the BatchEndpoint definition allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. - * - * @param sku Sku details required for ARM contract for Autoscaling. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - } - - /** - * Begins update for the BatchEndpoint resource. - * - * @return the stage of resource update. - */ - BatchEndpoint.Update update(); - - /** - * The template for BatchEndpoint update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { - /** - * Executes the update request. - * - * @return the updated resource. - */ - BatchEndpoint apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - BatchEndpoint apply(Context context); - } - - /** - * The BatchEndpoint update stages. - */ - interface UpdateStages { - /** - * The stage of the BatchEndpoint 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 BatchEndpoint update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - Update withIdentity(PartialManagedServiceIdentity identity); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - BatchEndpoint refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - BatchEndpoint refresh(Context context); - - /** - * Lists batch Inference Endpoint keys. - * - * @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 keys for endpoint authentication along with {@link Response}. - */ - Response listKeysWithResponse(Context context); - - /** - * Lists batch Inference Endpoint keys. - * - * @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 keys for endpoint authentication. - */ - EndpointAuthKeys listKeys(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.java deleted file mode 100644 index e86266985a56..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Batch endpoint default values. - */ -@Fluent -public final class BatchEndpointDefaults implements JsonSerializable { - /* - * Name of the deployment that will be default for the endpoint. - * This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. - */ - private String deploymentName; - - /** - * Creates an instance of BatchEndpointDefaults class. - */ - public BatchEndpointDefaults() { - } - - /** - * Get the deploymentName property: Name of the deployment that will be default for the endpoint. - * This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. - * - * @return the deploymentName value. - */ - public String deploymentName() { - return this.deploymentName; - } - - /** - * Set the deploymentName property: Name of the deployment that will be default for the endpoint. - * This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. - * - * @param deploymentName the deploymentName value to set. - * @return the BatchEndpointDefaults object itself. - */ - public BatchEndpointDefaults withDeploymentName(String deploymentName) { - this.deploymentName = deploymentName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deploymentName", this.deploymentName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BatchEndpointDefaults from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BatchEndpointDefaults if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the BatchEndpointDefaults. - */ - public static BatchEndpointDefaults fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BatchEndpointDefaults deserializedBatchEndpointDefaults = new BatchEndpointDefaults(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentName".equals(fieldName)) { - deserializedBatchEndpointDefaults.deploymentName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBatchEndpointDefaults; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java deleted file mode 100644 index db17ddd4397b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointPropertiesBaseInner; -import java.io.IOException; -import java.util.Map; - -/** - * Batch endpoint configuration. - */ -@Fluent -public final class BatchEndpointProperties extends EndpointPropertiesBaseInner { - /* - * Default values for Batch Endpoint - */ - private BatchEndpointDefaults defaults; - - /* - * Provisioning state for the endpoint. - */ - private EndpointProvisioningState provisioningState; - - /* - * Endpoint URI. - */ - private String scoringUri; - - /* - * Endpoint Swagger URI. - */ - private String swaggerUri; - - /** - * Creates an instance of BatchEndpointProperties class. - */ - public BatchEndpointProperties() { - } - - /** - * Get the defaults property: Default values for Batch Endpoint. - * - * @return the defaults value. - */ - public BatchEndpointDefaults defaults() { - return this.defaults; - } - - /** - * Set the defaults property: Default values for Batch Endpoint. - * - * @param defaults the defaults value to set. - * @return the BatchEndpointProperties object itself. - */ - public BatchEndpointProperties withDefaults(BatchEndpointDefaults defaults) { - this.defaults = defaults; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the endpoint. - * - * @return the provisioningState value. - */ - public EndpointProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the scoringUri property: Endpoint URI. - * - * @return the scoringUri value. - */ - @Override - public String scoringUri() { - return this.scoringUri; - } - - /** - * Get the swaggerUri property: Endpoint Swagger URI. - * - * @return the swaggerUri value. - */ - @Override - public String swaggerUri() { - return this.swaggerUri; - } - - /** - * {@inheritDoc} - */ - @Override - public BatchEndpointProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BatchEndpointProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BatchEndpointProperties withAuthMode(EndpointAuthMode authMode) { - super.withAuthMode(authMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BatchEndpointProperties withKeys(EndpointAuthKeysInner keys) { - super.withKeys(keys); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (defaults() != null) { - defaults().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authMode", authMode() == null ? null : authMode().toString()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("keys", keys()); - jsonWriter.writeJsonField("defaults", this.defaults); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BatchEndpointProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BatchEndpointProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BatchEndpointProperties. - */ - public static BatchEndpointProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BatchEndpointProperties deserializedBatchEndpointProperties = new BatchEndpointProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("authMode".equals(fieldName)) { - deserializedBatchEndpointProperties.withAuthMode(EndpointAuthMode.fromString(reader.getString())); - } else if ("description".equals(fieldName)) { - deserializedBatchEndpointProperties.withDescription(reader.getString()); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedBatchEndpointProperties.withProperties(properties); - } else if ("scoringUri".equals(fieldName)) { - deserializedBatchEndpointProperties.scoringUri = reader.getString(); - } else if ("swaggerUri".equals(fieldName)) { - deserializedBatchEndpointProperties.swaggerUri = reader.getString(); - } else if ("keys".equals(fieldName)) { - deserializedBatchEndpointProperties.withKeys(EndpointAuthKeysInner.fromJson(reader)); - } else if ("defaults".equals(fieldName)) { - deserializedBatchEndpointProperties.defaults = BatchEndpointDefaults.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedBatchEndpointProperties.provisioningState - = EndpointProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBatchEndpointProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointTrackedResourceArmPaginatedResult.java deleted file mode 100644 index 14d9c1bc8b60..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointTrackedResourceArmPaginatedResult.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of BatchEndpoint entities. - */ -@Fluent -public final class BatchEndpointTrackedResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type BatchEndpoint. - */ - private List value; - - /* - * The link to the next page of BatchEndpoint objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of BatchEndpointTrackedResourceArmPaginatedResult class. - */ - public BatchEndpointTrackedResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type BatchEndpoint. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type BatchEndpoint. - * - * @param value the value value to set. - * @return the BatchEndpointTrackedResourceArmPaginatedResult object itself. - */ - public BatchEndpointTrackedResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of BatchEndpoint objects. If null, there are no additional - * pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of BatchEndpoint objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the BatchEndpointTrackedResourceArmPaginatedResult object itself. - */ - public BatchEndpointTrackedResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BatchEndpointTrackedResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BatchEndpointTrackedResourceArmPaginatedResult if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BatchEndpointTrackedResourceArmPaginatedResult. - */ - public static BatchEndpointTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BatchEndpointTrackedResourceArmPaginatedResult deserializedBatchEndpointTrackedResourceArmPaginatedResult - = new BatchEndpointTrackedResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> BatchEndpointInner.fromJson(reader1)); - deserializedBatchEndpointTrackedResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedBatchEndpointTrackedResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBatchEndpointTrackedResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoints.java deleted file mode 100644 index b53b23062d5d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoints.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 BatchEndpoints. - */ -public interface BatchEndpoints { - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @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 a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, - Context context); - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String endpointName, Context context); - - /** - * Gets a batch inference endpoint by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @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 a batch inference endpoint by name along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - Context context); - - /** - * Gets a batch inference endpoint by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @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 a batch inference endpoint by name. - */ - BatchEndpoint get(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @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 keys for endpoint authentication along with {@link Response}. - */ - Response listKeysWithResponse(String resourceGroupName, String workspaceName, String endpointName, - Context context); - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @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 keys for endpoint authentication. - */ - EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Gets a batch inference endpoint by name. - * - * @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 a batch inference endpoint by name along with {@link Response}. - */ - BatchEndpoint getById(String id); - - /** - * Gets a batch inference endpoint by name. - * - * @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 a batch inference endpoint by name along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @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. - */ - void deleteById(String id); - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new BatchEndpoint resource. - * - * @param name resource name. - * @return the first stage of the new BatchEndpoint definition. - */ - BatchEndpoint.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java deleted file mode 100644 index e9c1596ca911..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Log verbosity for batch inferencing. - * Increasing verbosity order for logging is : Warning, Info and Debug. - * The default value is Info. - */ -public final class BatchLoggingLevel extends ExpandableStringEnum { - /** - * Static value Info for BatchLoggingLevel. - */ - public static final BatchLoggingLevel INFO = fromString("Info"); - - /** - * Static value Warning for BatchLoggingLevel. - */ - public static final BatchLoggingLevel WARNING = fromString("Warning"); - - /** - * Static value Debug for BatchLoggingLevel. - */ - public static final BatchLoggingLevel DEBUG = fromString("Debug"); - - /** - * Creates a new instance of BatchLoggingLevel value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BatchLoggingLevel() { - } - - /** - * Creates or finds a BatchLoggingLevel from its string representation. - * - * @param name a name to look for. - * @return the corresponding BatchLoggingLevel. - */ - public static BatchLoggingLevel fromString(String name) { - return fromString(name, BatchLoggingLevel.class); - } - - /** - * Gets known BatchLoggingLevel values. - * - * @return known BatchLoggingLevel values. - */ - public static Collection values() { - return values(BatchLoggingLevel.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.java deleted file mode 100644 index 2fb4652a0b7e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine how batch inferencing will handle output. - */ -public final class BatchOutputAction extends ExpandableStringEnum { - /** - * Static value SummaryOnly for BatchOutputAction. - */ - public static final BatchOutputAction SUMMARY_ONLY = fromString("SummaryOnly"); - - /** - * Static value AppendRow for BatchOutputAction. - */ - public static final BatchOutputAction APPEND_ROW = fromString("AppendRow"); - - /** - * Creates a new instance of BatchOutputAction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BatchOutputAction() { - } - - /** - * Creates or finds a BatchOutputAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding BatchOutputAction. - */ - public static BatchOutputAction fromString(String name) { - return fromString(name, BatchOutputAction.class); - } - - /** - * Gets known BatchOutputAction values. - * - * @return known BatchOutputAction values. - */ - public static Collection values() { - return values(BatchOutputAction.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchPipelineComponentDeploymentConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchPipelineComponentDeploymentConfiguration.java deleted file mode 100644 index 0f9049644ad9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchPipelineComponentDeploymentConfiguration.java +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Properties for a Batch Pipeline Component Deployment. - */ -@Fluent -public final class BatchPipelineComponentDeploymentConfiguration extends BatchDeploymentConfiguration { - /* - * [Required] The type of the deployment - */ - private BatchDeploymentConfigurationType deploymentConfigurationType - = BatchDeploymentConfigurationType.PIPELINE_COMPONENT; - - /* - * The ARM id of the component to be run. - */ - private IdAssetReference componentId; - - /* - * The description which will be applied to the job. - */ - private String description; - - /* - * Run-time settings for the pipeline job. - */ - private Map settings; - - /* - * The tags which will be applied to the job. - */ - private Map tags; - - /** - * Creates an instance of BatchPipelineComponentDeploymentConfiguration class. - */ - public BatchPipelineComponentDeploymentConfiguration() { - } - - /** - * Get the deploymentConfigurationType property: [Required] The type of the deployment. - * - * @return the deploymentConfigurationType value. - */ - @Override - public BatchDeploymentConfigurationType deploymentConfigurationType() { - return this.deploymentConfigurationType; - } - - /** - * Get the componentId property: The ARM id of the component to be run. - * - * @return the componentId value. - */ - public IdAssetReference componentId() { - return this.componentId; - } - - /** - * Set the componentId property: The ARM id of the component to be run. - * - * @param componentId the componentId value to set. - * @return the BatchPipelineComponentDeploymentConfiguration object itself. - */ - public BatchPipelineComponentDeploymentConfiguration withComponentId(IdAssetReference componentId) { - this.componentId = componentId; - return this; - } - - /** - * Get the description property: The description which will be applied to the job. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description which will be applied to the job. - * - * @param description the description value to set. - * @return the BatchPipelineComponentDeploymentConfiguration object itself. - */ - public BatchPipelineComponentDeploymentConfiguration withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the settings property: Run-time settings for the pipeline job. - * - * @return the settings value. - */ - public Map settings() { - return this.settings; - } - - /** - * Set the settings property: Run-time settings for the pipeline job. - * - * @param settings the settings value to set. - * @return the BatchPipelineComponentDeploymentConfiguration object itself. - */ - public BatchPipelineComponentDeploymentConfiguration withSettings(Map settings) { - this.settings = settings; - return this; - } - - /** - * Get the tags property: The tags which will be applied to the job. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: The tags which will be applied to the job. - * - * @param tags the tags value to set. - * @return the BatchPipelineComponentDeploymentConfiguration object itself. - */ - public BatchPipelineComponentDeploymentConfiguration withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (componentId() != null) { - componentId().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deploymentConfigurationType", - this.deploymentConfigurationType == null ? null : this.deploymentConfigurationType.toString()); - jsonWriter.writeJsonField("componentId", this.componentId); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeMapField("settings", this.settings, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BatchPipelineComponentDeploymentConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BatchPipelineComponentDeploymentConfiguration if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BatchPipelineComponentDeploymentConfiguration. - */ - public static BatchPipelineComponentDeploymentConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BatchPipelineComponentDeploymentConfiguration deserializedBatchPipelineComponentDeploymentConfiguration - = new BatchPipelineComponentDeploymentConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deploymentConfigurationType".equals(fieldName)) { - deserializedBatchPipelineComponentDeploymentConfiguration.deploymentConfigurationType - = BatchDeploymentConfigurationType.fromString(reader.getString()); - } else if ("componentId".equals(fieldName)) { - deserializedBatchPipelineComponentDeploymentConfiguration.componentId - = IdAssetReference.fromJson(reader); - } else if ("description".equals(fieldName)) { - deserializedBatchPipelineComponentDeploymentConfiguration.description = reader.getString(); - } else if ("settings".equals(fieldName)) { - Map settings = reader.readMap(reader1 -> reader1.getString()); - deserializedBatchPipelineComponentDeploymentConfiguration.settings = settings; - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBatchPipelineComponentDeploymentConfiguration.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedBatchPipelineComponentDeploymentConfiguration; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchRetrySettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchRetrySettings.java deleted file mode 100644 index bbd963a89f0c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchRetrySettings.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; - -/** - * Retry settings for a batch inference operation. - */ -@Fluent -public final class BatchRetrySettings implements JsonSerializable { - /* - * Maximum retry count for a mini-batch - */ - private Integer maxRetries; - - /* - * Invocation timeout for a mini-batch, in ISO 8601 format. - */ - private Duration timeout; - - /** - * Creates an instance of BatchRetrySettings class. - */ - public BatchRetrySettings() { - } - - /** - * Get the maxRetries property: Maximum retry count for a mini-batch. - * - * @return the maxRetries value. - */ - public Integer maxRetries() { - return this.maxRetries; - } - - /** - * Set the maxRetries property: Maximum retry count for a mini-batch. - * - * @param maxRetries the maxRetries value to set. - * @return the BatchRetrySettings object itself. - */ - public BatchRetrySettings withMaxRetries(Integer maxRetries) { - this.maxRetries = maxRetries; - return this; - } - - /** - * Get the timeout property: Invocation timeout for a mini-batch, in ISO 8601 format. - * - * @return the timeout value. - */ - public Duration timeout() { - return this.timeout; - } - - /** - * Set the timeout property: Invocation timeout for a mini-batch, in ISO 8601 format. - * - * @param timeout the timeout value to set. - * @return the BatchRetrySettings object itself. - */ - public BatchRetrySettings withTimeout(Duration timeout) { - this.timeout = timeout; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("maxRetries", this.maxRetries); - jsonWriter.writeStringField("timeout", CoreUtils.durationToStringWithDays(this.timeout)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BatchRetrySettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BatchRetrySettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the BatchRetrySettings. - */ - public static BatchRetrySettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BatchRetrySettings deserializedBatchRetrySettings = new BatchRetrySettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxRetries".equals(fieldName)) { - deserializedBatchRetrySettings.maxRetries = reader.getNullable(JsonReader::getInt); - } else if ("timeout".equals(fieldName)) { - deserializedBatchRetrySettings.timeout - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedBatchRetrySettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BayesianSamplingAlgorithm.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BayesianSamplingAlgorithm.java deleted file mode 100644 index 8468833775e5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BayesianSamplingAlgorithm.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines a Sampling Algorithm that generates values based on previous values. - */ -@Immutable -public final class BayesianSamplingAlgorithm extends SamplingAlgorithm { - /* - * [Required] The algorithm used for generating hyperparameter values, along with configuration properties - */ - private SamplingAlgorithmType samplingAlgorithmType = SamplingAlgorithmType.BAYESIAN; - - /** - * Creates an instance of BayesianSamplingAlgorithm class. - */ - public BayesianSamplingAlgorithm() { - } - - /** - * Get the samplingAlgorithmType property: [Required] The algorithm used for generating hyperparameter values, along - * with configuration properties. - * - * @return the samplingAlgorithmType value. - */ - @Override - public SamplingAlgorithmType samplingAlgorithmType() { - return this.samplingAlgorithmType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("samplingAlgorithmType", - this.samplingAlgorithmType == null ? null : this.samplingAlgorithmType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BayesianSamplingAlgorithm from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BayesianSamplingAlgorithm if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BayesianSamplingAlgorithm. - */ - public static BayesianSamplingAlgorithm fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BayesianSamplingAlgorithm deserializedBayesianSamplingAlgorithm = new BayesianSamplingAlgorithm(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("samplingAlgorithmType".equals(fieldName)) { - deserializedBayesianSamplingAlgorithm.samplingAlgorithmType - = SamplingAlgorithmType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedBayesianSamplingAlgorithm; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BillingCurrency.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BillingCurrency.java deleted file mode 100644 index 7d307afad8a3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BillingCurrency.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Billing currency - * - * Three lettered code specifying the currency of the VM price. Example: USD. - */ -public final class BillingCurrency extends ExpandableStringEnum { - /** - * Static value USD for BillingCurrency. - */ - public static final BillingCurrency USD = fromString("USD"); - - /** - * Creates a new instance of BillingCurrency value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BillingCurrency() { - } - - /** - * Creates or finds a BillingCurrency from its string representation. - * - * @param name a name to look for. - * @return the corresponding BillingCurrency. - */ - public static BillingCurrency fromString(String name) { - return fromString(name, BillingCurrency.class); - } - - /** - * Gets known BillingCurrency values. - * - * @return known BillingCurrency values. - */ - public static Collection values() { - return values(BillingCurrency.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.java deleted file mode 100644 index 403713c16907..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes the bind options for the container. - */ -@Fluent -public final class BindOptions implements JsonSerializable { - /* - * Type of Bind Option - */ - private String propagation; - - /* - * Indicate whether to create host path. - */ - private Boolean createHostPath; - - /* - * Mention the selinux options. - */ - private String selinux; - - /** - * Creates an instance of BindOptions class. - */ - public BindOptions() { - } - - /** - * Get the propagation property: Type of Bind Option. - * - * @return the propagation value. - */ - public String propagation() { - return this.propagation; - } - - /** - * Set the propagation property: Type of Bind Option. - * - * @param propagation the propagation value to set. - * @return the BindOptions object itself. - */ - public BindOptions withPropagation(String propagation) { - this.propagation = propagation; - return this; - } - - /** - * Get the createHostPath property: Indicate whether to create host path. - * - * @return the createHostPath value. - */ - public Boolean createHostPath() { - return this.createHostPath; - } - - /** - * Set the createHostPath property: Indicate whether to create host path. - * - * @param createHostPath the createHostPath value to set. - * @return the BindOptions object itself. - */ - public BindOptions withCreateHostPath(Boolean createHostPath) { - this.createHostPath = createHostPath; - return this; - } - - /** - * Get the selinux property: Mention the selinux options. - * - * @return the selinux value. - */ - public String selinux() { - return this.selinux; - } - - /** - * Set the selinux property: Mention the selinux options. - * - * @param selinux the selinux value to set. - * @return the BindOptions object itself. - */ - public BindOptions withSelinux(String selinux) { - this.selinux = selinux; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("propagation", this.propagation); - jsonWriter.writeBooleanField("createHostPath", this.createHostPath); - jsonWriter.writeStringField("selinux", this.selinux); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BindOptions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BindOptions if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the BindOptions. - */ - public static BindOptions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BindOptions deserializedBindOptions = new BindOptions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("propagation".equals(fieldName)) { - deserializedBindOptions.propagation = reader.getString(); - } else if ("createHostPath".equals(fieldName)) { - deserializedBindOptions.createHostPath = reader.getNullable(JsonReader::getBoolean); - } else if ("selinux".equals(fieldName)) { - deserializedBindOptions.selinux = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBindOptions; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlobReferenceForConsumptionDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlobReferenceForConsumptionDto.java deleted file mode 100644 index 5da4b053005d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlobReferenceForConsumptionDto.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The BlobReferenceForConsumptionDto model. - */ -@Fluent -public final class BlobReferenceForConsumptionDto implements JsonSerializable { - /* - * Blob URI path for client to upload data. - * Example: https://blob.windows.core.net/Container/Path - */ - private String blobUri; - - /* - * Arm ID of the storage account to use - */ - private String storageAccountArmId; - - /* - * Credential info to access storage account - */ - private PendingUploadCredentialDto credential; - - /** - * Creates an instance of BlobReferenceForConsumptionDto class. - */ - public BlobReferenceForConsumptionDto() { - } - - /** - * Get the blobUri property: Blob URI path for client to upload data. - * Example: https://blob.windows.core.net/Container/Path. - * - * @return the blobUri value. - */ - public String blobUri() { - return this.blobUri; - } - - /** - * Set the blobUri property: Blob URI path for client to upload data. - * Example: https://blob.windows.core.net/Container/Path. - * - * @param blobUri the blobUri value to set. - * @return the BlobReferenceForConsumptionDto object itself. - */ - public BlobReferenceForConsumptionDto withBlobUri(String blobUri) { - this.blobUri = blobUri; - return this; - } - - /** - * Get the storageAccountArmId property: Arm ID of the storage account to use. - * - * @return the storageAccountArmId value. - */ - public String storageAccountArmId() { - return this.storageAccountArmId; - } - - /** - * Set the storageAccountArmId property: Arm ID of the storage account to use. - * - * @param storageAccountArmId the storageAccountArmId value to set. - * @return the BlobReferenceForConsumptionDto object itself. - */ - public BlobReferenceForConsumptionDto withStorageAccountArmId(String storageAccountArmId) { - this.storageAccountArmId = storageAccountArmId; - return this; - } - - /** - * Get the credential property: Credential info to access storage account. - * - * @return the credential value. - */ - public PendingUploadCredentialDto credential() { - return this.credential; - } - - /** - * Set the credential property: Credential info to access storage account. - * - * @param credential the credential value to set. - * @return the BlobReferenceForConsumptionDto object itself. - */ - public BlobReferenceForConsumptionDto withCredential(PendingUploadCredentialDto credential) { - this.credential = credential; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (credential() != null) { - credential().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("blobUri", this.blobUri); - jsonWriter.writeStringField("storageAccountArmId", this.storageAccountArmId); - jsonWriter.writeJsonField("credential", this.credential); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobReferenceForConsumptionDto from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobReferenceForConsumptionDto if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobReferenceForConsumptionDto. - */ - public static BlobReferenceForConsumptionDto fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobReferenceForConsumptionDto deserializedBlobReferenceForConsumptionDto - = new BlobReferenceForConsumptionDto(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("blobUri".equals(fieldName)) { - deserializedBlobReferenceForConsumptionDto.blobUri = reader.getString(); - } else if ("storageAccountArmId".equals(fieldName)) { - deserializedBlobReferenceForConsumptionDto.storageAccountArmId = reader.getString(); - } else if ("credential".equals(fieldName)) { - deserializedBlobReferenceForConsumptionDto.credential = PendingUploadCredentialDto.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobReferenceForConsumptionDto; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlockedTransformers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlockedTransformers.java deleted file mode 100644 index 3ebb419525c6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlockedTransformers.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum for all classification models supported by AutoML. - */ -public final class BlockedTransformers extends ExpandableStringEnum { - /** - * Static value TextTargetEncoder for BlockedTransformers. - */ - public static final BlockedTransformers TEXT_TARGET_ENCODER = fromString("TextTargetEncoder"); - - /** - * Static value OneHotEncoder for BlockedTransformers. - */ - public static final BlockedTransformers ONE_HOT_ENCODER = fromString("OneHotEncoder"); - - /** - * Static value CatTargetEncoder for BlockedTransformers. - */ - public static final BlockedTransformers CAT_TARGET_ENCODER = fromString("CatTargetEncoder"); - - /** - * Static value TfIdf for BlockedTransformers. - */ - public static final BlockedTransformers TF_IDF = fromString("TfIdf"); - - /** - * Static value WoETargetEncoder for BlockedTransformers. - */ - public static final BlockedTransformers WO_ETARGET_ENCODER = fromString("WoETargetEncoder"); - - /** - * Static value LabelEncoder for BlockedTransformers. - */ - public static final BlockedTransformers LABEL_ENCODER = fromString("LabelEncoder"); - - /** - * Static value WordEmbedding for BlockedTransformers. - */ - public static final BlockedTransformers WORD_EMBEDDING = fromString("WordEmbedding"); - - /** - * Static value NaiveBayes for BlockedTransformers. - */ - public static final BlockedTransformers NAIVE_BAYES = fromString("NaiveBayes"); - - /** - * Static value CountVectorizer for BlockedTransformers. - */ - public static final BlockedTransformers COUNT_VECTORIZER = fromString("CountVectorizer"); - - /** - * Static value HashOneHotEncoder for BlockedTransformers. - */ - public static final BlockedTransformers HASH_ONE_HOT_ENCODER = fromString("HashOneHotEncoder"); - - /** - * Creates a new instance of BlockedTransformers value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BlockedTransformers() { - } - - /** - * Creates or finds a BlockedTransformers from its string representation. - * - * @param name a name to look for. - * @return the corresponding BlockedTransformers. - */ - public static BlockedTransformers fromString(String name) { - return fromString(name, BlockedTransformers.class); - } - - /** - * Gets known BlockedTransformers values. - * - * @return known BlockedTransformers values. - */ - public static Collection values() { - return values(BlockedTransformers.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.java deleted file mode 100644 index f8e515bea021..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configuration settings for Docker build context. - */ -@Fluent -public final class BuildContext implements JsonSerializable { - /* - * [Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation - * and may return blob or Git URIs. - * - */ - private String contextUri; - - /* - * Path to the Dockerfile in the build context. - * - */ - private String dockerfilePath; - - /** - * Creates an instance of BuildContext class. - */ - public BuildContext() { - } - - /** - * Get the contextUri property: [Required] URI of the Docker build context used to build the image. Supports blob - * URIs on environment creation and may return blob or Git URIs. - * <seealso href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" />. - * - * @return the contextUri value. - */ - public String contextUri() { - return this.contextUri; - } - - /** - * Set the contextUri property: [Required] URI of the Docker build context used to build the image. Supports blob - * URIs on environment creation and may return blob or Git URIs. - * <seealso href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" />. - * - * @param contextUri the contextUri value to set. - * @return the BuildContext object itself. - */ - public BuildContext withContextUri(String contextUri) { - this.contextUri = contextUri; - return this; - } - - /** - * Get the dockerfilePath property: Path to the Dockerfile in the build context. - * <seealso href="https://docs.docker.com/engine/reference/builder/" />. - * - * @return the dockerfilePath value. - */ - public String dockerfilePath() { - return this.dockerfilePath; - } - - /** - * Set the dockerfilePath property: Path to the Dockerfile in the build context. - * <seealso href="https://docs.docker.com/engine/reference/builder/" />. - * - * @param dockerfilePath the dockerfilePath value to set. - * @return the BuildContext object itself. - */ - public BuildContext withDockerfilePath(String dockerfilePath) { - this.dockerfilePath = dockerfilePath; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (contextUri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property contextUri in model BuildContext")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BuildContext.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("contextUri", this.contextUri); - jsonWriter.writeStringField("dockerfilePath", this.dockerfilePath); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuildContext from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuildContext if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BuildContext. - */ - public static BuildContext fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuildContext deserializedBuildContext = new BuildContext(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("contextUri".equals(fieldName)) { - deserializedBuildContext.contextUri = reader.getString(); - } else if ("dockerfilePath".equals(fieldName)) { - deserializedBuildContext.dockerfilePath = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBuildContext; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.java deleted file mode 100644 index eaf670a60353..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Caching type of Data Disk. - */ -public final class Caching extends ExpandableStringEnum { - /** - * Static value None for Caching. - */ - public static final Caching NONE = fromString("None"); - - /** - * Static value ReadOnly for Caching. - */ - public static final Caching READ_ONLY = fromString("ReadOnly"); - - /** - * Static value ReadWrite for Caching. - */ - public static final Caching READ_WRITE = fromString("ReadWrite"); - - /** - * Creates a new instance of Caching value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Caching() { - } - - /** - * Creates or finds a Caching from its string representation. - * - * @param name a name to look for. - * @return the corresponding Caching. - */ - public static Caching fromString(String name) { - return fromString(name, Caching.class); - } - - /** - * Gets known Caching values. - * - * @return known Caching values. - */ - public static Collection values() { - return values(Caching.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetric.java deleted file mode 100644 index 16dece761fa8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetric.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for CategoricalDataDriftMetric. - */ -public final class CategoricalDataDriftMetric extends ExpandableStringEnum { - /** - * Static value JensenShannonDistance for CategoricalDataDriftMetric. - */ - public static final CategoricalDataDriftMetric JENSEN_SHANNON_DISTANCE = fromString("JensenShannonDistance"); - - /** - * Static value PopulationStabilityIndex for CategoricalDataDriftMetric. - */ - public static final CategoricalDataDriftMetric POPULATION_STABILITY_INDEX = fromString("PopulationStabilityIndex"); - - /** - * Static value PearsonsChiSquaredTest for CategoricalDataDriftMetric. - */ - public static final CategoricalDataDriftMetric PEARSONS_CHI_SQUARED_TEST = fromString("PearsonsChiSquaredTest"); - - /** - * Creates a new instance of CategoricalDataDriftMetric value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CategoricalDataDriftMetric() { - } - - /** - * Creates or finds a CategoricalDataDriftMetric from its string representation. - * - * @param name a name to look for. - * @return the corresponding CategoricalDataDriftMetric. - */ - public static CategoricalDataDriftMetric fromString(String name) { - return fromString(name, CategoricalDataDriftMetric.class); - } - - /** - * Gets known CategoricalDataDriftMetric values. - * - * @return known CategoricalDataDriftMetric values. - */ - public static Collection values() { - return values(CategoricalDataDriftMetric.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetricThreshold.java deleted file mode 100644 index 2e1427398f0f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetricThreshold.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The CategoricalDataDriftMetricThreshold model. - */ -@Fluent -public final class CategoricalDataDriftMetricThreshold extends DataDriftMetricThresholdBase { - /* - * [Required] Specifies the data type of the metric threshold. - */ - private MonitoringFeatureDataType dataType = MonitoringFeatureDataType.CATEGORICAL; - - /* - * [Required] The categorical data drift metric to calculate. - */ - private CategoricalDataDriftMetric metric; - - /** - * Creates an instance of CategoricalDataDriftMetricThreshold class. - */ - public CategoricalDataDriftMetricThreshold() { - } - - /** - * Get the dataType property: [Required] Specifies the data type of the metric threshold. - * - * @return the dataType value. - */ - @Override - public MonitoringFeatureDataType dataType() { - return this.dataType; - } - - /** - * Get the metric property: [Required] The categorical data drift metric to calculate. - * - * @return the metric value. - */ - public CategoricalDataDriftMetric metric() { - return this.metric; - } - - /** - * Set the metric property: [Required] The categorical data drift metric to calculate. - * - * @param metric the metric value to set. - * @return the CategoricalDataDriftMetricThreshold object itself. - */ - public CategoricalDataDriftMetricThreshold withMetric(CategoricalDataDriftMetric metric) { - this.metric = metric; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CategoricalDataDriftMetricThreshold withThreshold(MonitoringThreshold threshold) { - super.withThreshold(threshold); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (metric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metric in model CategoricalDataDriftMetricThreshold")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CategoricalDataDriftMetricThreshold.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("threshold", threshold()); - jsonWriter.writeStringField("metric", this.metric == null ? null : this.metric.toString()); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CategoricalDataDriftMetricThreshold from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CategoricalDataDriftMetricThreshold if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CategoricalDataDriftMetricThreshold. - */ - public static CategoricalDataDriftMetricThreshold fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CategoricalDataDriftMetricThreshold deserializedCategoricalDataDriftMetricThreshold - = new CategoricalDataDriftMetricThreshold(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("threshold".equals(fieldName)) { - deserializedCategoricalDataDriftMetricThreshold.withThreshold(MonitoringThreshold.fromJson(reader)); - } else if ("metric".equals(fieldName)) { - deserializedCategoricalDataDriftMetricThreshold.metric - = CategoricalDataDriftMetric.fromString(reader.getString()); - } else if ("dataType".equals(fieldName)) { - deserializedCategoricalDataDriftMetricThreshold.dataType - = MonitoringFeatureDataType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCategoricalDataDriftMetricThreshold; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetric.java deleted file mode 100644 index 0f054d638710..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetric.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for CategoricalDataQualityMetric. - */ -public final class CategoricalDataQualityMetric extends ExpandableStringEnum { - /** - * Static value NullValueRate for CategoricalDataQualityMetric. - */ - public static final CategoricalDataQualityMetric NULL_VALUE_RATE = fromString("NullValueRate"); - - /** - * Static value DataTypeErrorRate for CategoricalDataQualityMetric. - */ - public static final CategoricalDataQualityMetric DATA_TYPE_ERROR_RATE = fromString("DataTypeErrorRate"); - - /** - * Static value OutOfBoundsRate for CategoricalDataQualityMetric. - */ - public static final CategoricalDataQualityMetric OUT_OF_BOUNDS_RATE = fromString("OutOfBoundsRate"); - - /** - * Creates a new instance of CategoricalDataQualityMetric value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CategoricalDataQualityMetric() { - } - - /** - * Creates or finds a CategoricalDataQualityMetric from its string representation. - * - * @param name a name to look for. - * @return the corresponding CategoricalDataQualityMetric. - */ - public static CategoricalDataQualityMetric fromString(String name) { - return fromString(name, CategoricalDataQualityMetric.class); - } - - /** - * Gets known CategoricalDataQualityMetric values. - * - * @return known CategoricalDataQualityMetric values. - */ - public static Collection values() { - return values(CategoricalDataQualityMetric.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetricThreshold.java deleted file mode 100644 index 4862103be229..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetricThreshold.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The CategoricalDataQualityMetricThreshold model. - */ -@Fluent -public final class CategoricalDataQualityMetricThreshold extends DataQualityMetricThresholdBase { - /* - * [Required] Specifies the data type of the metric threshold. - */ - private MonitoringFeatureDataType dataType = MonitoringFeatureDataType.CATEGORICAL; - - /* - * [Required] The categorical data quality metric to calculate. - */ - private CategoricalDataQualityMetric metric; - - /** - * Creates an instance of CategoricalDataQualityMetricThreshold class. - */ - public CategoricalDataQualityMetricThreshold() { - } - - /** - * Get the dataType property: [Required] Specifies the data type of the metric threshold. - * - * @return the dataType value. - */ - @Override - public MonitoringFeatureDataType dataType() { - return this.dataType; - } - - /** - * Get the metric property: [Required] The categorical data quality metric to calculate. - * - * @return the metric value. - */ - public CategoricalDataQualityMetric metric() { - return this.metric; - } - - /** - * Set the metric property: [Required] The categorical data quality metric to calculate. - * - * @param metric the metric value to set. - * @return the CategoricalDataQualityMetricThreshold object itself. - */ - public CategoricalDataQualityMetricThreshold withMetric(CategoricalDataQualityMetric metric) { - this.metric = metric; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CategoricalDataQualityMetricThreshold withThreshold(MonitoringThreshold threshold) { - super.withThreshold(threshold); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (metric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metric in model CategoricalDataQualityMetricThreshold")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CategoricalDataQualityMetricThreshold.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("threshold", threshold()); - jsonWriter.writeStringField("metric", this.metric == null ? null : this.metric.toString()); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CategoricalDataQualityMetricThreshold from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CategoricalDataQualityMetricThreshold if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CategoricalDataQualityMetricThreshold. - */ - public static CategoricalDataQualityMetricThreshold fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CategoricalDataQualityMetricThreshold deserializedCategoricalDataQualityMetricThreshold - = new CategoricalDataQualityMetricThreshold(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("threshold".equals(fieldName)) { - deserializedCategoricalDataQualityMetricThreshold - .withThreshold(MonitoringThreshold.fromJson(reader)); - } else if ("metric".equals(fieldName)) { - deserializedCategoricalDataQualityMetricThreshold.metric - = CategoricalDataQualityMetric.fromString(reader.getString()); - } else if ("dataType".equals(fieldName)) { - deserializedCategoricalDataQualityMetricThreshold.dataType - = MonitoringFeatureDataType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCategoricalDataQualityMetricThreshold; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetric.java deleted file mode 100644 index 8f6b88e06a04..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetric.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for CategoricalPredictionDriftMetric. - */ -public final class CategoricalPredictionDriftMetric extends ExpandableStringEnum { - /** - * Static value JensenShannonDistance for CategoricalPredictionDriftMetric. - */ - public static final CategoricalPredictionDriftMetric JENSEN_SHANNON_DISTANCE = fromString("JensenShannonDistance"); - - /** - * Static value PopulationStabilityIndex for CategoricalPredictionDriftMetric. - */ - public static final CategoricalPredictionDriftMetric POPULATION_STABILITY_INDEX - = fromString("PopulationStabilityIndex"); - - /** - * Static value PearsonsChiSquaredTest for CategoricalPredictionDriftMetric. - */ - public static final CategoricalPredictionDriftMetric PEARSONS_CHI_SQUARED_TEST - = fromString("PearsonsChiSquaredTest"); - - /** - * Creates a new instance of CategoricalPredictionDriftMetric value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CategoricalPredictionDriftMetric() { - } - - /** - * Creates or finds a CategoricalPredictionDriftMetric from its string representation. - * - * @param name a name to look for. - * @return the corresponding CategoricalPredictionDriftMetric. - */ - public static CategoricalPredictionDriftMetric fromString(String name) { - return fromString(name, CategoricalPredictionDriftMetric.class); - } - - /** - * Gets known CategoricalPredictionDriftMetric values. - * - * @return known CategoricalPredictionDriftMetric values. - */ - public static Collection values() { - return values(CategoricalPredictionDriftMetric.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetricThreshold.java deleted file mode 100644 index aa10da87d9df..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetricThreshold.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The CategoricalPredictionDriftMetricThreshold model. - */ -@Fluent -public final class CategoricalPredictionDriftMetricThreshold extends PredictionDriftMetricThresholdBase { - /* - * [Required] Specifies the data type of the metric threshold. - */ - private MonitoringFeatureDataType dataType = MonitoringFeatureDataType.CATEGORICAL; - - /* - * [Required] The categorical prediction drift metric to calculate. - */ - private CategoricalPredictionDriftMetric metric; - - /** - * Creates an instance of CategoricalPredictionDriftMetricThreshold class. - */ - public CategoricalPredictionDriftMetricThreshold() { - } - - /** - * Get the dataType property: [Required] Specifies the data type of the metric threshold. - * - * @return the dataType value. - */ - @Override - public MonitoringFeatureDataType dataType() { - return this.dataType; - } - - /** - * Get the metric property: [Required] The categorical prediction drift metric to calculate. - * - * @return the metric value. - */ - public CategoricalPredictionDriftMetric metric() { - return this.metric; - } - - /** - * Set the metric property: [Required] The categorical prediction drift metric to calculate. - * - * @param metric the metric value to set. - * @return the CategoricalPredictionDriftMetricThreshold object itself. - */ - public CategoricalPredictionDriftMetricThreshold withMetric(CategoricalPredictionDriftMetric metric) { - this.metric = metric; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CategoricalPredictionDriftMetricThreshold withThreshold(MonitoringThreshold threshold) { - super.withThreshold(threshold); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (metric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metric in model CategoricalPredictionDriftMetricThreshold")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CategoricalPredictionDriftMetricThreshold.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("threshold", threshold()); - jsonWriter.writeStringField("metric", this.metric == null ? null : this.metric.toString()); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CategoricalPredictionDriftMetricThreshold from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CategoricalPredictionDriftMetricThreshold if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CategoricalPredictionDriftMetricThreshold. - */ - public static CategoricalPredictionDriftMetricThreshold fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CategoricalPredictionDriftMetricThreshold deserializedCategoricalPredictionDriftMetricThreshold - = new CategoricalPredictionDriftMetricThreshold(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("threshold".equals(fieldName)) { - deserializedCategoricalPredictionDriftMetricThreshold - .withThreshold(MonitoringThreshold.fromJson(reader)); - } else if ("metric".equals(fieldName)) { - deserializedCategoricalPredictionDriftMetricThreshold.metric - = CategoricalPredictionDriftMetric.fromString(reader.getString()); - } else if ("dataType".equals(fieldName)) { - deserializedCategoricalPredictionDriftMetricThreshold.dataType - = MonitoringFeatureDataType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCategoricalPredictionDriftMetricThreshold; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java deleted file mode 100644 index e8526b485cec..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Objects; -import java.util.UUID; - -/** - * Certificate datastore credentials configuration. - */ -@Fluent -public final class CertificateDatastoreCredentials extends DatastoreCredentials { - /* - * [Required] Credential type used to authentication with storage. - */ - private CredentialsType credentialsType = CredentialsType.CERTIFICATE; - - /* - * Authority URL used for authentication. - */ - private String authorityUrl; - - /* - * Resource the service principal has access to. - */ - private String resourceUrl; - - /* - * [Required] ID of the tenant to which the service principal belongs. - */ - private UUID tenantId; - - /* - * [Required] Service principal client ID. - */ - private UUID clientId; - - /* - * [Required] Thumbprint of the certificate used for authentication. - */ - private String thumbprint; - - /* - * [Required] Service principal secrets. - */ - private CertificateDatastoreSecrets secrets; - - /** - * Creates an instance of CertificateDatastoreCredentials class. - */ - public CertificateDatastoreCredentials() { - } - - /** - * Get the credentialsType property: [Required] Credential type used to authentication with storage. - * - * @return the credentialsType value. - */ - @Override - public CredentialsType credentialsType() { - return this.credentialsType; - } - - /** - * Get the authorityUrl property: Authority URL used for authentication. - * - * @return the authorityUrl value. - */ - public String authorityUrl() { - return this.authorityUrl; - } - - /** - * Set the authorityUrl property: Authority URL used for authentication. - * - * @param authorityUrl the authorityUrl value to set. - * @return the CertificateDatastoreCredentials object itself. - */ - public CertificateDatastoreCredentials withAuthorityUrl(String authorityUrl) { - this.authorityUrl = authorityUrl; - return this; - } - - /** - * Get the resourceUrl property: Resource the service principal has access to. - * - * @return the resourceUrl value. - */ - public String resourceUrl() { - return this.resourceUrl; - } - - /** - * Set the resourceUrl property: Resource the service principal has access to. - * - * @param resourceUrl the resourceUrl value to set. - * @return the CertificateDatastoreCredentials object itself. - */ - public CertificateDatastoreCredentials withResourceUrl(String resourceUrl) { - this.resourceUrl = resourceUrl; - return this; - } - - /** - * Get the tenantId property: [Required] ID of the tenant to which the service principal belongs. - * - * @return the tenantId value. - */ - public UUID tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: [Required] ID of the tenant to which the service principal belongs. - * - * @param tenantId the tenantId value to set. - * @return the CertificateDatastoreCredentials object itself. - */ - public CertificateDatastoreCredentials withTenantId(UUID tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the clientId property: [Required] Service principal client ID. - * - * @return the clientId value. - */ - public UUID clientId() { - return this.clientId; - } - - /** - * Set the clientId property: [Required] Service principal client ID. - * - * @param clientId the clientId value to set. - * @return the CertificateDatastoreCredentials object itself. - */ - public CertificateDatastoreCredentials withClientId(UUID clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the thumbprint property: [Required] Thumbprint of the certificate used for authentication. - * - * @return the thumbprint value. - */ - public String thumbprint() { - return this.thumbprint; - } - - /** - * Set the thumbprint property: [Required] Thumbprint of the certificate used for authentication. - * - * @param thumbprint the thumbprint value to set. - * @return the CertificateDatastoreCredentials object itself. - */ - public CertificateDatastoreCredentials withThumbprint(String thumbprint) { - this.thumbprint = thumbprint; - return this; - } - - /** - * Get the secrets property: [Required] Service principal secrets. - * - * @return the secrets value. - */ - public CertificateDatastoreSecrets secrets() { - return this.secrets; - } - - /** - * Set the secrets property: [Required] Service principal secrets. - * - * @param secrets the secrets value to set. - * @return the CertificateDatastoreCredentials object itself. - */ - public CertificateDatastoreCredentials withSecrets(CertificateDatastoreSecrets secrets) { - this.secrets = secrets; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (tenantId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property tenantId in model CertificateDatastoreCredentials")); - } - if (clientId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property clientId in model CertificateDatastoreCredentials")); - } - if (thumbprint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property thumbprint in model CertificateDatastoreCredentials")); - } - if (secrets() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property secrets in model CertificateDatastoreCredentials")); - } else { - secrets().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CertificateDatastoreCredentials.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("tenantId", Objects.toString(this.tenantId, null)); - jsonWriter.writeStringField("clientId", Objects.toString(this.clientId, null)); - jsonWriter.writeStringField("thumbprint", this.thumbprint); - jsonWriter.writeJsonField("secrets", this.secrets); - jsonWriter.writeStringField("credentialsType", - this.credentialsType == null ? null : this.credentialsType.toString()); - jsonWriter.writeStringField("authorityUrl", this.authorityUrl); - jsonWriter.writeStringField("resourceUrl", this.resourceUrl); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CertificateDatastoreCredentials from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CertificateDatastoreCredentials if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CertificateDatastoreCredentials. - */ - public static CertificateDatastoreCredentials fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CertificateDatastoreCredentials deserializedCertificateDatastoreCredentials - = new CertificateDatastoreCredentials(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tenantId".equals(fieldName)) { - deserializedCertificateDatastoreCredentials.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("clientId".equals(fieldName)) { - deserializedCertificateDatastoreCredentials.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("thumbprint".equals(fieldName)) { - deserializedCertificateDatastoreCredentials.thumbprint = reader.getString(); - } else if ("secrets".equals(fieldName)) { - deserializedCertificateDatastoreCredentials.secrets = CertificateDatastoreSecrets.fromJson(reader); - } else if ("credentialsType".equals(fieldName)) { - deserializedCertificateDatastoreCredentials.credentialsType - = CredentialsType.fromString(reader.getString()); - } else if ("authorityUrl".equals(fieldName)) { - deserializedCertificateDatastoreCredentials.authorityUrl = reader.getString(); - } else if ("resourceUrl".equals(fieldName)) { - deserializedCertificateDatastoreCredentials.resourceUrl = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCertificateDatastoreCredentials; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java deleted file mode 100644 index 5f47f4efcf8e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import java.io.IOException; - -/** - * Datastore certificate secrets. - */ -@Fluent -public final class CertificateDatastoreSecrets extends DatastoreSecretsInner { - /* - * [Required] Credential type used to authentication with storage. - */ - private SecretsType secretsType = SecretsType.CERTIFICATE; - - /* - * Service principal certificate. - */ - private String certificate; - - /** - * Creates an instance of CertificateDatastoreSecrets class. - */ - public CertificateDatastoreSecrets() { - } - - /** - * Get the secretsType property: [Required] Credential type used to authentication with storage. - * - * @return the secretsType value. - */ - @Override - public SecretsType secretsType() { - return this.secretsType; - } - - /** - * Get the certificate property: Service principal certificate. - * - * @return the certificate value. - */ - public String certificate() { - return this.certificate; - } - - /** - * Set the certificate property: Service principal certificate. - * - * @param certificate the certificate value to set. - * @return the CertificateDatastoreSecrets object itself. - */ - public CertificateDatastoreSecrets withCertificate(String certificate) { - this.certificate = certificate; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("secretsType", this.secretsType == null ? null : this.secretsType.toString()); - jsonWriter.writeStringField("certificate", this.certificate); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CertificateDatastoreSecrets from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CertificateDatastoreSecrets if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CertificateDatastoreSecrets. - */ - public static CertificateDatastoreSecrets fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CertificateDatastoreSecrets deserializedCertificateDatastoreSecrets = new CertificateDatastoreSecrets(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("secretsType".equals(fieldName)) { - deserializedCertificateDatastoreSecrets.secretsType = SecretsType.fromString(reader.getString()); - } else if ("certificate".equals(fieldName)) { - deserializedCertificateDatastoreSecrets.certificate = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCertificateDatastoreSecrets; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Classification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Classification.java deleted file mode 100644 index 9584d5fac312..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Classification.java +++ /dev/null @@ -1,500 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Classification task in AutoML Table vertical. - */ -@Fluent -public final class Classification extends AutoMLVertical { - /* - * [Required] Task type for AutoMLJob. - */ - private TaskType taskType = TaskType.CLASSIFICATION; - - /* - * Primary metric for the task. - */ - private ClassificationPrimaryMetrics primaryMetric; - - /* - * Inputs for training phase for an AutoML Job. - */ - private ClassificationTrainingSettings trainingSettings; - - /* - * Positive label for binary metrics calculation. - */ - private String positiveLabel; - - /* - * Execution constraints for AutoMLJob. - */ - private TableVerticalLimitSettings limitSettings; - - /* - * Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - */ - private NCrossValidations nCrossValidations; - - /* - * Columns to use for CVSplit data. - */ - private List cvSplitColumnNames; - - /* - * The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the - * data to be weighted up or down. - */ - private String weightColumnName; - - /* - * Validation data inputs. - */ - private MLTableJobInput validationData; - - /* - * Test data input. - */ - private MLTableJobInput testData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - private Double validationDataSize; - - /* - * The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - private Double testDataSize; - - /* - * Featurization inputs needed for AutoML job. - */ - private TableVerticalFeaturizationSettings featurizationSettings; - - /** - * Creates an instance of Classification class. - */ - public Classification() { - } - - /** - * Get the taskType property: [Required] Task type for AutoMLJob. - * - * @return the taskType value. - */ - @Override - public TaskType taskType() { - return this.taskType; - } - - /** - * Get the primaryMetric property: Primary metric for the task. - * - * @return the primaryMetric value. - */ - public ClassificationPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric for the task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the Classification object itself. - */ - public Classification withPrimaryMetric(ClassificationPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - - /** - * Get the trainingSettings property: Inputs for training phase for an AutoML Job. - * - * @return the trainingSettings value. - */ - public ClassificationTrainingSettings trainingSettings() { - return this.trainingSettings; - } - - /** - * Set the trainingSettings property: Inputs for training phase for an AutoML Job. - * - * @param trainingSettings the trainingSettings value to set. - * @return the Classification object itself. - */ - public Classification withTrainingSettings(ClassificationTrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; - return this; - } - - /** - * Get the positiveLabel property: Positive label for binary metrics calculation. - * - * @return the positiveLabel value. - */ - public String positiveLabel() { - return this.positiveLabel; - } - - /** - * Set the positiveLabel property: Positive label for binary metrics calculation. - * - * @param positiveLabel the positiveLabel value to set. - * @return the Classification object itself. - */ - public Classification withPositiveLabel(String positiveLabel) { - this.positiveLabel = positiveLabel; - return this; - } - - /** - * Get the limitSettings property: Execution constraints for AutoMLJob. - * - * @return the limitSettings value. - */ - public TableVerticalLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: Execution constraints for AutoMLJob. - * - * @param limitSettings the limitSettings value to set. - * @return the Classification object itself. - */ - public Classification withLimitSettings(TableVerticalLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - * - * @return the nCrossValidations value. - */ - public NCrossValidations nCrossValidations() { - return this.nCrossValidations; - } - - /** - * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - * - * @param nCrossValidations the nCrossValidations value to set. - * @return the Classification object itself. - */ - public Classification withNCrossValidations(NCrossValidations nCrossValidations) { - this.nCrossValidations = nCrossValidations; - return this; - } - - /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @return the cvSplitColumnNames value. - */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; - } - - /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. - * @return the Classification object itself. - */ - public Classification withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; - return this; - } - - /** - * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @return the weightColumnName value. - */ - public String weightColumnName() { - return this.weightColumnName; - } - - /** - * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @param weightColumnName the weightColumnName value to set. - * @return the Classification object itself. - */ - public Classification withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the Classification object itself. - */ - public Classification withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public MLTableJobInput testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the Classification object itself. - */ - public Classification withTestData(MLTableJobInput testData) { - this.testData = testData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the Classification object itself. - */ - public Classification withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @return the testDataSize value. - */ - public Double testDataSize() { - return this.testDataSize; - } - - /** - * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @param testDataSize the testDataSize value to set. - * @return the Classification object itself. - */ - public Classification withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; - return this; - } - - /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @return the featurizationSettings value. - */ - public TableVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; - } - - /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @param featurizationSettings the featurizationSettings value to set. - * @return the Classification object itself. - */ - public Classification withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Classification withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Classification withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Classification withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (trainingSettings() != null) { - trainingSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - if (nCrossValidations() != null) { - nCrossValidations().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - if (testData() != null) { - testData().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("trainingData", trainingData()); - jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); - jsonWriter.writeStringField("targetColumnName", targetColumnName()); - jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); - jsonWriter.writeJsonField("trainingSettings", this.trainingSettings); - jsonWriter.writeStringField("positiveLabel", this.positiveLabel); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); - jsonWriter.writeArrayField("cvSplitColumnNames", this.cvSplitColumnNames, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("weightColumnName", this.weightColumnName); - jsonWriter.writeJsonField("validationData", this.validationData); - jsonWriter.writeJsonField("testData", this.testData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); - jsonWriter.writeNumberField("testDataSize", this.testDataSize); - jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Classification from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Classification if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the Classification. - */ - public static Classification fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Classification deserializedClassification = new Classification(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("trainingData".equals(fieldName)) { - deserializedClassification.withTrainingData(MLTableJobInput.fromJson(reader)); - } else if ("logVerbosity".equals(fieldName)) { - deserializedClassification.withLogVerbosity(LogVerbosity.fromString(reader.getString())); - } else if ("targetColumnName".equals(fieldName)) { - deserializedClassification.withTargetColumnName(reader.getString()); - } else if ("taskType".equals(fieldName)) { - deserializedClassification.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedClassification.primaryMetric - = ClassificationPrimaryMetrics.fromString(reader.getString()); - } else if ("trainingSettings".equals(fieldName)) { - deserializedClassification.trainingSettings = ClassificationTrainingSettings.fromJson(reader); - } else if ("positiveLabel".equals(fieldName)) { - deserializedClassification.positiveLabel = reader.getString(); - } else if ("limitSettings".equals(fieldName)) { - deserializedClassification.limitSettings = TableVerticalLimitSettings.fromJson(reader); - } else if ("nCrossValidations".equals(fieldName)) { - deserializedClassification.nCrossValidations = NCrossValidations.fromJson(reader); - } else if ("cvSplitColumnNames".equals(fieldName)) { - List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); - deserializedClassification.cvSplitColumnNames = cvSplitColumnNames; - } else if ("weightColumnName".equals(fieldName)) { - deserializedClassification.weightColumnName = reader.getString(); - } else if ("validationData".equals(fieldName)) { - deserializedClassification.validationData = MLTableJobInput.fromJson(reader); - } else if ("testData".equals(fieldName)) { - deserializedClassification.testData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedClassification.validationDataSize = reader.getNullable(JsonReader::getDouble); - } else if ("testDataSize".equals(fieldName)) { - deserializedClassification.testDataSize = reader.getNullable(JsonReader::getDouble); - } else if ("featurizationSettings".equals(fieldName)) { - deserializedClassification.featurizationSettings - = TableVerticalFeaturizationSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedClassification; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.java deleted file mode 100644 index f2da43698f82..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum for all classification models supported by AutoML. - */ -public final class ClassificationModels extends ExpandableStringEnum { - /** - * Static value LogisticRegression for ClassificationModels. - */ - public static final ClassificationModels LOGISTIC_REGRESSION = fromString("LogisticRegression"); - - /** - * Static value SGD for ClassificationModels. - */ - public static final ClassificationModels SGD = fromString("SGD"); - - /** - * Static value MultinomialNaiveBayes for ClassificationModels. - */ - public static final ClassificationModels MULTINOMIAL_NAIVE_BAYES = fromString("MultinomialNaiveBayes"); - - /** - * Static value BernoulliNaiveBayes for ClassificationModels. - */ - public static final ClassificationModels BERNOULLI_NAIVE_BAYES = fromString("BernoulliNaiveBayes"); - - /** - * Static value SVM for ClassificationModels. - */ - public static final ClassificationModels SVM = fromString("SVM"); - - /** - * Static value LinearSVM for ClassificationModels. - */ - public static final ClassificationModels LINEAR_SVM = fromString("LinearSVM"); - - /** - * Static value KNN for ClassificationModels. - */ - public static final ClassificationModels KNN = fromString("KNN"); - - /** - * Static value DecisionTree for ClassificationModels. - */ - public static final ClassificationModels DECISION_TREE = fromString("DecisionTree"); - - /** - * Static value RandomForest for ClassificationModels. - */ - public static final ClassificationModels RANDOM_FOREST = fromString("RandomForest"); - - /** - * Static value ExtremeRandomTrees for ClassificationModels. - */ - public static final ClassificationModels EXTREME_RANDOM_TREES = fromString("ExtremeRandomTrees"); - - /** - * Static value LightGBM for ClassificationModels. - */ - public static final ClassificationModels LIGHT_GBM = fromString("LightGBM"); - - /** - * Static value GradientBoosting for ClassificationModels. - */ - public static final ClassificationModels GRADIENT_BOOSTING = fromString("GradientBoosting"); - - /** - * Static value XGBoostClassifier for ClassificationModels. - */ - public static final ClassificationModels XGBOOST_CLASSIFIER = fromString("XGBoostClassifier"); - - /** - * Creates a new instance of ClassificationModels value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClassificationModels() { - } - - /** - * Creates or finds a ClassificationModels from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClassificationModels. - */ - public static ClassificationModels fromString(String name) { - return fromString(name, ClassificationModels.class); - } - - /** - * Gets known ClassificationModels values. - * - * @return known ClassificationModels values. - */ - public static Collection values() { - return values(ClassificationModels.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.java deleted file mode 100644 index e885b6299479..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Primary metrics for classification multilabel tasks. - */ -public final class ClassificationMultilabelPrimaryMetrics - extends ExpandableStringEnum { - /** - * Static value AUCWeighted for ClassificationMultilabelPrimaryMetrics. - */ - public static final ClassificationMultilabelPrimaryMetrics AUCWEIGHTED = fromString("AUCWeighted"); - - /** - * Static value Accuracy for ClassificationMultilabelPrimaryMetrics. - */ - public static final ClassificationMultilabelPrimaryMetrics ACCURACY = fromString("Accuracy"); - - /** - * Static value NormMacroRecall for ClassificationMultilabelPrimaryMetrics. - */ - public static final ClassificationMultilabelPrimaryMetrics NORM_MACRO_RECALL = fromString("NormMacroRecall"); - - /** - * Static value AveragePrecisionScoreWeighted for ClassificationMultilabelPrimaryMetrics. - */ - public static final ClassificationMultilabelPrimaryMetrics AVERAGE_PRECISION_SCORE_WEIGHTED - = fromString("AveragePrecisionScoreWeighted"); - - /** - * Static value PrecisionScoreWeighted for ClassificationMultilabelPrimaryMetrics. - */ - public static final ClassificationMultilabelPrimaryMetrics PRECISION_SCORE_WEIGHTED - = fromString("PrecisionScoreWeighted"); - - /** - * Static value IOU for ClassificationMultilabelPrimaryMetrics. - */ - public static final ClassificationMultilabelPrimaryMetrics IOU = fromString("IOU"); - - /** - * Creates a new instance of ClassificationMultilabelPrimaryMetrics value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClassificationMultilabelPrimaryMetrics() { - } - - /** - * Creates or finds a ClassificationMultilabelPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClassificationMultilabelPrimaryMetrics. - */ - public static ClassificationMultilabelPrimaryMetrics fromString(String name) { - return fromString(name, ClassificationMultilabelPrimaryMetrics.class); - } - - /** - * Gets known ClassificationMultilabelPrimaryMetrics values. - * - * @return known ClassificationMultilabelPrimaryMetrics values. - */ - public static Collection values() { - return values(ClassificationMultilabelPrimaryMetrics.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.java deleted file mode 100644 index cdf1c8bed2fd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Primary metrics for classification tasks. - */ -public final class ClassificationPrimaryMetrics extends ExpandableStringEnum { - /** - * Static value AUCWeighted for ClassificationPrimaryMetrics. - */ - public static final ClassificationPrimaryMetrics AUCWEIGHTED = fromString("AUCWeighted"); - - /** - * Static value Accuracy for ClassificationPrimaryMetrics. - */ - public static final ClassificationPrimaryMetrics ACCURACY = fromString("Accuracy"); - - /** - * Static value NormMacroRecall for ClassificationPrimaryMetrics. - */ - public static final ClassificationPrimaryMetrics NORM_MACRO_RECALL = fromString("NormMacroRecall"); - - /** - * Static value AveragePrecisionScoreWeighted for ClassificationPrimaryMetrics. - */ - public static final ClassificationPrimaryMetrics AVERAGE_PRECISION_SCORE_WEIGHTED - = fromString("AveragePrecisionScoreWeighted"); - - /** - * Static value PrecisionScoreWeighted for ClassificationPrimaryMetrics. - */ - public static final ClassificationPrimaryMetrics PRECISION_SCORE_WEIGHTED = fromString("PrecisionScoreWeighted"); - - /** - * Creates a new instance of ClassificationPrimaryMetrics value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClassificationPrimaryMetrics() { - } - - /** - * Creates or finds a ClassificationPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClassificationPrimaryMetrics. - */ - public static ClassificationPrimaryMetrics fromString(String name) { - return fromString(name, ClassificationPrimaryMetrics.class); - } - - /** - * Gets known ClassificationPrimaryMetrics values. - * - * @return known ClassificationPrimaryMetrics values. - */ - public static Collection values() { - return values(ClassificationPrimaryMetrics.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java deleted file mode 100644 index 3006428bbd8e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; -import java.util.List; - -/** - * Classification Training related configuration. - */ -@Fluent -public final class ClassificationTrainingSettings extends TrainingSettings { - /* - * Allowed models for classification task. - */ - private List allowedTrainingAlgorithms; - - /* - * Blocked models for classification task. - */ - private List blockedTrainingAlgorithms; - - /** - * Creates an instance of ClassificationTrainingSettings class. - */ - public ClassificationTrainingSettings() { - } - - /** - * Get the allowedTrainingAlgorithms property: Allowed models for classification task. - * - * @return the allowedTrainingAlgorithms value. - */ - public List allowedTrainingAlgorithms() { - return this.allowedTrainingAlgorithms; - } - - /** - * Set the allowedTrainingAlgorithms property: Allowed models for classification task. - * - * @param allowedTrainingAlgorithms the allowedTrainingAlgorithms value to set. - * @return the ClassificationTrainingSettings object itself. - */ - public ClassificationTrainingSettings - withAllowedTrainingAlgorithms(List allowedTrainingAlgorithms) { - this.allowedTrainingAlgorithms = allowedTrainingAlgorithms; - return this; - } - - /** - * Get the blockedTrainingAlgorithms property: Blocked models for classification task. - * - * @return the blockedTrainingAlgorithms value. - */ - public List blockedTrainingAlgorithms() { - return this.blockedTrainingAlgorithms; - } - - /** - * Set the blockedTrainingAlgorithms property: Blocked models for classification task. - * - * @param blockedTrainingAlgorithms the blockedTrainingAlgorithms value to set. - * @return the ClassificationTrainingSettings object itself. - */ - public ClassificationTrainingSettings - withBlockedTrainingAlgorithms(List blockedTrainingAlgorithms) { - this.blockedTrainingAlgorithms = blockedTrainingAlgorithms; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClassificationTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { - super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClassificationTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { - super.withStackEnsembleSettings(stackEnsembleSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClassificationTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { - super.withEnableStackEnsemble(enableStackEnsemble); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClassificationTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { - super.withEnableVoteEnsemble(enableVoteEnsemble); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClassificationTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { - super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClassificationTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { - super.withEnableModelExplainability(enableModelExplainability); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClassificationTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { - super.withEnableDnnTraining(enableDnnTraining); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enableOnnxCompatibleModels", enableOnnxCompatibleModels()); - jsonWriter.writeJsonField("stackEnsembleSettings", stackEnsembleSettings()); - jsonWriter.writeBooleanField("enableStackEnsemble", enableStackEnsemble()); - jsonWriter.writeBooleanField("enableVoteEnsemble", enableVoteEnsemble()); - jsonWriter.writeStringField("ensembleModelDownloadTimeout", - CoreUtils.durationToStringWithDays(ensembleModelDownloadTimeout())); - jsonWriter.writeBooleanField("enableModelExplainability", enableModelExplainability()); - jsonWriter.writeBooleanField("enableDnnTraining", enableDnnTraining()); - jsonWriter.writeArrayField("allowedTrainingAlgorithms", this.allowedTrainingAlgorithms, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeArrayField("blockedTrainingAlgorithms", this.blockedTrainingAlgorithms, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ClassificationTrainingSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClassificationTrainingSettings if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ClassificationTrainingSettings. - */ - public static ClassificationTrainingSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClassificationTrainingSettings deserializedClassificationTrainingSettings - = new ClassificationTrainingSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enableOnnxCompatibleModels".equals(fieldName)) { - deserializedClassificationTrainingSettings - .withEnableOnnxCompatibleModels(reader.getNullable(JsonReader::getBoolean)); - } else if ("stackEnsembleSettings".equals(fieldName)) { - deserializedClassificationTrainingSettings - .withStackEnsembleSettings(StackEnsembleSettings.fromJson(reader)); - } else if ("enableStackEnsemble".equals(fieldName)) { - deserializedClassificationTrainingSettings - .withEnableStackEnsemble(reader.getNullable(JsonReader::getBoolean)); - } else if ("enableVoteEnsemble".equals(fieldName)) { - deserializedClassificationTrainingSettings - .withEnableVoteEnsemble(reader.getNullable(JsonReader::getBoolean)); - } else if ("ensembleModelDownloadTimeout".equals(fieldName)) { - deserializedClassificationTrainingSettings.withEnsembleModelDownloadTimeout( - reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()))); - } else if ("enableModelExplainability".equals(fieldName)) { - deserializedClassificationTrainingSettings - .withEnableModelExplainability(reader.getNullable(JsonReader::getBoolean)); - } else if ("enableDnnTraining".equals(fieldName)) { - deserializedClassificationTrainingSettings - .withEnableDnnTraining(reader.getNullable(JsonReader::getBoolean)); - } else if ("allowedTrainingAlgorithms".equals(fieldName)) { - List allowedTrainingAlgorithms - = reader.readArray(reader1 -> ClassificationModels.fromString(reader1.getString())); - deserializedClassificationTrainingSettings.allowedTrainingAlgorithms = allowedTrainingAlgorithms; - } else if ("blockedTrainingAlgorithms".equals(fieldName)) { - List blockedTrainingAlgorithms - = reader.readArray(reader1 -> ClassificationModels.fromString(reader1.getString())); - deserializedClassificationTrainingSettings.blockedTrainingAlgorithms = blockedTrainingAlgorithms; - } else { - reader.skipChildren(); - } - } - - return deserializedClassificationTrainingSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java deleted file mode 100644 index 24e49f2cbc2a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Intended usage of the cluster. - */ -public final class ClusterPurpose extends ExpandableStringEnum { - /** - * Static value FastProd for ClusterPurpose. - */ - public static final ClusterPurpose FAST_PROD = fromString("FastProd"); - - /** - * Static value DenseProd for ClusterPurpose. - */ - public static final ClusterPurpose DENSE_PROD = fromString("DenseProd"); - - /** - * Static value DevTest for ClusterPurpose. - */ - public static final ClusterPurpose DEV_TEST = fromString("DevTest"); - - /** - * Creates a new instance of ClusterPurpose value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClusterPurpose() { - } - - /** - * Creates or finds a ClusterPurpose from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClusterPurpose. - */ - public static ClusterPurpose fromString(String name) { - return fromString(name, ClusterPurpose.class); - } - - /** - * Gets known ClusterPurpose values. - * - * @return known ClusterPurpose values. - */ - public static Collection values() { - return values(ClusterPurpose.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.java deleted file mode 100644 index 6d2e80d2c494..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.ClusterUpdateProperties; -import java.io.IOException; - -/** - * AmlCompute update parameters. - */ -@Fluent -public final class ClusterUpdateParameters implements JsonSerializable { - /* - * The properties of the amlCompute. - */ - private ClusterUpdateProperties innerProperties; - - /** - * Creates an instance of ClusterUpdateParameters class. - */ - public ClusterUpdateParameters() { - } - - /** - * Get the innerProperties property: The properties of the amlCompute. - * - * @return the innerProperties value. - */ - private ClusterUpdateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the properties property: Properties of ClusterUpdate. - * - * @return the properties value. - */ - public ScaleSettingsInformation properties() { - return this.innerProperties() == null ? null : this.innerProperties().properties(); - } - - /** - * Set the properties property: Properties of ClusterUpdate. - * - * @param properties the properties value to set. - * @return the ClusterUpdateParameters object itself. - */ - public ClusterUpdateParameters withProperties(ScaleSettingsInformation properties) { - if (this.innerProperties() == null) { - this.innerProperties = new ClusterUpdateProperties(); - } - this.innerProperties().withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ClusterUpdateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClusterUpdateParameters if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ClusterUpdateParameters. - */ - public static ClusterUpdateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClusterUpdateParameters deserializedClusterUpdateParameters = new ClusterUpdateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedClusterUpdateParameters.innerProperties = ClusterUpdateProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedClusterUpdateParameters; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.java deleted file mode 100644 index e645bbbbacc3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configuration for a scoring code asset. - */ -@Fluent -public final class CodeConfiguration implements JsonSerializable { - /* - * ARM resource ID of the code asset. - */ - private String codeId; - - /* - * [Required] The script to execute on startup. eg. "score.py" - */ - private String scoringScript; - - /** - * Creates an instance of CodeConfiguration class. - */ - public CodeConfiguration() { - } - - /** - * Get the codeId property: ARM resource ID of the code asset. - * - * @return the codeId value. - */ - public String codeId() { - return this.codeId; - } - - /** - * Set the codeId property: ARM resource ID of the code asset. - * - * @param codeId the codeId value to set. - * @return the CodeConfiguration object itself. - */ - public CodeConfiguration withCodeId(String codeId) { - this.codeId = codeId; - return this; - } - - /** - * Get the scoringScript property: [Required] The script to execute on startup. eg. "score.py". - * - * @return the scoringScript value. - */ - public String scoringScript() { - return this.scoringScript; - } - - /** - * Set the scoringScript property: [Required] The script to execute on startup. eg. "score.py". - * - * @param scoringScript the scoringScript value to set. - * @return the CodeConfiguration object itself. - */ - public CodeConfiguration withScoringScript(String scoringScript) { - this.scoringScript = scoringScript; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scoringScript() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property scoringScript in model CodeConfiguration")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodeConfiguration.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("scoringScript", this.scoringScript); - jsonWriter.writeStringField("codeId", this.codeId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CodeConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CodeConfiguration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CodeConfiguration. - */ - public static CodeConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CodeConfiguration deserializedCodeConfiguration = new CodeConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scoringScript".equals(fieldName)) { - deserializedCodeConfiguration.scoringScript = reader.getString(); - } else if ("codeId".equals(fieldName)) { - deserializedCodeConfiguration.codeId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCodeConfiguration; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java deleted file mode 100644 index 6371a8227255..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.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.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; - -/** - * An immutable client-side representation of CodeContainer. - */ -public interface CodeContainer { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - CodeContainerProperties 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.machinelearning.fluent.models.CodeContainerInner object. - * - * @return the inner object. - */ - CodeContainerInner innerModel(); - - /** - * The entirety of the CodeContainer definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The CodeContainer definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the CodeContainer definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the CodeContainer definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the CodeContainer definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(CodeContainerProperties properties); - } - - /** - * The stage of the CodeContainer 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - CodeContainer create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - CodeContainer create(Context context); - } - } - - /** - * Begins update for the CodeContainer resource. - * - * @return the stage of resource update. - */ - CodeContainer.Update update(); - - /** - * The template for CodeContainer update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - CodeContainer apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - CodeContainer apply(Context context); - } - - /** - * The CodeContainer update stages. - */ - interface UpdateStages { - /** - * The stage of the CodeContainer update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(CodeContainerProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - CodeContainer refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - CodeContainer refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java deleted file mode 100644 index 6257379a5b61..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Container for code asset versions. - */ -@Fluent -public final class CodeContainerProperties extends AssetContainer { - /* - * Provisioning state for the code container. - */ - private AssetProvisioningState provisioningState; - - /* - * The latest version inside this container. - */ - private String latestVersion; - - /* - * The next auto incremental version - */ - private String nextVersion; - - /** - * Creates an instance of CodeContainerProperties class. - */ - public CodeContainerProperties() { - } - - /** - * Get the provisioningState property: Provisioning state for the code container. - * - * @return the provisioningState value. - */ - public AssetProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the latestVersion property: The latest version inside this container. - * - * @return the latestVersion value. - */ - @Override - public String latestVersion() { - return this.latestVersion; - } - - /** - * Get the nextVersion property: The next auto incremental version. - * - * @return the nextVersion value. - */ - @Override - public String nextVersion() { - return this.nextVersion; - } - - /** - * {@inheritDoc} - */ - @Override - public CodeContainerProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CodeContainerProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CodeContainerProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CodeContainerProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CodeContainerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CodeContainerProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the CodeContainerProperties. - */ - public static CodeContainerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CodeContainerProperties deserializedCodeContainerProperties = new CodeContainerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedCodeContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedCodeContainerProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedCodeContainerProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedCodeContainerProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("latestVersion".equals(fieldName)) { - deserializedCodeContainerProperties.latestVersion = reader.getString(); - } else if ("nextVersion".equals(fieldName)) { - deserializedCodeContainerProperties.nextVersion = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedCodeContainerProperties.provisioningState - = AssetProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCodeContainerProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerResourceArmPaginatedResult.java deleted file mode 100644 index fa6d0216426d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerResourceArmPaginatedResult.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of CodeContainer entities. - */ -@Fluent -public final class CodeContainerResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type CodeContainer. - */ - private List value; - - /* - * The link to the next page of CodeContainer objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of CodeContainerResourceArmPaginatedResult class. - */ - public CodeContainerResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type CodeContainer. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type CodeContainer. - * - * @param value the value value to set. - * @return the CodeContainerResourceArmPaginatedResult object itself. - */ - public CodeContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of CodeContainer objects. If null, there are no additional - * pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of CodeContainer objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the CodeContainerResourceArmPaginatedResult object itself. - */ - public CodeContainerResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CodeContainerResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CodeContainerResourceArmPaginatedResult if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CodeContainerResourceArmPaginatedResult. - */ - public static CodeContainerResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CodeContainerResourceArmPaginatedResult deserializedCodeContainerResourceArmPaginatedResult - = new CodeContainerResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> CodeContainerInner.fromJson(reader1)); - deserializedCodeContainerResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedCodeContainerResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCodeContainerResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainers.java deleted file mode 100644 index 5437e571293d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainers.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 CodeContainers. - */ -public interface CodeContainers { - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container. - */ - CodeContainer get(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @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 container along with {@link Response}. - */ - CodeContainer getById(String id); - - /** - * Get container. - * - * @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 container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete container. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new CodeContainer resource. - * - * @param name resource name. - * @return the first stage of the new CodeContainer definition. - */ - CodeContainer.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java deleted file mode 100644 index ffc70fdfbf62..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.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.machinelearning.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; - -/** - * An immutable client-side representation of CodeVersion. - */ -public interface CodeVersion { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - CodeVersionProperties 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.machinelearning.fluent.models.CodeVersionInner object. - * - * @return the inner object. - */ - CodeVersionInner innerModel(); - - /** - * The entirety of the CodeVersion definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The CodeVersion definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the CodeVersion definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the CodeVersion definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @return the next definition stage. - */ - WithProperties withExistingCode(String resourceGroupName, String workspaceName, String name); - } - - /** - * The stage of the CodeVersion definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(CodeVersionProperties properties); - } - - /** - * The stage of the CodeVersion 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - CodeVersion create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - CodeVersion create(Context context); - } - } - - /** - * Begins update for the CodeVersion resource. - * - * @return the stage of resource update. - */ - CodeVersion.Update update(); - - /** - * The template for CodeVersion update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - CodeVersion apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - CodeVersion apply(Context context); - } - - /** - * The CodeVersion update stages. - */ - interface UpdateStages { - /** - * The stage of the CodeVersion update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(CodeVersionProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - CodeVersion refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - CodeVersion refresh(Context context); - - /** - * Publish version asset into registry. - * - * @param body Destination registry info. - * @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. - */ - void publish(DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param body Destination registry info. - * @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. - */ - void publish(DestinationAsset body, Context context); - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param body Pending upload request object. - * @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 response body along with {@link Response}. - */ - Response createOrGetStartPendingUploadWithResponse(PendingUploadRequestDto body, - Context context); - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param body Pending upload request object. - * @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 response. - */ - PendingUploadResponseDto createOrGetStartPendingUpload(PendingUploadRequestDto body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java deleted file mode 100644 index cca06a1869e4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Code asset version details. - */ -@Fluent -public final class CodeVersionProperties extends AssetBase { - /* - * Uri where code is located - */ - private String codeUri; - - /* - * Provisioning state for the code version. - */ - private AssetProvisioningState provisioningState; - - /** - * Creates an instance of CodeVersionProperties class. - */ - public CodeVersionProperties() { - } - - /** - * Get the codeUri property: Uri where code is located. - * - * @return the codeUri value. - */ - public String codeUri() { - return this.codeUri; - } - - /** - * Set the codeUri property: Uri where code is located. - * - * @param codeUri the codeUri value to set. - * @return the CodeVersionProperties object itself. - */ - public CodeVersionProperties withCodeUri(String codeUri) { - this.codeUri = codeUri; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the code version. - * - * @return the provisioningState value. - */ - public AssetProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public CodeVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CodeVersionProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CodeVersionProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CodeVersionProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CodeVersionProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); - jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); - jsonWriter.writeStringField("codeUri", this.codeUri); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CodeVersionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CodeVersionProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the CodeVersionProperties. - */ - public static CodeVersionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CodeVersionProperties deserializedCodeVersionProperties = new CodeVersionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedCodeVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedCodeVersionProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedCodeVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedCodeVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("isAnonymous".equals(fieldName)) { - deserializedCodeVersionProperties.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); - } else if ("codeUri".equals(fieldName)) { - deserializedCodeVersionProperties.codeUri = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedCodeVersionProperties.provisioningState - = AssetProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCodeVersionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionResourceArmPaginatedResult.java deleted file mode 100644 index a45cfdbbf5dd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionResourceArmPaginatedResult.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of CodeVersion entities. - */ -@Fluent -public final class CodeVersionResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type CodeVersion. - */ - private List value; - - /* - * The link to the next page of CodeVersion objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of CodeVersionResourceArmPaginatedResult class. - */ - public CodeVersionResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type CodeVersion. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type CodeVersion. - * - * @param value the value value to set. - * @return the CodeVersionResourceArmPaginatedResult object itself. - */ - public CodeVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of CodeVersion objects. If null, there are no additional - * pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of CodeVersion objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the CodeVersionResourceArmPaginatedResult object itself. - */ - public CodeVersionResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CodeVersionResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CodeVersionResourceArmPaginatedResult if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CodeVersionResourceArmPaginatedResult. - */ - public static CodeVersionResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CodeVersionResourceArmPaginatedResult deserializedCodeVersionResourceArmPaginatedResult - = new CodeVersionResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> CodeVersionInner.fromJson(reader1)); - deserializedCodeVersionResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedCodeVersionResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCodeVersionResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersions.java deleted file mode 100644 index 030b203233ac..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersions.java +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 CodeVersions. - */ -public interface CodeVersions { - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. - * @param hashVersion Hash algorithm version when listing by hash. - * @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 a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, - Integer top, String skip, String hash, String hashVersion, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - CodeVersion get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, - Context context); - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response}. - */ - Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, - String workspaceName, String name, String version, PendingUploadRequestDto body, Context context); - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response. - */ - PendingUploadResponseDto createOrGetStartPendingUpload(String resourceGroupName, String workspaceName, String name, - String version, PendingUploadRequestDto body); - - /** - * Get version. - * - * @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 version along with {@link Response}. - */ - CodeVersion getById(String id); - - /** - * Get version. - * - * @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 version along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete version. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete version. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new CodeVersion resource. - * - * @param name resource name. - * @return the first stage of the new CodeVersion definition. - */ - CodeVersion.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Collection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Collection.java deleted file mode 100644 index 6dc7e1989260..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Collection.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The Collection model. - */ -@Fluent -public final class Collection implements JsonSerializable { - /* - * The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default. - */ - private Double samplingRate; - - /* - * Enable or disable data collection. - */ - private DataCollectionMode dataCollectionMode; - - /* - * The data asset arm resource id. Client side will ensure data asset is pointing to the blob storage, and backend - * will collect data to the blob storage. - */ - private String dataId; - - /* - * The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint - * identity to auth. - */ - private String clientId; - - /** - * Creates an instance of Collection class. - */ - public Collection() { - } - - /** - * Get the samplingRate property: The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data - * by default. - * - * @return the samplingRate value. - */ - public Double samplingRate() { - return this.samplingRate; - } - - /** - * Set the samplingRate property: The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data - * by default. - * - * @param samplingRate the samplingRate value to set. - * @return the Collection object itself. - */ - public Collection withSamplingRate(Double samplingRate) { - this.samplingRate = samplingRate; - return this; - } - - /** - * Get the dataCollectionMode property: Enable or disable data collection. - * - * @return the dataCollectionMode value. - */ - public DataCollectionMode dataCollectionMode() { - return this.dataCollectionMode; - } - - /** - * Set the dataCollectionMode property: Enable or disable data collection. - * - * @param dataCollectionMode the dataCollectionMode value to set. - * @return the Collection object itself. - */ - public Collection withDataCollectionMode(DataCollectionMode dataCollectionMode) { - this.dataCollectionMode = dataCollectionMode; - return this; - } - - /** - * Get the dataId property: The data asset arm resource id. Client side will ensure data asset is pointing to the - * blob storage, and backend will collect data to the blob storage. - * - * @return the dataId value. - */ - public String dataId() { - return this.dataId; - } - - /** - * Set the dataId property: The data asset arm resource id. Client side will ensure data asset is pointing to the - * blob storage, and backend will collect data to the blob storage. - * - * @param dataId the dataId value to set. - * @return the Collection object itself. - */ - public Collection withDataId(String dataId) { - this.dataId = dataId; - return this; - } - - /** - * Get the clientId property: The msi client id used to collect logging to blob storage. If it's null,backend will - * pick a registered endpoint identity to auth. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: The msi client id used to collect logging to blob storage. If it's null,backend will - * pick a registered endpoint identity to auth. - * - * @param clientId the clientId value to set. - * @return the Collection object itself. - */ - public Collection withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("samplingRate", this.samplingRate); - jsonWriter.writeStringField("dataCollectionMode", - this.dataCollectionMode == null ? null : this.dataCollectionMode.toString()); - jsonWriter.writeStringField("dataId", this.dataId); - jsonWriter.writeStringField("clientId", this.clientId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Collection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Collection if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the Collection. - */ - public static Collection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Collection deserializedCollection = new Collection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("samplingRate".equals(fieldName)) { - deserializedCollection.samplingRate = reader.getNullable(JsonReader::getDouble); - } else if ("dataCollectionMode".equals(fieldName)) { - deserializedCollection.dataCollectionMode = DataCollectionMode.fromString(reader.getString()); - } else if ("dataId".equals(fieldName)) { - deserializedCollection.dataId = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedCollection.clientId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCollection; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java deleted file mode 100644 index b1bd2bd6febb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Column transformer parameters. - */ -@Fluent -public final class ColumnTransformer implements JsonSerializable { - /* - * Fields to apply transformer logic on. - */ - private List fields; - - /* - * Different properties to be passed to transformer. - * Input expected is dictionary of key,value pairs in JSON format. - */ - private Object parameters; - - /** - * Creates an instance of ColumnTransformer class. - */ - public ColumnTransformer() { - } - - /** - * Get the fields property: Fields to apply transformer logic on. - * - * @return the fields value. - */ - public List fields() { - return this.fields; - } - - /** - * Set the fields property: Fields to apply transformer logic on. - * - * @param fields the fields value to set. - * @return the ColumnTransformer object itself. - */ - public ColumnTransformer withFields(List fields) { - this.fields = fields; - return this; - } - - /** - * Get the parameters property: Different properties to be passed to transformer. - * Input expected is dictionary of key,value pairs in JSON format. - * - * @return the parameters value. - */ - public Object parameters() { - return this.parameters; - } - - /** - * Set the parameters property: Different properties to be passed to transformer. - * Input expected is dictionary of key,value pairs in JSON format. - * - * @param parameters the parameters value to set. - * @return the ColumnTransformer object itself. - */ - public ColumnTransformer withParameters(Object parameters) { - this.parameters = parameters; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("fields", this.fields, (writer, element) -> writer.writeString(element)); - jsonWriter.writeUntypedField("parameters", this.parameters); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ColumnTransformer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ColumnTransformer if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ColumnTransformer. - */ - public static ColumnTransformer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ColumnTransformer deserializedColumnTransformer = new ColumnTransformer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fields".equals(fieldName)) { - List fields = reader.readArray(reader1 -> reader1.getString()); - deserializedColumnTransformer.fields = fields; - } else if ("parameters".equals(fieldName)) { - deserializedColumnTransformer.parameters = reader.readUntyped(); - } else { - reader.skipChildren(); - } - } - - return deserializedColumnTransformer; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJob.java deleted file mode 100644 index c0bd48df854b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJob.java +++ /dev/null @@ -1,577 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Command job definition. - */ -@Fluent -public final class CommandJob extends JobBaseProperties { - /* - * [Required] Specifies the type of job. - */ - private JobType jobType = JobType.COMMAND; - - /* - * Compute Resource configuration for the job. - */ - private JobResourceConfiguration resources; - - /* - * ARM resource ID of the code asset. - */ - private String codeId; - - /* - * [Required] The command to execute on startup of the job. eg. "python train.py" - */ - private String command; - - /* - * [Required] The ARM resource ID of the Environment specification for the job. - */ - private String environmentId; - - /* - * Mapping of input data bindings used in the job. - */ - private Map inputs; - - /* - * Mapping of output data bindings used in the job. - */ - private Map outputs; - - /* - * Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. - */ - private DistributionConfiguration distribution; - - /* - * Command Job limit. - */ - private CommandJobLimits limits; - - /* - * Environment variables included in the job. - */ - private Map environmentVariables; - - /* - * Input parameters. - */ - private Object parameters; - - /* - * Queue settings for the job - */ - private QueueSettings queueSettings; - - /* - * Status of the job. - */ - private JobStatus status; - - /** - * Creates an instance of CommandJob class. - */ - public CommandJob() { - } - - /** - * Get the jobType property: [Required] Specifies the type of job. - * - * @return the jobType value. - */ - @Override - public JobType jobType() { - return this.jobType; - } - - /** - * Get the resources property: Compute Resource configuration for the job. - * - * @return the resources value. - */ - public JobResourceConfiguration resources() { - return this.resources; - } - - /** - * Set the resources property: Compute Resource configuration for the job. - * - * @param resources the resources value to set. - * @return the CommandJob object itself. - */ - public CommandJob withResources(JobResourceConfiguration resources) { - this.resources = resources; - return this; - } - - /** - * Get the codeId property: ARM resource ID of the code asset. - * - * @return the codeId value. - */ - public String codeId() { - return this.codeId; - } - - /** - * Set the codeId property: ARM resource ID of the code asset. - * - * @param codeId the codeId value to set. - * @return the CommandJob object itself. - */ - public CommandJob withCodeId(String codeId) { - this.codeId = codeId; - return this; - } - - /** - * Get the command property: [Required] The command to execute on startup of the job. eg. "python train.py". - * - * @return the command value. - */ - public String command() { - return this.command; - } - - /** - * Set the command property: [Required] The command to execute on startup of the job. eg. "python train.py". - * - * @param command the command value to set. - * @return the CommandJob object itself. - */ - public CommandJob withCommand(String command) { - this.command = command; - return this; - } - - /** - * Get the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. - * - * @param environmentId the environmentId value to set. - * @return the CommandJob object itself. - */ - public CommandJob withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Get the inputs property: Mapping of input data bindings used in the job. - * - * @return the inputs value. - */ - public Map inputs() { - return this.inputs; - } - - /** - * Set the inputs property: Mapping of input data bindings used in the job. - * - * @param inputs the inputs value to set. - * @return the CommandJob object itself. - */ - public CommandJob withInputs(Map inputs) { - this.inputs = inputs; - return this; - } - - /** - * Get the outputs property: Mapping of output data bindings used in the job. - * - * @return the outputs value. - */ - public Map outputs() { - return this.outputs; - } - - /** - * Set the outputs property: Mapping of output data bindings used in the job. - * - * @param outputs the outputs value to set. - * @return the CommandJob object itself. - */ - public CommandJob withOutputs(Map outputs) { - this.outputs = outputs; - return this; - } - - /** - * Get the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, - * Tensorflow, PyTorch, or null. - * - * @return the distribution value. - */ - public DistributionConfiguration distribution() { - return this.distribution; - } - - /** - * Set the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, - * Tensorflow, PyTorch, or null. - * - * @param distribution the distribution value to set. - * @return the CommandJob object itself. - */ - public CommandJob withDistribution(DistributionConfiguration distribution) { - this.distribution = distribution; - return this; - } - - /** - * Get the limits property: Command Job limit. - * - * @return the limits value. - */ - public CommandJobLimits limits() { - return this.limits; - } - - /** - * Set the limits property: Command Job limit. - * - * @param limits the limits value to set. - * @return the CommandJob object itself. - */ - public CommandJob withLimits(CommandJobLimits limits) { - this.limits = limits; - return this; - } - - /** - * Get the environmentVariables property: Environment variables included in the job. - * - * @return the environmentVariables value. - */ - public Map environmentVariables() { - return this.environmentVariables; - } - - /** - * Set the environmentVariables property: Environment variables included in the job. - * - * @param environmentVariables the environmentVariables value to set. - * @return the CommandJob object itself. - */ - public CommandJob withEnvironmentVariables(Map environmentVariables) { - this.environmentVariables = environmentVariables; - return this; - } - - /** - * Get the parameters property: Input parameters. - * - * @return the parameters value. - */ - public Object parameters() { - return this.parameters; - } - - /** - * Get the queueSettings property: Queue settings for the job. - * - * @return the queueSettings value. - */ - public QueueSettings queueSettings() { - return this.queueSettings; - } - - /** - * Set the queueSettings property: Queue settings for the job. - * - * @param queueSettings the queueSettings value to set. - * @return the CommandJob object itself. - */ - public CommandJob withQueueSettings(QueueSettings queueSettings) { - this.queueSettings = queueSettings; - return this; - } - - /** - * Get the status property: Status of the job. - * - * @return the status value. - */ - @Override - public JobStatus status() { - return this.status; - } - - /** - * {@inheritDoc} - */ - @Override - public CommandJob withDisplayName(String displayName) { - super.withDisplayName(displayName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CommandJob withExperimentName(String experimentName) { - super.withExperimentName(experimentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CommandJob withServices(Map services) { - super.withServices(services); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CommandJob withComputeId(String computeId) { - super.withComputeId(computeId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CommandJob withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CommandJob withIdentity(IdentityConfiguration identity) { - super.withIdentity(identity); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CommandJob withComponentId(String componentId) { - super.withComponentId(componentId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CommandJob withNotificationSetting(NotificationSetting notificationSetting) { - super.withNotificationSetting(notificationSetting); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CommandJob withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CommandJob withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CommandJob withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (resources() != null) { - resources().validate(); - } - if (command() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property command in model CommandJob")); - } - if (environmentId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property environmentId in model CommandJob")); - } - if (inputs() != null) { - inputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (outputs() != null) { - outputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (distribution() != null) { - distribution().validate(); - } - if (limits() != null) { - limits().validate(); - } - if (queueSettings() != null) { - queueSettings().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CommandJob.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("displayName", displayName()); - jsonWriter.writeStringField("experimentName", experimentName()); - jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", computeId()); - jsonWriter.writeBooleanField("isArchived", isArchived()); - jsonWriter.writeJsonField("identity", identity()); - jsonWriter.writeStringField("componentId", componentId()); - jsonWriter.writeJsonField("notificationSetting", notificationSetting()); - jsonWriter.writeStringField("command", this.command); - jsonWriter.writeStringField("environmentId", this.environmentId); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeJsonField("resources", this.resources); - jsonWriter.writeStringField("codeId", this.codeId); - jsonWriter.writeMapField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("distribution", this.distribution); - jsonWriter.writeJsonField("limits", this.limits); - jsonWriter.writeMapField("environmentVariables", this.environmentVariables, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("queueSettings", this.queueSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CommandJob from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CommandJob if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CommandJob. - */ - public static CommandJob fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CommandJob deserializedCommandJob = new CommandJob(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedCommandJob.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedCommandJob.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedCommandJob.withProperties(properties); - } else if ("displayName".equals(fieldName)) { - deserializedCommandJob.withDisplayName(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedCommandJob.status = JobStatus.fromString(reader.getString()); - } else if ("experimentName".equals(fieldName)) { - deserializedCommandJob.withExperimentName(reader.getString()); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedCommandJob.withServices(services); - } else if ("computeId".equals(fieldName)) { - deserializedCommandJob.withComputeId(reader.getString()); - } else if ("isArchived".equals(fieldName)) { - deserializedCommandJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("identity".equals(fieldName)) { - deserializedCommandJob.withIdentity(IdentityConfiguration.fromJson(reader)); - } else if ("componentId".equals(fieldName)) { - deserializedCommandJob.withComponentId(reader.getString()); - } else if ("notificationSetting".equals(fieldName)) { - deserializedCommandJob.withNotificationSetting(NotificationSetting.fromJson(reader)); - } else if ("command".equals(fieldName)) { - deserializedCommandJob.command = reader.getString(); - } else if ("environmentId".equals(fieldName)) { - deserializedCommandJob.environmentId = reader.getString(); - } else if ("jobType".equals(fieldName)) { - deserializedCommandJob.jobType = JobType.fromString(reader.getString()); - } else if ("resources".equals(fieldName)) { - deserializedCommandJob.resources = JobResourceConfiguration.fromJson(reader); - } else if ("codeId".equals(fieldName)) { - deserializedCommandJob.codeId = reader.getString(); - } else if ("inputs".equals(fieldName)) { - Map inputs = reader.readMap(reader1 -> JobInput.fromJson(reader1)); - deserializedCommandJob.inputs = inputs; - } else if ("outputs".equals(fieldName)) { - Map outputs = reader.readMap(reader1 -> JobOutput.fromJson(reader1)); - deserializedCommandJob.outputs = outputs; - } else if ("distribution".equals(fieldName)) { - deserializedCommandJob.distribution = DistributionConfiguration.fromJson(reader); - } else if ("limits".equals(fieldName)) { - deserializedCommandJob.limits = CommandJobLimits.fromJson(reader); - } else if ("environmentVariables".equals(fieldName)) { - Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); - deserializedCommandJob.environmentVariables = environmentVariables; - } else if ("parameters".equals(fieldName)) { - deserializedCommandJob.parameters = reader.readUntyped(); - } else if ("queueSettings".equals(fieldName)) { - deserializedCommandJob.queueSettings = QueueSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCommandJob; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.java deleted file mode 100644 index a45e5518cd9b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; - -/** - * Command Job limit class. - */ -@Fluent -public final class CommandJobLimits extends JobLimits { - /* - * [Required] JobLimit type. - */ - private JobLimitsType jobLimitsType = JobLimitsType.COMMAND; - - /** - * Creates an instance of CommandJobLimits class. - */ - public CommandJobLimits() { - } - - /** - * Get the jobLimitsType property: [Required] JobLimit type. - * - * @return the jobLimitsType value. - */ - @Override - public JobLimitsType jobLimitsType() { - return this.jobLimitsType; - } - - /** - * {@inheritDoc} - */ - @Override - public CommandJobLimits withTimeout(Duration timeout) { - super.withTimeout(timeout); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("timeout", CoreUtils.durationToStringWithDays(timeout())); - jsonWriter.writeStringField("jobLimitsType", this.jobLimitsType == null ? null : this.jobLimitsType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CommandJobLimits from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CommandJobLimits if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the CommandJobLimits. - */ - public static CommandJobLimits fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CommandJobLimits deserializedCommandJobLimits = new CommandJobLimits(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("timeout".equals(fieldName)) { - deserializedCommandJobLimits - .withTimeout(reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()))); - } else if ("jobLimitsType".equals(fieldName)) { - deserializedCommandJobLimits.jobLimitsType = JobLimitsType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCommandJobLimits; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java deleted file mode 100644 index 25b1fdb61530..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.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.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; - -/** - * An immutable client-side representation of ComponentContainer. - */ -public interface ComponentContainer { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - ComponentContainerProperties 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.machinelearning.fluent.models.ComponentContainerInner object. - * - * @return the inner object. - */ - ComponentContainerInner innerModel(); - - /** - * The entirety of the ComponentContainer definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The ComponentContainer definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ComponentContainer definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ComponentContainer definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the ComponentContainer definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(ComponentContainerProperties properties); - } - - /** - * The stage of the ComponentContainer 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - ComponentContainer create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ComponentContainer create(Context context); - } - } - - /** - * Begins update for the ComponentContainer resource. - * - * @return the stage of resource update. - */ - ComponentContainer.Update update(); - - /** - * The template for ComponentContainer update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ComponentContainer apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ComponentContainer apply(Context context); - } - - /** - * The ComponentContainer update stages. - */ - interface UpdateStages { - /** - * The stage of the ComponentContainer update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(ComponentContainerProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ComponentContainer refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ComponentContainer refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java deleted file mode 100644 index 57d7926b42dd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Component container definition. - * <see href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" />. - */ -@Fluent -public final class ComponentContainerProperties extends AssetContainer { - /* - * Provisioning state for the component container. - */ - private AssetProvisioningState provisioningState; - - /* - * The latest version inside this container. - */ - private String latestVersion; - - /* - * The next auto incremental version - */ - private String nextVersion; - - /** - * Creates an instance of ComponentContainerProperties class. - */ - public ComponentContainerProperties() { - } - - /** - * Get the provisioningState property: Provisioning state for the component container. - * - * @return the provisioningState value. - */ - public AssetProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the latestVersion property: The latest version inside this container. - * - * @return the latestVersion value. - */ - @Override - public String latestVersion() { - return this.latestVersion; - } - - /** - * Get the nextVersion property: The next auto incremental version. - * - * @return the nextVersion value. - */ - @Override - public String nextVersion() { - return this.nextVersion; - } - - /** - * {@inheritDoc} - */ - @Override - public ComponentContainerProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ComponentContainerProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ComponentContainerProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ComponentContainerProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComponentContainerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComponentContainerProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComponentContainerProperties. - */ - public static ComponentContainerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComponentContainerProperties deserializedComponentContainerProperties = new ComponentContainerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedComponentContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedComponentContainerProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedComponentContainerProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedComponentContainerProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("latestVersion".equals(fieldName)) { - deserializedComponentContainerProperties.latestVersion = reader.getString(); - } else if ("nextVersion".equals(fieldName)) { - deserializedComponentContainerProperties.nextVersion = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedComponentContainerProperties.provisioningState - = AssetProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedComponentContainerProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerResourceArmPaginatedResult.java deleted file mode 100644 index 528c4ac02a9b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerResourceArmPaginatedResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of ComponentContainer entities. - */ -@Fluent -public final class ComponentContainerResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type ComponentContainer. - */ - private List value; - - /* - * The link to the next page of ComponentContainer objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of ComponentContainerResourceArmPaginatedResult class. - */ - public ComponentContainerResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type ComponentContainer. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type ComponentContainer. - * - * @param value the value value to set. - * @return the ComponentContainerResourceArmPaginatedResult object itself. - */ - public ComponentContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of ComponentContainer objects. If null, there are no - * additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of ComponentContainer objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the ComponentContainerResourceArmPaginatedResult object itself. - */ - public ComponentContainerResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComponentContainerResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComponentContainerResourceArmPaginatedResult if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComponentContainerResourceArmPaginatedResult. - */ - public static ComponentContainerResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComponentContainerResourceArmPaginatedResult deserializedComponentContainerResourceArmPaginatedResult - = new ComponentContainerResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ComponentContainerInner.fromJson(reader1)); - deserializedComponentContainerResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedComponentContainerResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedComponentContainerResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainers.java deleted file mode 100644 index ada3df49115e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainers.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 ComponentContainers. - */ -public interface ComponentContainers { - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container. - */ - ComponentContainer get(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @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 container along with {@link Response}. - */ - ComponentContainer getById(String id); - - /** - * Get container. - * - * @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 container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete container. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ComponentContainer resource. - * - * @param name resource name. - * @return the first stage of the new ComponentContainer definition. - */ - ComponentContainer.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java deleted file mode 100644 index 830fac22820b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; - -/** - * An immutable client-side representation of ComponentVersion. - */ -public interface ComponentVersion { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - ComponentVersionProperties 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.machinelearning.fluent.models.ComponentVersionInner object. - * - * @return the inner object. - */ - ComponentVersionInner innerModel(); - - /** - * The entirety of the ComponentVersion definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The ComponentVersion definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ComponentVersion definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ComponentVersion definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @return the next definition stage. - */ - WithProperties withExistingComponent(String resourceGroupName, String workspaceName, String name); - } - - /** - * The stage of the ComponentVersion definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(ComponentVersionProperties properties); - } - - /** - * The stage of the ComponentVersion 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - ComponentVersion create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ComponentVersion create(Context context); - } - } - - /** - * Begins update for the ComponentVersion resource. - * - * @return the stage of resource update. - */ - ComponentVersion.Update update(); - - /** - * The template for ComponentVersion update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ComponentVersion apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ComponentVersion apply(Context context); - } - - /** - * The ComponentVersion update stages. - */ - interface UpdateStages { - /** - * The stage of the ComponentVersion update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(ComponentVersionProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ComponentVersion refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ComponentVersion refresh(Context context); - - /** - * Publish version asset into registry. - * - * @param body Destination registry info. - * @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. - */ - void publish(DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param body Destination registry info. - * @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. - */ - void publish(DestinationAsset body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java deleted file mode 100644 index c13b4037b154..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Definition of a component version: defines resources that span component types. - */ -@Fluent -public final class ComponentVersionProperties extends AssetBase { - /* - * Defines Component definition details. - * - */ - private Object componentSpec; - - /* - * Provisioning state for the component version. - */ - private AssetProvisioningState provisioningState; - - /** - * Creates an instance of ComponentVersionProperties class. - */ - public ComponentVersionProperties() { - } - - /** - * Get the componentSpec property: Defines Component definition details. - * <see href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" />. - * - * @return the componentSpec value. - */ - public Object componentSpec() { - return this.componentSpec; - } - - /** - * Set the componentSpec property: Defines Component definition details. - * <see href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" />. - * - * @param componentSpec the componentSpec value to set. - * @return the ComponentVersionProperties object itself. - */ - public ComponentVersionProperties withComponentSpec(Object componentSpec) { - this.componentSpec = componentSpec; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the component version. - * - * @return the provisioningState value. - */ - public AssetProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public ComponentVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ComponentVersionProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ComponentVersionProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ComponentVersionProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ComponentVersionProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); - jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); - jsonWriter.writeUntypedField("componentSpec", this.componentSpec); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComponentVersionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComponentVersionProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComponentVersionProperties. - */ - public static ComponentVersionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComponentVersionProperties deserializedComponentVersionProperties = new ComponentVersionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedComponentVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedComponentVersionProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedComponentVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedComponentVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("isAnonymous".equals(fieldName)) { - deserializedComponentVersionProperties.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); - } else if ("componentSpec".equals(fieldName)) { - deserializedComponentVersionProperties.componentSpec = reader.readUntyped(); - } else if ("provisioningState".equals(fieldName)) { - deserializedComponentVersionProperties.provisioningState - = AssetProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedComponentVersionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionResourceArmPaginatedResult.java deleted file mode 100644 index f555f5ced0b0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionResourceArmPaginatedResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of ComponentVersion entities. - */ -@Fluent -public final class ComponentVersionResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type ComponentVersion. - */ - private List value; - - /* - * The link to the next page of ComponentVersion objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of ComponentVersionResourceArmPaginatedResult class. - */ - public ComponentVersionResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type ComponentVersion. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type ComponentVersion. - * - * @param value the value value to set. - * @return the ComponentVersionResourceArmPaginatedResult object itself. - */ - public ComponentVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of ComponentVersion objects. If null, there are no - * additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of ComponentVersion objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the ComponentVersionResourceArmPaginatedResult object itself. - */ - public ComponentVersionResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComponentVersionResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComponentVersionResourceArmPaginatedResult if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComponentVersionResourceArmPaginatedResult. - */ - public static ComponentVersionResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComponentVersionResourceArmPaginatedResult deserializedComponentVersionResourceArmPaginatedResult - = new ComponentVersionResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ComponentVersionInner.fromJson(reader1)); - deserializedComponentVersionResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedComponentVersionResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedComponentVersionResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersions.java deleted file mode 100644 index 7931c40d3962..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersions.java +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 ComponentVersions. - */ -public interface ComponentVersions { - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @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 a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, - Integer top, String skip, ListViewType listViewType, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version. - */ - ComponentVersion get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, - Context context); - - /** - * Get version. - * - * @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 version along with {@link Response}. - */ - ComponentVersion getById(String id); - - /** - * Get version. - * - * @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 version along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete version. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete version. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ComponentVersion resource. - * - * @param name resource name. - * @return the first stage of the new ComponentVersion definition. - */ - ComponentVersion.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java deleted file mode 100644 index 9a9e4bc15142..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java +++ /dev/null @@ -1,387 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Machine Learning compute object. - */ -@Fluent -public class Compute implements JsonSerializable { - /* - * The type of compute - */ - private ComputeType computeType = ComputeType.fromString("Compute"); - - /* - * Location for the underlying compute - */ - private String computeLocation; - - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The description of the Machine Learning compute. - */ - private String description; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * ARM resource id of the underlying compute - */ - private String resourceId; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - - /* - * Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. - */ - private Boolean disableLocalAuth; - - /** - * Creates an instance of Compute class. - */ - public Compute() { - } - - /** - * Get the computeType property: The type of compute. - * - * @return the computeType value. - */ - public ComputeType computeType() { - return this.computeType; - } - - /** - * Get the computeLocation property: Location for the underlying compute. - * - * @return the computeLocation value. - */ - public String computeLocation() { - return this.computeLocation; - } - - /** - * Set the computeLocation property: Location for the underlying compute. - * - * @param computeLocation the computeLocation value to set. - * @return the Compute object itself. - */ - public Compute withComputeLocation(String computeLocation) { - this.computeLocation = computeLocation; - return this; - } - - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @param provisioningState the provisioningState value to set. - * @return the Compute object itself. - */ - Compute withProvisioningState(ProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the description property: The description of the Machine Learning compute. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of the Machine Learning compute. - * - * @param description the description value to set. - * @return the Compute object itself. - */ - public Compute withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Set the createdOn property: The time at which the compute was created. - * - * @param createdOn the createdOn value to set. - * @return the Compute object itself. - */ - Compute withCreatedOn(OffsetDateTime createdOn) { - this.createdOn = createdOn; - return this; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Set the modifiedOn property: The time at which the compute was last modified. - * - * @param modifiedOn the modifiedOn value to set. - * @return the Compute object itself. - */ - Compute withModifiedOn(OffsetDateTime modifiedOn) { - this.modifiedOn = modifiedOn; - return this; - } - - /** - * Get the resourceId property: ARM resource id of the underlying compute. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: ARM resource id of the underlying compute. - * - * @param resourceId the resourceId value to set. - * @return the Compute object itself. - */ - public Compute withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Set the provisioningErrors property: Errors during provisioning. - * - * @param provisioningErrors the provisioningErrors value to set. - * @return the Compute object itself. - */ - Compute withProvisioningErrors(List provisioningErrors) { - this.provisioningErrors = provisioningErrors; - return this; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - - /** - * Set the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @param isAttachedCompute the isAttachedCompute value to set. - * @return the Compute object itself. - */ - Compute withIsAttachedCompute(Boolean isAttachedCompute) { - this.isAttachedCompute = isAttachedCompute; - return this; - } - - /** - * Get the disableLocalAuth property: Opt-out of local authentication and ensure customers can use only MSI and AAD - * exclusively for authentication. - * - * @return the disableLocalAuth value. - */ - public Boolean disableLocalAuth() { - return this.disableLocalAuth; - } - - /** - * Set the disableLocalAuth property: Opt-out of local authentication and ensure customers can use only MSI and AAD - * exclusively for authentication. - * - * @param disableLocalAuth the disableLocalAuth value to set. - * @return the Compute object itself. - */ - public Compute withDisableLocalAuth(Boolean disableLocalAuth) { - this.disableLocalAuth = disableLocalAuth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - jsonWriter.writeStringField("computeLocation", this.computeLocation); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("resourceId", this.resourceId); - jsonWriter.writeBooleanField("disableLocalAuth", this.disableLocalAuth); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Compute from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Compute if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Compute. - */ - public static Compute fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("computeType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AKS".equals(discriminatorValue)) { - return Aks.fromJson(readerToUse.reset()); - } else if ("Kubernetes".equals(discriminatorValue)) { - return Kubernetes.fromJson(readerToUse.reset()); - } else if ("AmlCompute".equals(discriminatorValue)) { - return AmlCompute.fromJson(readerToUse.reset()); - } else if ("ComputeInstance".equals(discriminatorValue)) { - return ComputeInstance.fromJson(readerToUse.reset()); - } else if ("VirtualMachine".equals(discriminatorValue)) { - return VirtualMachine.fromJson(readerToUse.reset()); - } else if ("HDInsight".equals(discriminatorValue)) { - return HDInsight.fromJson(readerToUse.reset()); - } else if ("DataFactory".equals(discriminatorValue)) { - return DataFactory.fromJson(readerToUse.reset()); - } else if ("Databricks".equals(discriminatorValue)) { - return Databricks.fromJson(readerToUse.reset()); - } else if ("DataLakeAnalytics".equals(discriminatorValue)) { - return DataLakeAnalytics.fromJson(readerToUse.reset()); - } else if ("SynapseSpark".equals(discriminatorValue)) { - return SynapseSpark.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static Compute fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Compute deserializedCompute = new Compute(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeType".equals(fieldName)) { - deserializedCompute.computeType = ComputeType.fromString(reader.getString()); - } else if ("computeLocation".equals(fieldName)) { - deserializedCompute.computeLocation = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedCompute.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedCompute.description = reader.getString(); - } else if ("createdOn".equals(fieldName)) { - deserializedCompute.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("modifiedOn".equals(fieldName)) { - deserializedCompute.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("resourceId".equals(fieldName)) { - deserializedCompute.resourceId = reader.getString(); - } else if ("provisioningErrors".equals(fieldName)) { - List provisioningErrors - = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedCompute.provisioningErrors = provisioningErrors; - } else if ("isAttachedCompute".equals(fieldName)) { - deserializedCompute.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); - } else if ("disableLocalAuth".equals(fieldName)) { - deserializedCompute.disableLocalAuth = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedCompute; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java deleted file mode 100644 index 1bfa1ed54b16..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * An Azure Machine Learning compute instance. - */ -@Fluent -public final class ComputeInstance extends Compute { - /* - * The type of compute - */ - private ComputeType computeType = ComputeType.COMPUTE_INSTANCE; - - /* - * Properties of ComputeInstance - */ - private ComputeInstanceProperties properties; - - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - - /** - * Creates an instance of ComputeInstance class. - */ - public ComputeInstance() { - } - - /** - * Get the computeType property: The type of compute. - * - * @return the computeType value. - */ - @Override - public ComputeType computeType() { - return this.computeType; - } - - /** - * Get the properties property: Properties of ComputeInstance. - * - * @return the properties value. - */ - public ComputeInstanceProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of ComputeInstance. - * - * @param properties the properties value to set. - * @return the ComputeInstance object itself. - */ - public ComputeInstance withProperties(ComputeInstanceProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - - /** - * {@inheritDoc} - */ - @Override - public ComputeInstance withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ComputeInstance withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ComputeInstance withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ComputeInstance withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeLocation", computeLocation()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("resourceId", resourceId()); - jsonWriter.writeBooleanField("disableLocalAuth", disableLocalAuth()); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeInstance from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeInstance if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeInstance. - */ - public static ComputeInstance fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeInstance deserializedComputeInstance = new ComputeInstance(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeLocation".equals(fieldName)) { - deserializedComputeInstance.withComputeLocation(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedComputeInstance.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedComputeInstance.withDescription(reader.getString()); - } else if ("createdOn".equals(fieldName)) { - deserializedComputeInstance.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("modifiedOn".equals(fieldName)) { - deserializedComputeInstance.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("resourceId".equals(fieldName)) { - deserializedComputeInstance.withResourceId(reader.getString()); - } else if ("provisioningErrors".equals(fieldName)) { - List provisioningErrors - = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedComputeInstance.provisioningErrors = provisioningErrors; - } else if ("isAttachedCompute".equals(fieldName)) { - deserializedComputeInstance.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); - } else if ("disableLocalAuth".equals(fieldName)) { - deserializedComputeInstance.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); - } else if ("computeType".equals(fieldName)) { - deserializedComputeInstance.computeType = ComputeType.fromString(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedComputeInstance.properties = ComputeInstanceProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeInstance; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.java deleted file mode 100644 index cdf319054552..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines an Aml Instance application and its connectivity endpoint URI. - */ -@Fluent -public final class ComputeInstanceApplication implements JsonSerializable { - /* - * Name of the ComputeInstance application. - */ - private String displayName; - - /* - * Application' endpoint URI. - */ - private String endpointUri; - - /** - * Creates an instance of ComputeInstanceApplication class. - */ - public ComputeInstanceApplication() { - } - - /** - * Get the displayName property: Name of the ComputeInstance application. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Name of the ComputeInstance application. - * - * @param displayName the displayName value to set. - * @return the ComputeInstanceApplication object itself. - */ - public ComputeInstanceApplication withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the endpointUri property: Application' endpoint URI. - * - * @return the endpointUri value. - */ - public String endpointUri() { - return this.endpointUri; - } - - /** - * Set the endpointUri property: Application' endpoint URI. - * - * @param endpointUri the endpointUri value to set. - * @return the ComputeInstanceApplication object itself. - */ - public ComputeInstanceApplication withEndpointUri(String endpointUri) { - this.endpointUri = endpointUri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("displayName", this.displayName); - jsonWriter.writeStringField("endpointUri", this.endpointUri); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeInstanceApplication from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeInstanceApplication if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeInstanceApplication. - */ - public static ComputeInstanceApplication fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeInstanceApplication deserializedComputeInstanceApplication = new ComputeInstanceApplication(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("displayName".equals(fieldName)) { - deserializedComputeInstanceApplication.displayName = reader.getString(); - } else if ("endpointUri".equals(fieldName)) { - deserializedComputeInstanceApplication.endpointUri = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeInstanceApplication; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAuthorizationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAuthorizationType.java deleted file mode 100644 index f70a147ad786..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAuthorizationType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Compute Instance Authorization type. - * - * The Compute Instance Authorization type. Available values are personal (default). - */ -public final class ComputeInstanceAuthorizationType extends ExpandableStringEnum { - /** - * Static value personal for ComputeInstanceAuthorizationType. - */ - public static final ComputeInstanceAuthorizationType PERSONAL = fromString("personal"); - - /** - * Creates a new instance of ComputeInstanceAuthorizationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ComputeInstanceAuthorizationType() { - } - - /** - * Creates or finds a ComputeInstanceAuthorizationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputeInstanceAuthorizationType. - */ - public static ComputeInstanceAuthorizationType fromString(String name) { - return fromString(name, ComputeInstanceAuthorizationType.class); - } - - /** - * Gets known ComputeInstanceAuthorizationType values. - * - * @return known ComputeInstanceAuthorizationType values. - */ - public static Collection values() { - return values(ComputeInstanceAuthorizationType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceConnectivityEndpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceConnectivityEndpoints.java deleted file mode 100644 index 8332cf71567a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceConnectivityEndpoints.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines all connectivity endpoints and properties for an ComputeInstance. - */ -@Immutable -public final class ComputeInstanceConnectivityEndpoints - implements JsonSerializable { - /* - * Public IP Address of this ComputeInstance. - */ - private String publicIpAddress; - - /* - * Private IP Address of this ComputeInstance (local to the VNET in which the compute instance is deployed). - */ - private String privateIpAddress; - - /** - * Creates an instance of ComputeInstanceConnectivityEndpoints class. - */ - public ComputeInstanceConnectivityEndpoints() { - } - - /** - * Get the publicIpAddress property: Public IP Address of this ComputeInstance. - * - * @return the publicIpAddress value. - */ - public String publicIpAddress() { - return this.publicIpAddress; - } - - /** - * Get the privateIpAddress property: Private IP Address of this ComputeInstance (local to the VNET in which the - * compute instance is deployed). - * - * @return the privateIpAddress value. - */ - public String privateIpAddress() { - return this.privateIpAddress; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeInstanceConnectivityEndpoints from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeInstanceConnectivityEndpoints if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeInstanceConnectivityEndpoints. - */ - public static ComputeInstanceConnectivityEndpoints fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeInstanceConnectivityEndpoints deserializedComputeInstanceConnectivityEndpoints - = new ComputeInstanceConnectivityEndpoints(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("publicIpAddress".equals(fieldName)) { - deserializedComputeInstanceConnectivityEndpoints.publicIpAddress = reader.getString(); - } else if ("privateIpAddress".equals(fieldName)) { - deserializedComputeInstanceConnectivityEndpoints.privateIpAddress = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeInstanceConnectivityEndpoints; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java deleted file mode 100644 index 6460065125a0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Defines an Aml Instance container. - */ -@Fluent -public final class ComputeInstanceContainer implements JsonSerializable { - /* - * Name of the ComputeInstance container. - */ - private String name; - - /* - * Auto save settings. - */ - private Autosave autosave; - - /* - * Information of GPU. - */ - private String gpu; - - /* - * network of this container. - */ - private Network network; - - /* - * Environment information of this container. - */ - private ComputeInstanceEnvironmentInfo environment; - - /* - * services of this containers. - */ - private List services; - - /** - * Creates an instance of ComputeInstanceContainer class. - */ - public ComputeInstanceContainer() { - } - - /** - * Get the name property: Name of the ComputeInstance container. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the ComputeInstance container. - * - * @param name the name value to set. - * @return the ComputeInstanceContainer object itself. - */ - public ComputeInstanceContainer withName(String name) { - this.name = name; - return this; - } - - /** - * Get the autosave property: Auto save settings. - * - * @return the autosave value. - */ - public Autosave autosave() { - return this.autosave; - } - - /** - * Set the autosave property: Auto save settings. - * - * @param autosave the autosave value to set. - * @return the ComputeInstanceContainer object itself. - */ - public ComputeInstanceContainer withAutosave(Autosave autosave) { - this.autosave = autosave; - return this; - } - - /** - * Get the gpu property: Information of GPU. - * - * @return the gpu value. - */ - public String gpu() { - return this.gpu; - } - - /** - * Set the gpu property: Information of GPU. - * - * @param gpu the gpu value to set. - * @return the ComputeInstanceContainer object itself. - */ - public ComputeInstanceContainer withGpu(String gpu) { - this.gpu = gpu; - return this; - } - - /** - * Get the network property: network of this container. - * - * @return the network value. - */ - public Network network() { - return this.network; - } - - /** - * Set the network property: network of this container. - * - * @param network the network value to set. - * @return the ComputeInstanceContainer object itself. - */ - public ComputeInstanceContainer withNetwork(Network network) { - this.network = network; - return this; - } - - /** - * Get the environment property: Environment information of this container. - * - * @return the environment value. - */ - public ComputeInstanceEnvironmentInfo environment() { - return this.environment; - } - - /** - * Set the environment property: Environment information of this container. - * - * @param environment the environment value to set. - * @return the ComputeInstanceContainer object itself. - */ - public ComputeInstanceContainer withEnvironment(ComputeInstanceEnvironmentInfo environment) { - this.environment = environment; - return this; - } - - /** - * Get the services property: services of this containers. - * - * @return the services value. - */ - public List services() { - return this.services; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (environment() != null) { - environment().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("autosave", this.autosave == null ? null : this.autosave.toString()); - jsonWriter.writeStringField("gpu", this.gpu); - jsonWriter.writeStringField("network", this.network == null ? null : this.network.toString()); - jsonWriter.writeJsonField("environment", this.environment); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeInstanceContainer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeInstanceContainer if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeInstanceContainer. - */ - public static ComputeInstanceContainer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeInstanceContainer deserializedComputeInstanceContainer = new ComputeInstanceContainer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedComputeInstanceContainer.name = reader.getString(); - } else if ("autosave".equals(fieldName)) { - deserializedComputeInstanceContainer.autosave = Autosave.fromString(reader.getString()); - } else if ("gpu".equals(fieldName)) { - deserializedComputeInstanceContainer.gpu = reader.getString(); - } else if ("network".equals(fieldName)) { - deserializedComputeInstanceContainer.network = Network.fromString(reader.getString()); - } else if ("environment".equals(fieldName)) { - deserializedComputeInstanceContainer.environment = ComputeInstanceEnvironmentInfo.fromJson(reader); - } else if ("services".equals(fieldName)) { - List services = reader.readArray(reader1 -> reader1.readUntyped()); - deserializedComputeInstanceContainer.services = services; - } else { - reader.skipChildren(); - } - } - - return deserializedComputeInstanceContainer; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java deleted file mode 100644 index 0af4b6db865d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes information on user who created this ComputeInstance. - */ -@Immutable -public final class ComputeInstanceCreatedBy implements JsonSerializable { - /* - * Name of the user. - */ - private String username; - - /* - * Uniquely identifies user' Azure Active Directory organization. - */ - private String userOrgId; - - /* - * Uniquely identifies the user within his/her organization. - */ - private String userId; - - /** - * Creates an instance of ComputeInstanceCreatedBy class. - */ - public ComputeInstanceCreatedBy() { - } - - /** - * Get the username property: Name of the user. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Get the userOrgId property: Uniquely identifies user' Azure Active Directory organization. - * - * @return the userOrgId value. - */ - public String userOrgId() { - return this.userOrgId; - } - - /** - * Get the userId property: Uniquely identifies the user within his/her organization. - * - * @return the userId value. - */ - public String userId() { - return this.userId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeInstanceCreatedBy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeInstanceCreatedBy if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeInstanceCreatedBy. - */ - public static ComputeInstanceCreatedBy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeInstanceCreatedBy deserializedComputeInstanceCreatedBy = new ComputeInstanceCreatedBy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("userName".equals(fieldName)) { - deserializedComputeInstanceCreatedBy.username = reader.getString(); - } else if ("userOrgId".equals(fieldName)) { - deserializedComputeInstanceCreatedBy.userOrgId = reader.getString(); - } else if ("userId".equals(fieldName)) { - deserializedComputeInstanceCreatedBy.userId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeInstanceCreatedBy; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataDisk.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataDisk.java deleted file mode 100644 index 159463c01d79..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataDisk.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines an Aml Instance DataDisk. - */ -@Fluent -public final class ComputeInstanceDataDisk implements JsonSerializable { - /* - * Caching type of Data Disk. - */ - private Caching caching; - - /* - * The initial disk size in gigabytes. - */ - private Integer diskSizeGB; - - /* - * The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct - * lun. - */ - private Integer lun; - - /* - * type of this storage account. - */ - private StorageAccountType storageAccountType; - - /** - * Creates an instance of ComputeInstanceDataDisk class. - */ - public ComputeInstanceDataDisk() { - } - - /** - * Get the caching property: Caching type of Data Disk. - * - * @return the caching value. - */ - public Caching caching() { - return this.caching; - } - - /** - * Set the caching property: Caching type of Data Disk. - * - * @param caching the caching value to set. - * @return the ComputeInstanceDataDisk object itself. - */ - public ComputeInstanceDataDisk withCaching(Caching caching) { - this.caching = caching; - return this; - } - - /** - * Get the diskSizeGB property: The initial disk size in gigabytes. - * - * @return the diskSizeGB value. - */ - public Integer diskSizeGB() { - return this.diskSizeGB; - } - - /** - * Set the diskSizeGB property: The initial disk size in gigabytes. - * - * @param diskSizeGB the diskSizeGB value to set. - * @return the ComputeInstanceDataDisk object itself. - */ - public ComputeInstanceDataDisk withDiskSizeGB(Integer diskSizeGB) { - this.diskSizeGB = diskSizeGB; - return this; - } - - /** - * Get the lun property: The lun is used to uniquely identify each data disk. If attaching multiple disks, each - * should have a distinct lun. - * - * @return the lun value. - */ - public Integer lun() { - return this.lun; - } - - /** - * Set the lun property: The lun is used to uniquely identify each data disk. If attaching multiple disks, each - * should have a distinct lun. - * - * @param lun the lun value to set. - * @return the ComputeInstanceDataDisk object itself. - */ - public ComputeInstanceDataDisk withLun(Integer lun) { - this.lun = lun; - return this; - } - - /** - * Get the storageAccountType property: type of this storage account. - * - * @return the storageAccountType value. - */ - public StorageAccountType storageAccountType() { - return this.storageAccountType; - } - - /** - * Set the storageAccountType property: type of this storage account. - * - * @param storageAccountType the storageAccountType value to set. - * @return the ComputeInstanceDataDisk object itself. - */ - public ComputeInstanceDataDisk withStorageAccountType(StorageAccountType storageAccountType) { - this.storageAccountType = storageAccountType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("caching", this.caching == null ? null : this.caching.toString()); - jsonWriter.writeNumberField("diskSizeGB", this.diskSizeGB); - jsonWriter.writeNumberField("lun", this.lun); - jsonWriter.writeStringField("storageAccountType", - this.storageAccountType == null ? null : this.storageAccountType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeInstanceDataDisk from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeInstanceDataDisk if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeInstanceDataDisk. - */ - public static ComputeInstanceDataDisk fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeInstanceDataDisk deserializedComputeInstanceDataDisk = new ComputeInstanceDataDisk(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("caching".equals(fieldName)) { - deserializedComputeInstanceDataDisk.caching = Caching.fromString(reader.getString()); - } else if ("diskSizeGB".equals(fieldName)) { - deserializedComputeInstanceDataDisk.diskSizeGB = reader.getNullable(JsonReader::getInt); - } else if ("lun".equals(fieldName)) { - deserializedComputeInstanceDataDisk.lun = reader.getNullable(JsonReader::getInt); - } else if ("storageAccountType".equals(fieldName)) { - deserializedComputeInstanceDataDisk.storageAccountType - = StorageAccountType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeInstanceDataDisk; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataMount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataMount.java deleted file mode 100644 index 0dd370593ab4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataMount.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * Defines an Aml Instance DataMount. - */ -@Fluent -public final class ComputeInstanceDataMount implements JsonSerializable { - /* - * Source of the ComputeInstance data mount. - */ - private String source; - - /* - * Data source type. - */ - private SourceType sourceType; - - /* - * name of the ComputeInstance data mount. - */ - private String mountName; - - /* - * Mount Action. - */ - private MountAction mountAction; - - /* - * who this data mount created by. - */ - private String createdBy; - - /* - * Path of this data mount. - */ - private String mountPath; - - /* - * Mount state. - */ - private MountState mountState; - - /* - * The time when the disk mounted. - */ - private OffsetDateTime mountedOn; - - /* - * Error of this data mount. - */ - private String error; - - /** - * Creates an instance of ComputeInstanceDataMount class. - */ - public ComputeInstanceDataMount() { - } - - /** - * Get the source property: Source of the ComputeInstance data mount. - * - * @return the source value. - */ - public String source() { - return this.source; - } - - /** - * Set the source property: Source of the ComputeInstance data mount. - * - * @param source the source value to set. - * @return the ComputeInstanceDataMount object itself. - */ - public ComputeInstanceDataMount withSource(String source) { - this.source = source; - return this; - } - - /** - * Get the sourceType property: Data source type. - * - * @return the sourceType value. - */ - public SourceType sourceType() { - return this.sourceType; - } - - /** - * Set the sourceType property: Data source type. - * - * @param sourceType the sourceType value to set. - * @return the ComputeInstanceDataMount object itself. - */ - public ComputeInstanceDataMount withSourceType(SourceType sourceType) { - this.sourceType = sourceType; - return this; - } - - /** - * Get the mountName property: name of the ComputeInstance data mount. - * - * @return the mountName value. - */ - public String mountName() { - return this.mountName; - } - - /** - * Set the mountName property: name of the ComputeInstance data mount. - * - * @param mountName the mountName value to set. - * @return the ComputeInstanceDataMount object itself. - */ - public ComputeInstanceDataMount withMountName(String mountName) { - this.mountName = mountName; - return this; - } - - /** - * Get the mountAction property: Mount Action. - * - * @return the mountAction value. - */ - public MountAction mountAction() { - return this.mountAction; - } - - /** - * Set the mountAction property: Mount Action. - * - * @param mountAction the mountAction value to set. - * @return the ComputeInstanceDataMount object itself. - */ - public ComputeInstanceDataMount withMountAction(MountAction mountAction) { - this.mountAction = mountAction; - return this; - } - - /** - * Get the createdBy property: who this data mount created by. - * - * @return the createdBy value. - */ - public String createdBy() { - return this.createdBy; - } - - /** - * Set the createdBy property: who this data mount created by. - * - * @param createdBy the createdBy value to set. - * @return the ComputeInstanceDataMount object itself. - */ - public ComputeInstanceDataMount withCreatedBy(String createdBy) { - this.createdBy = createdBy; - return this; - } - - /** - * Get the mountPath property: Path of this data mount. - * - * @return the mountPath value. - */ - public String mountPath() { - return this.mountPath; - } - - /** - * Set the mountPath property: Path of this data mount. - * - * @param mountPath the mountPath value to set. - * @return the ComputeInstanceDataMount object itself. - */ - public ComputeInstanceDataMount withMountPath(String mountPath) { - this.mountPath = mountPath; - return this; - } - - /** - * Get the mountState property: Mount state. - * - * @return the mountState value. - */ - public MountState mountState() { - return this.mountState; - } - - /** - * Set the mountState property: Mount state. - * - * @param mountState the mountState value to set. - * @return the ComputeInstanceDataMount object itself. - */ - public ComputeInstanceDataMount withMountState(MountState mountState) { - this.mountState = mountState; - return this; - } - - /** - * Get the mountedOn property: The time when the disk mounted. - * - * @return the mountedOn value. - */ - public OffsetDateTime mountedOn() { - return this.mountedOn; - } - - /** - * Set the mountedOn property: The time when the disk mounted. - * - * @param mountedOn the mountedOn value to set. - * @return the ComputeInstanceDataMount object itself. - */ - public ComputeInstanceDataMount withMountedOn(OffsetDateTime mountedOn) { - this.mountedOn = mountedOn; - return this; - } - - /** - * Get the error property: Error of this data mount. - * - * @return the error value. - */ - public String error() { - return this.error; - } - - /** - * Set the error property: Error of this data mount. - * - * @param error the error value to set. - * @return the ComputeInstanceDataMount object itself. - */ - public ComputeInstanceDataMount withError(String error) { - this.error = error; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("source", this.source); - jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); - jsonWriter.writeStringField("mountName", this.mountName); - jsonWriter.writeStringField("mountAction", this.mountAction == null ? null : this.mountAction.toString()); - jsonWriter.writeStringField("createdBy", this.createdBy); - jsonWriter.writeStringField("mountPath", this.mountPath); - jsonWriter.writeStringField("mountState", this.mountState == null ? null : this.mountState.toString()); - jsonWriter.writeStringField("mountedOn", - this.mountedOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.mountedOn)); - jsonWriter.writeStringField("error", this.error); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeInstanceDataMount from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeInstanceDataMount if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeInstanceDataMount. - */ - public static ComputeInstanceDataMount fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeInstanceDataMount deserializedComputeInstanceDataMount = new ComputeInstanceDataMount(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("source".equals(fieldName)) { - deserializedComputeInstanceDataMount.source = reader.getString(); - } else if ("sourceType".equals(fieldName)) { - deserializedComputeInstanceDataMount.sourceType = SourceType.fromString(reader.getString()); - } else if ("mountName".equals(fieldName)) { - deserializedComputeInstanceDataMount.mountName = reader.getString(); - } else if ("mountAction".equals(fieldName)) { - deserializedComputeInstanceDataMount.mountAction = MountAction.fromString(reader.getString()); - } else if ("createdBy".equals(fieldName)) { - deserializedComputeInstanceDataMount.createdBy = reader.getString(); - } else if ("mountPath".equals(fieldName)) { - deserializedComputeInstanceDataMount.mountPath = reader.getString(); - } else if ("mountState".equals(fieldName)) { - deserializedComputeInstanceDataMount.mountState = MountState.fromString(reader.getString()); - } else if ("mountedOn".equals(fieldName)) { - deserializedComputeInstanceDataMount.mountedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("error".equals(fieldName)) { - deserializedComputeInstanceDataMount.error = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeInstanceDataMount; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceEnvironmentInfo.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceEnvironmentInfo.java deleted file mode 100644 index 20afb15c2286..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceEnvironmentInfo.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Environment information. - */ -@Fluent -public final class ComputeInstanceEnvironmentInfo implements JsonSerializable { - /* - * name of environment. - */ - private String name; - - /* - * version of environment. - */ - private String version; - - /** - * Creates an instance of ComputeInstanceEnvironmentInfo class. - */ - public ComputeInstanceEnvironmentInfo() { - } - - /** - * Get the name property: name of environment. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: name of environment. - * - * @param name the name value to set. - * @return the ComputeInstanceEnvironmentInfo object itself. - */ - public ComputeInstanceEnvironmentInfo withName(String name) { - this.name = name; - return this; - } - - /** - * Get the version property: version of environment. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: version of environment. - * - * @param version the version value to set. - * @return the ComputeInstanceEnvironmentInfo object itself. - */ - public ComputeInstanceEnvironmentInfo withVersion(String version) { - this.version = version; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("version", this.version); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeInstanceEnvironmentInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeInstanceEnvironmentInfo if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeInstanceEnvironmentInfo. - */ - public static ComputeInstanceEnvironmentInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeInstanceEnvironmentInfo deserializedComputeInstanceEnvironmentInfo - = new ComputeInstanceEnvironmentInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedComputeInstanceEnvironmentInfo.name = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedComputeInstanceEnvironmentInfo.version = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeInstanceEnvironmentInfo; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceLastOperation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceLastOperation.java deleted file mode 100644 index e90c94489658..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceLastOperation.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * The last operation on ComputeInstance. - */ -@Fluent -public final class ComputeInstanceLastOperation implements JsonSerializable { - /* - * Name of the last operation. - */ - private OperationName operationName; - - /* - * Time of the last operation. - */ - private OffsetDateTime operationTime; - - /* - * Operation status. - */ - private OperationStatus operationStatus; - - /* - * Trigger of operation. - */ - private OperationTrigger operationTrigger; - - /** - * Creates an instance of ComputeInstanceLastOperation class. - */ - public ComputeInstanceLastOperation() { - } - - /** - * Get the operationName property: Name of the last operation. - * - * @return the operationName value. - */ - public OperationName operationName() { - return this.operationName; - } - - /** - * Set the operationName property: Name of the last operation. - * - * @param operationName the operationName value to set. - * @return the ComputeInstanceLastOperation object itself. - */ - public ComputeInstanceLastOperation withOperationName(OperationName operationName) { - this.operationName = operationName; - return this; - } - - /** - * Get the operationTime property: Time of the last operation. - * - * @return the operationTime value. - */ - public OffsetDateTime operationTime() { - return this.operationTime; - } - - /** - * Set the operationTime property: Time of the last operation. - * - * @param operationTime the operationTime value to set. - * @return the ComputeInstanceLastOperation object itself. - */ - public ComputeInstanceLastOperation withOperationTime(OffsetDateTime operationTime) { - this.operationTime = operationTime; - return this; - } - - /** - * Get the operationStatus property: Operation status. - * - * @return the operationStatus value. - */ - public OperationStatus operationStatus() { - return this.operationStatus; - } - - /** - * Set the operationStatus property: Operation status. - * - * @param operationStatus the operationStatus value to set. - * @return the ComputeInstanceLastOperation object itself. - */ - public ComputeInstanceLastOperation withOperationStatus(OperationStatus operationStatus) { - this.operationStatus = operationStatus; - return this; - } - - /** - * Get the operationTrigger property: Trigger of operation. - * - * @return the operationTrigger value. - */ - public OperationTrigger operationTrigger() { - return this.operationTrigger; - } - - /** - * Set the operationTrigger property: Trigger of operation. - * - * @param operationTrigger the operationTrigger value to set. - * @return the ComputeInstanceLastOperation object itself. - */ - public ComputeInstanceLastOperation withOperationTrigger(OperationTrigger operationTrigger) { - this.operationTrigger = operationTrigger; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("operationName", this.operationName == null ? null : this.operationName.toString()); - jsonWriter.writeStringField("operationTime", - this.operationTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.operationTime)); - jsonWriter.writeStringField("operationStatus", - this.operationStatus == null ? null : this.operationStatus.toString()); - jsonWriter.writeStringField("operationTrigger", - this.operationTrigger == null ? null : this.operationTrigger.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeInstanceLastOperation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeInstanceLastOperation if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeInstanceLastOperation. - */ - public static ComputeInstanceLastOperation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeInstanceLastOperation deserializedComputeInstanceLastOperation = new ComputeInstanceLastOperation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("operationName".equals(fieldName)) { - deserializedComputeInstanceLastOperation.operationName - = OperationName.fromString(reader.getString()); - } else if ("operationTime".equals(fieldName)) { - deserializedComputeInstanceLastOperation.operationTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("operationStatus".equals(fieldName)) { - deserializedComputeInstanceLastOperation.operationStatus - = OperationStatus.fromString(reader.getString()); - } else if ("operationTrigger".equals(fieldName)) { - deserializedComputeInstanceLastOperation.operationTrigger - = OperationTrigger.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeInstanceLastOperation; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceProperties.java deleted file mode 100644 index 76d16e48a75a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceProperties.java +++ /dev/null @@ -1,602 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Compute Instance properties. - */ -@Fluent -public final class ComputeInstanceProperties implements JsonSerializable { - /* - * Virtual Machine Size - */ - private String vmSize; - - /* - * Virtual network subnet resource ID the compute nodes belong to. - */ - private ResourceId subnet; - - /* - * Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the - * creator can access applications on this compute instance. When Shared, any workspace user can access applications - * on this instance depending on his/her assigned role. - */ - private ApplicationSharingPolicy applicationSharingPolicy; - - /* - * Specifies policy and settings for SSH access. - */ - private ComputeInstanceSshSettings sshSettings; - - /* - * List of Custom Services added to the compute. - */ - private List customServices; - - /* - * Returns metadata about the operating system image for this compute instance. - */ - private ImageMetadata osImageMetadata; - - /* - * Describes all connectivity endpoints available for this ComputeInstance. - */ - private ComputeInstanceConnectivityEndpoints connectivityEndpoints; - - /* - * Describes available applications and their endpoints on this ComputeInstance. - */ - private List applications; - - /* - * Describes information on user who created this ComputeInstance. - */ - private ComputeInstanceCreatedBy createdBy; - - /* - * Collection of errors encountered on this ComputeInstance. - */ - private List errors; - - /* - * The current state of this ComputeInstance. - */ - private ComputeInstanceState state; - - /* - * The Compute Instance Authorization type. Available values are personal (default). - */ - private ComputeInstanceAuthorizationType computeInstanceAuthorizationType; - - /* - * Settings for a personal compute instance. - */ - private PersonalComputeInstanceSettings personalComputeInstanceSettings; - - /* - * Details of customized scripts to execute for setting up the cluster. - */ - private SetupScripts setupScripts; - - /* - * The last operation on ComputeInstance. - */ - private ComputeInstanceLastOperation lastOperation; - - /* - * The list of schedules to be applied on the computes. - */ - private ComputeSchedules schedules; - - /* - * Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates - * that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a - * private endpoint and no public IPs. - */ - private Boolean enableNodePublicIp; - - /* - * Describes informations of containers on this ComputeInstance. - */ - private List containers; - - /* - * Describes informations of dataDisks on this ComputeInstance. - */ - private List dataDisks; - - /* - * Describes informations of dataMounts on this ComputeInstance. - */ - private List dataMounts; - - /* - * ComputeInstance version. - */ - private ComputeInstanceVersion versions; - - /** - * Creates an instance of ComputeInstanceProperties class. - */ - public ComputeInstanceProperties() { - } - - /** - * Get the vmSize property: Virtual Machine Size. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: Virtual Machine Size. - * - * @param vmSize the vmSize value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the subnet property: Virtual network subnet resource ID the compute nodes belong to. - * - * @return the subnet value. - */ - public ResourceId subnet() { - return this.subnet; - } - - /** - * Set the subnet property: Virtual network subnet resource ID the compute nodes belong to. - * - * @param subnet the subnet value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties withSubnet(ResourceId subnet) { - this.subnet = subnet; - return this; - } - - /** - * Get the applicationSharingPolicy property: Policy for sharing applications on this compute instance among users - * of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, - * any workspace user can access applications on this instance depending on his/her assigned role. - * - * @return the applicationSharingPolicy value. - */ - public ApplicationSharingPolicy applicationSharingPolicy() { - return this.applicationSharingPolicy; - } - - /** - * Set the applicationSharingPolicy property: Policy for sharing applications on this compute instance among users - * of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, - * any workspace user can access applications on this instance depending on his/her assigned role. - * - * @param applicationSharingPolicy the applicationSharingPolicy value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties withApplicationSharingPolicy(ApplicationSharingPolicy applicationSharingPolicy) { - this.applicationSharingPolicy = applicationSharingPolicy; - return this; - } - - /** - * Get the sshSettings property: Specifies policy and settings for SSH access. - * - * @return the sshSettings value. - */ - public ComputeInstanceSshSettings sshSettings() { - return this.sshSettings; - } - - /** - * Set the sshSettings property: Specifies policy and settings for SSH access. - * - * @param sshSettings the sshSettings value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties withSshSettings(ComputeInstanceSshSettings sshSettings) { - this.sshSettings = sshSettings; - return this; - } - - /** - * Get the customServices property: List of Custom Services added to the compute. - * - * @return the customServices value. - */ - public List customServices() { - return this.customServices; - } - - /** - * Set the customServices property: List of Custom Services added to the compute. - * - * @param customServices the customServices value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties withCustomServices(List customServices) { - this.customServices = customServices; - return this; - } - - /** - * Get the osImageMetadata property: Returns metadata about the operating system image for this compute instance. - * - * @return the osImageMetadata value. - */ - public ImageMetadata osImageMetadata() { - return this.osImageMetadata; - } - - /** - * Get the connectivityEndpoints property: Describes all connectivity endpoints available for this ComputeInstance. - * - * @return the connectivityEndpoints value. - */ - public ComputeInstanceConnectivityEndpoints connectivityEndpoints() { - return this.connectivityEndpoints; - } - - /** - * Get the applications property: Describes available applications and their endpoints on this ComputeInstance. - * - * @return the applications value. - */ - public List applications() { - return this.applications; - } - - /** - * Get the createdBy property: Describes information on user who created this ComputeInstance. - * - * @return the createdBy value. - */ - public ComputeInstanceCreatedBy createdBy() { - return this.createdBy; - } - - /** - * Get the errors property: Collection of errors encountered on this ComputeInstance. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Get the state property: The current state of this ComputeInstance. - * - * @return the state value. - */ - public ComputeInstanceState state() { - return this.state; - } - - /** - * Get the computeInstanceAuthorizationType property: The Compute Instance Authorization type. Available values are - * personal (default). - * - * @return the computeInstanceAuthorizationType value. - */ - public ComputeInstanceAuthorizationType computeInstanceAuthorizationType() { - return this.computeInstanceAuthorizationType; - } - - /** - * Set the computeInstanceAuthorizationType property: The Compute Instance Authorization type. Available values are - * personal (default). - * - * @param computeInstanceAuthorizationType the computeInstanceAuthorizationType value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties - withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType computeInstanceAuthorizationType) { - this.computeInstanceAuthorizationType = computeInstanceAuthorizationType; - return this; - } - - /** - * Get the personalComputeInstanceSettings property: Settings for a personal compute instance. - * - * @return the personalComputeInstanceSettings value. - */ - public PersonalComputeInstanceSettings personalComputeInstanceSettings() { - return this.personalComputeInstanceSettings; - } - - /** - * Set the personalComputeInstanceSettings property: Settings for a personal compute instance. - * - * @param personalComputeInstanceSettings the personalComputeInstanceSettings value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties - withPersonalComputeInstanceSettings(PersonalComputeInstanceSettings personalComputeInstanceSettings) { - this.personalComputeInstanceSettings = personalComputeInstanceSettings; - return this; - } - - /** - * Get the setupScripts property: Details of customized scripts to execute for setting up the cluster. - * - * @return the setupScripts value. - */ - public SetupScripts setupScripts() { - return this.setupScripts; - } - - /** - * Set the setupScripts property: Details of customized scripts to execute for setting up the cluster. - * - * @param setupScripts the setupScripts value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties withSetupScripts(SetupScripts setupScripts) { - this.setupScripts = setupScripts; - return this; - } - - /** - * Get the lastOperation property: The last operation on ComputeInstance. - * - * @return the lastOperation value. - */ - public ComputeInstanceLastOperation lastOperation() { - return this.lastOperation; - } - - /** - * Get the schedules property: The list of schedules to be applied on the computes. - * - * @return the schedules value. - */ - public ComputeSchedules schedules() { - return this.schedules; - } - - /** - * Set the schedules property: The list of schedules to be applied on the computes. - * - * @param schedules the schedules value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties withSchedules(ComputeSchedules schedules) { - this.schedules = schedules; - return this; - } - - /** - * Get the enableNodePublicIp property: Enable or disable node public IP address provisioning. Possible values are: - * Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates - * that the compute nodes will have a private endpoint and no public IPs. - * - * @return the enableNodePublicIp value. - */ - public Boolean enableNodePublicIp() { - return this.enableNodePublicIp; - } - - /** - * Set the enableNodePublicIp property: Enable or disable node public IP address provisioning. Possible values are: - * Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates - * that the compute nodes will have a private endpoint and no public IPs. - * - * @param enableNodePublicIp the enableNodePublicIp value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties withEnableNodePublicIp(Boolean enableNodePublicIp) { - this.enableNodePublicIp = enableNodePublicIp; - return this; - } - - /** - * Get the containers property: Describes informations of containers on this ComputeInstance. - * - * @return the containers value. - */ - public List containers() { - return this.containers; - } - - /** - * Get the dataDisks property: Describes informations of dataDisks on this ComputeInstance. - * - * @return the dataDisks value. - */ - public List dataDisks() { - return this.dataDisks; - } - - /** - * Get the dataMounts property: Describes informations of dataMounts on this ComputeInstance. - * - * @return the dataMounts value. - */ - public List dataMounts() { - return this.dataMounts; - } - - /** - * Get the versions property: ComputeInstance version. - * - * @return the versions value. - */ - public ComputeInstanceVersion versions() { - return this.versions; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (subnet() != null) { - subnet().validate(); - } - if (sshSettings() != null) { - sshSettings().validate(); - } - if (customServices() != null) { - customServices().forEach(e -> e.validate()); - } - if (osImageMetadata() != null) { - osImageMetadata().validate(); - } - if (connectivityEndpoints() != null) { - connectivityEndpoints().validate(); - } - if (applications() != null) { - applications().forEach(e -> e.validate()); - } - if (createdBy() != null) { - createdBy().validate(); - } - if (personalComputeInstanceSettings() != null) { - personalComputeInstanceSettings().validate(); - } - if (setupScripts() != null) { - setupScripts().validate(); - } - if (lastOperation() != null) { - lastOperation().validate(); - } - if (schedules() != null) { - schedules().validate(); - } - if (containers() != null) { - containers().forEach(e -> e.validate()); - } - if (dataDisks() != null) { - dataDisks().forEach(e -> e.validate()); - } - if (dataMounts() != null) { - dataMounts().forEach(e -> e.validate()); - } - if (versions() != null) { - versions().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("vmSize", this.vmSize); - jsonWriter.writeJsonField("subnet", this.subnet); - jsonWriter.writeStringField("applicationSharingPolicy", - this.applicationSharingPolicy == null ? null : this.applicationSharingPolicy.toString()); - jsonWriter.writeJsonField("sshSettings", this.sshSettings); - jsonWriter.writeArrayField("customServices", this.customServices, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeInstanceAuthorizationType", - this.computeInstanceAuthorizationType == null ? null : this.computeInstanceAuthorizationType.toString()); - jsonWriter.writeJsonField("personalComputeInstanceSettings", this.personalComputeInstanceSettings); - jsonWriter.writeJsonField("setupScripts", this.setupScripts); - jsonWriter.writeJsonField("schedules", this.schedules); - jsonWriter.writeBooleanField("enableNodePublicIp", this.enableNodePublicIp); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeInstanceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeInstanceProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeInstanceProperties. - */ - public static ComputeInstanceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeInstanceProperties deserializedComputeInstanceProperties = new ComputeInstanceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("vmSize".equals(fieldName)) { - deserializedComputeInstanceProperties.vmSize = reader.getString(); - } else if ("subnet".equals(fieldName)) { - deserializedComputeInstanceProperties.subnet = ResourceId.fromJson(reader); - } else if ("applicationSharingPolicy".equals(fieldName)) { - deserializedComputeInstanceProperties.applicationSharingPolicy - = ApplicationSharingPolicy.fromString(reader.getString()); - } else if ("sshSettings".equals(fieldName)) { - deserializedComputeInstanceProperties.sshSettings = ComputeInstanceSshSettings.fromJson(reader); - } else if ("customServices".equals(fieldName)) { - List customServices = reader.readArray(reader1 -> CustomService.fromJson(reader1)); - deserializedComputeInstanceProperties.customServices = customServices; - } else if ("osImageMetadata".equals(fieldName)) { - deserializedComputeInstanceProperties.osImageMetadata = ImageMetadata.fromJson(reader); - } else if ("connectivityEndpoints".equals(fieldName)) { - deserializedComputeInstanceProperties.connectivityEndpoints - = ComputeInstanceConnectivityEndpoints.fromJson(reader); - } else if ("applications".equals(fieldName)) { - List applications - = reader.readArray(reader1 -> ComputeInstanceApplication.fromJson(reader1)); - deserializedComputeInstanceProperties.applications = applications; - } else if ("createdBy".equals(fieldName)) { - deserializedComputeInstanceProperties.createdBy = ComputeInstanceCreatedBy.fromJson(reader); - } else if ("errors".equals(fieldName)) { - List errors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedComputeInstanceProperties.errors = errors; - } else if ("state".equals(fieldName)) { - deserializedComputeInstanceProperties.state = ComputeInstanceState.fromString(reader.getString()); - } else if ("computeInstanceAuthorizationType".equals(fieldName)) { - deserializedComputeInstanceProperties.computeInstanceAuthorizationType - = ComputeInstanceAuthorizationType.fromString(reader.getString()); - } else if ("personalComputeInstanceSettings".equals(fieldName)) { - deserializedComputeInstanceProperties.personalComputeInstanceSettings - = PersonalComputeInstanceSettings.fromJson(reader); - } else if ("setupScripts".equals(fieldName)) { - deserializedComputeInstanceProperties.setupScripts = SetupScripts.fromJson(reader); - } else if ("lastOperation".equals(fieldName)) { - deserializedComputeInstanceProperties.lastOperation = ComputeInstanceLastOperation.fromJson(reader); - } else if ("schedules".equals(fieldName)) { - deserializedComputeInstanceProperties.schedules = ComputeSchedules.fromJson(reader); - } else if ("enableNodePublicIp".equals(fieldName)) { - deserializedComputeInstanceProperties.enableNodePublicIp - = reader.getNullable(JsonReader::getBoolean); - } else if ("containers".equals(fieldName)) { - List containers - = reader.readArray(reader1 -> ComputeInstanceContainer.fromJson(reader1)); - deserializedComputeInstanceProperties.containers = containers; - } else if ("dataDisks".equals(fieldName)) { - List dataDisks - = reader.readArray(reader1 -> ComputeInstanceDataDisk.fromJson(reader1)); - deserializedComputeInstanceProperties.dataDisks = dataDisks; - } else if ("dataMounts".equals(fieldName)) { - List dataMounts - = reader.readArray(reader1 -> ComputeInstanceDataMount.fromJson(reader1)); - deserializedComputeInstanceProperties.dataMounts = dataMounts; - } else if ("versions".equals(fieldName)) { - deserializedComputeInstanceProperties.versions = ComputeInstanceVersion.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeInstanceProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSchema.java deleted file mode 100644 index be7024d12bca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSchema.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties(top level) of ComputeInstance. - */ -@Fluent -public class ComputeInstanceSchema implements JsonSerializable { - /* - * Properties of ComputeInstance - */ - private ComputeInstanceProperties properties; - - /** - * Creates an instance of ComputeInstanceSchema class. - */ - public ComputeInstanceSchema() { - } - - /** - * Get the properties property: Properties of ComputeInstance. - * - * @return the properties value. - */ - public ComputeInstanceProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of ComputeInstance. - * - * @param properties the properties value to set. - * @return the ComputeInstanceSchema object itself. - */ - public ComputeInstanceSchema withProperties(ComputeInstanceProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeInstanceSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeInstanceSchema if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeInstanceSchema. - */ - public static ComputeInstanceSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeInstanceSchema deserializedComputeInstanceSchema = new ComputeInstanceSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedComputeInstanceSchema.properties = ComputeInstanceProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeInstanceSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSshSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSshSettings.java deleted file mode 100644 index 1c616449229b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSshSettings.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies policy and settings for SSH access. - */ -@Fluent -public final class ComputeInstanceSshSettings implements JsonSerializable { - /* - * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on - * this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet - * policy if applicable. - */ - private SshPublicAccess sshPublicAccess; - - /* - * Describes the admin user name. - */ - private String adminUsername; - - /* - * Describes the port for connecting through SSH. - */ - private Integer sshPort; - - /* - * Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH key - * pairs. - */ - private String adminPublicKey; - - /** - * Creates an instance of ComputeInstanceSshSettings class. - */ - public ComputeInstanceSshSettings() { - } - - /** - * Get the sshPublicAccess property: State of the public SSH port. Possible values are: Disabled - Indicates that - * the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and - * accessible according to the VNet/subnet policy if applicable. - * - * @return the sshPublicAccess value. - */ - public SshPublicAccess sshPublicAccess() { - return this.sshPublicAccess; - } - - /** - * Set the sshPublicAccess property: State of the public SSH port. Possible values are: Disabled - Indicates that - * the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and - * accessible according to the VNet/subnet policy if applicable. - * - * @param sshPublicAccess the sshPublicAccess value to set. - * @return the ComputeInstanceSshSettings object itself. - */ - public ComputeInstanceSshSettings withSshPublicAccess(SshPublicAccess sshPublicAccess) { - this.sshPublicAccess = sshPublicAccess; - return this; - } - - /** - * Get the adminUsername property: Describes the admin user name. - * - * @return the adminUsername value. - */ - public String adminUsername() { - return this.adminUsername; - } - - /** - * Get the sshPort property: Describes the port for connecting through SSH. - * - * @return the sshPort value. - */ - public Integer sshPort() { - return this.sshPort; - } - - /** - * Get the adminPublicKey property: Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b - * 2048" to generate your SSH key pairs. - * - * @return the adminPublicKey value. - */ - public String adminPublicKey() { - return this.adminPublicKey; - } - - /** - * Set the adminPublicKey property: Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b - * 2048" to generate your SSH key pairs. - * - * @param adminPublicKey the adminPublicKey value to set. - * @return the ComputeInstanceSshSettings object itself. - */ - public ComputeInstanceSshSettings withAdminPublicKey(String adminPublicKey) { - this.adminPublicKey = adminPublicKey; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sshPublicAccess", - this.sshPublicAccess == null ? null : this.sshPublicAccess.toString()); - jsonWriter.writeStringField("adminPublicKey", this.adminPublicKey); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeInstanceSshSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeInstanceSshSettings if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeInstanceSshSettings. - */ - public static ComputeInstanceSshSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeInstanceSshSettings deserializedComputeInstanceSshSettings = new ComputeInstanceSshSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sshPublicAccess".equals(fieldName)) { - deserializedComputeInstanceSshSettings.sshPublicAccess - = SshPublicAccess.fromString(reader.getString()); - } else if ("adminUserName".equals(fieldName)) { - deserializedComputeInstanceSshSettings.adminUsername = reader.getString(); - } else if ("sshPort".equals(fieldName)) { - deserializedComputeInstanceSshSettings.sshPort = reader.getNullable(JsonReader::getInt); - } else if ("adminPublicKey".equals(fieldName)) { - deserializedComputeInstanceSshSettings.adminPublicKey = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeInstanceSshSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.java deleted file mode 100644 index 6c26b3a23bdb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Current state of an ComputeInstance. - */ -public final class ComputeInstanceState extends ExpandableStringEnum { - /** - * Static value Creating for ComputeInstanceState. - */ - public static final ComputeInstanceState CREATING = fromString("Creating"); - - /** - * Static value CreateFailed for ComputeInstanceState. - */ - public static final ComputeInstanceState CREATE_FAILED = fromString("CreateFailed"); - - /** - * Static value Deleting for ComputeInstanceState. - */ - public static final ComputeInstanceState DELETING = fromString("Deleting"); - - /** - * Static value Running for ComputeInstanceState. - */ - public static final ComputeInstanceState RUNNING = fromString("Running"); - - /** - * Static value Restarting for ComputeInstanceState. - */ - public static final ComputeInstanceState RESTARTING = fromString("Restarting"); - - /** - * Static value JobRunning for ComputeInstanceState. - */ - public static final ComputeInstanceState JOB_RUNNING = fromString("JobRunning"); - - /** - * Static value SettingUp for ComputeInstanceState. - */ - public static final ComputeInstanceState SETTING_UP = fromString("SettingUp"); - - /** - * Static value SetupFailed for ComputeInstanceState. - */ - public static final ComputeInstanceState SETUP_FAILED = fromString("SetupFailed"); - - /** - * Static value Starting for ComputeInstanceState. - */ - public static final ComputeInstanceState STARTING = fromString("Starting"); - - /** - * Static value Stopped for ComputeInstanceState. - */ - public static final ComputeInstanceState STOPPED = fromString("Stopped"); - - /** - * Static value Stopping for ComputeInstanceState. - */ - public static final ComputeInstanceState STOPPING = fromString("Stopping"); - - /** - * Static value UserSettingUp for ComputeInstanceState. - */ - public static final ComputeInstanceState USER_SETTING_UP = fromString("UserSettingUp"); - - /** - * Static value UserSetupFailed for ComputeInstanceState. - */ - public static final ComputeInstanceState USER_SETUP_FAILED = fromString("UserSetupFailed"); - - /** - * Static value Unknown for ComputeInstanceState. - */ - public static final ComputeInstanceState UNKNOWN = fromString("Unknown"); - - /** - * Static value Unusable for ComputeInstanceState. - */ - public static final ComputeInstanceState UNUSABLE = fromString("Unusable"); - - /** - * Creates a new instance of ComputeInstanceState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ComputeInstanceState() { - } - - /** - * Creates or finds a ComputeInstanceState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputeInstanceState. - */ - public static ComputeInstanceState fromString(String name) { - return fromString(name, ComputeInstanceState.class); - } - - /** - * Gets known ComputeInstanceState values. - * - * @return known ComputeInstanceState values. - */ - public static Collection values() { - return values(ComputeInstanceState.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceVersion.java deleted file mode 100644 index cce27fbc395c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceVersion.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Version of computeInstance. - */ -@Fluent -public final class ComputeInstanceVersion implements JsonSerializable { - /* - * Runtime of compute instance. - */ - private String runtime; - - /** - * Creates an instance of ComputeInstanceVersion class. - */ - public ComputeInstanceVersion() { - } - - /** - * Get the runtime property: Runtime of compute instance. - * - * @return the runtime value. - */ - public String runtime() { - return this.runtime; - } - - /** - * Set the runtime property: Runtime of compute instance. - * - * @param runtime the runtime value to set. - * @return the ComputeInstanceVersion object itself. - */ - public ComputeInstanceVersion withRuntime(String runtime) { - this.runtime = runtime; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("runtime", this.runtime); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeInstanceVersion from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeInstanceVersion if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeInstanceVersion. - */ - public static ComputeInstanceVersion fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeInstanceVersion deserializedComputeInstanceVersion = new ComputeInstanceVersion(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("runtime".equals(fieldName)) { - deserializedComputeInstanceVersion.runtime = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeInstanceVersion; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputePowerAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputePowerAction.java deleted file mode 100644 index 9cd09cdf9bea..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputePowerAction.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The compute power action. - */ -public final class ComputePowerAction extends ExpandableStringEnum { - /** - * Static value Start for ComputePowerAction. - */ - public static final ComputePowerAction START = fromString("Start"); - - /** - * Static value Stop for ComputePowerAction. - */ - public static final ComputePowerAction STOP = fromString("Stop"); - - /** - * Creates a new instance of ComputePowerAction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ComputePowerAction() { - } - - /** - * Creates or finds a ComputePowerAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputePowerAction. - */ - public static ComputePowerAction fromString(String name) { - return fromString(name, ComputePowerAction.class); - } - - /** - * Gets known ComputePowerAction values. - * - * @return known ComputePowerAction values. - */ - public static Collection values() { - return values(ComputePowerAction.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceFrequency.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceFrequency.java deleted file mode 100644 index 81a219975c79..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceFrequency.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to describe the frequency of a compute recurrence schedule. - */ -public final class ComputeRecurrenceFrequency extends ExpandableStringEnum { - /** - * Static value Minute for ComputeRecurrenceFrequency. - */ - public static final ComputeRecurrenceFrequency MINUTE = fromString("Minute"); - - /** - * Static value Hour for ComputeRecurrenceFrequency. - */ - public static final ComputeRecurrenceFrequency HOUR = fromString("Hour"); - - /** - * Static value Day for ComputeRecurrenceFrequency. - */ - public static final ComputeRecurrenceFrequency DAY = fromString("Day"); - - /** - * Static value Week for ComputeRecurrenceFrequency. - */ - public static final ComputeRecurrenceFrequency WEEK = fromString("Week"); - - /** - * Static value Month for ComputeRecurrenceFrequency. - */ - public static final ComputeRecurrenceFrequency MONTH = fromString("Month"); - - /** - * Creates a new instance of ComputeRecurrenceFrequency value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ComputeRecurrenceFrequency() { - } - - /** - * Creates or finds a ComputeRecurrenceFrequency from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputeRecurrenceFrequency. - */ - public static ComputeRecurrenceFrequency fromString(String name) { - return fromString(name, ComputeRecurrenceFrequency.class); - } - - /** - * Gets known ComputeRecurrenceFrequency values. - * - * @return known ComputeRecurrenceFrequency values. - */ - public static Collection values() { - return values(ComputeRecurrenceFrequency.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceSchedule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceSchedule.java deleted file mode 100644 index 8d738d7ad55a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceSchedule.java +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The ComputeRecurrenceSchedule model. - */ -@Fluent -public final class ComputeRecurrenceSchedule implements JsonSerializable { - /* - * [Required] List of hours for the schedule. - */ - private List hours; - - /* - * [Required] List of minutes for the schedule. - */ - private List minutes; - - /* - * List of month days for the schedule - */ - private List monthDays; - - /* - * List of days for the schedule. - */ - private List weekDays; - - /** - * Creates an instance of ComputeRecurrenceSchedule class. - */ - public ComputeRecurrenceSchedule() { - } - - /** - * Get the hours property: [Required] List of hours for the schedule. - * - * @return the hours value. - */ - public List hours() { - return this.hours; - } - - /** - * Set the hours property: [Required] List of hours for the schedule. - * - * @param hours the hours value to set. - * @return the ComputeRecurrenceSchedule object itself. - */ - public ComputeRecurrenceSchedule withHours(List hours) { - this.hours = hours; - return this; - } - - /** - * Get the minutes property: [Required] List of minutes for the schedule. - * - * @return the minutes value. - */ - public List minutes() { - return this.minutes; - } - - /** - * Set the minutes property: [Required] List of minutes for the schedule. - * - * @param minutes the minutes value to set. - * @return the ComputeRecurrenceSchedule object itself. - */ - public ComputeRecurrenceSchedule withMinutes(List minutes) { - this.minutes = minutes; - return this; - } - - /** - * Get the monthDays property: List of month days for the schedule. - * - * @return the monthDays value. - */ - public List monthDays() { - return this.monthDays; - } - - /** - * Set the monthDays property: List of month days for the schedule. - * - * @param monthDays the monthDays value to set. - * @return the ComputeRecurrenceSchedule object itself. - */ - public ComputeRecurrenceSchedule withMonthDays(List monthDays) { - this.monthDays = monthDays; - return this; - } - - /** - * Get the weekDays property: List of days for the schedule. - * - * @return the weekDays value. - */ - public List weekDays() { - return this.weekDays; - } - - /** - * Set the weekDays property: List of days for the schedule. - * - * @param weekDays the weekDays value to set. - * @return the ComputeRecurrenceSchedule object itself. - */ - public ComputeRecurrenceSchedule withWeekDays(List weekDays) { - this.weekDays = weekDays; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (hours() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property hours in model ComputeRecurrenceSchedule")); - } - if (minutes() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property minutes in model ComputeRecurrenceSchedule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ComputeRecurrenceSchedule.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("hours", this.hours, (writer, element) -> writer.writeInt(element)); - jsonWriter.writeArrayField("minutes", this.minutes, (writer, element) -> writer.writeInt(element)); - jsonWriter.writeArrayField("monthDays", this.monthDays, (writer, element) -> writer.writeInt(element)); - jsonWriter.writeArrayField("weekDays", this.weekDays, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeRecurrenceSchedule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeRecurrenceSchedule if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ComputeRecurrenceSchedule. - */ - public static ComputeRecurrenceSchedule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeRecurrenceSchedule deserializedComputeRecurrenceSchedule = new ComputeRecurrenceSchedule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("hours".equals(fieldName)) { - List hours = reader.readArray(reader1 -> reader1.getInt()); - deserializedComputeRecurrenceSchedule.hours = hours; - } else if ("minutes".equals(fieldName)) { - List minutes = reader.readArray(reader1 -> reader1.getInt()); - deserializedComputeRecurrenceSchedule.minutes = minutes; - } else if ("monthDays".equals(fieldName)) { - List monthDays = reader.readArray(reader1 -> reader1.getInt()); - deserializedComputeRecurrenceSchedule.monthDays = monthDays; - } else if ("weekDays".equals(fieldName)) { - List weekDays - = reader.readArray(reader1 -> ComputeWeekDay.fromString(reader1.getString())); - deserializedComputeRecurrenceSchedule.weekDays = weekDays; - } else { - reader.skipChildren(); - } - } - - return deserializedComputeRecurrenceSchedule; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResource.java deleted file mode 100644 index df09ca34c41a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResource.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.machinelearning.models; - -import com.azure.core.http.rest.PagedIterable; -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.machinelearning.fluent.models.ComputeResourceInner; -import java.util.Map; - -/** - * An immutable client-side representation of ComputeResource. - */ -public interface ComputeResource { - /** - * 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 identity property: The identity of the resource. - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the location property: Specifies the location of the resource. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Contains resource tags defined as key/value pairs. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the sku property: The sku of the workspace. - * - * @return the sku value. - */ - Sku sku(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the properties property: Compute properties. - * - * @return the properties value. - */ - Compute properties(); - - /** - * 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.machinelearning.fluent.models.ComputeResourceInner object. - * - * @return the inner object. - */ - ComputeResourceInner innerModel(); - - /** - * The entirety of the ComputeResource definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The ComputeResource definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ComputeResource definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ComputeResource definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the ComputeResource 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.WithLocation, DefinitionStages.WithTags, - DefinitionStages.WithIdentity, DefinitionStages.WithSku, DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ComputeResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ComputeResource create(Context context); - } - - /** - * The stage of the ComputeResource definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location Specifies the location of the resource. - * @return the next definition stage. - */ - WithCreate withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location Specifies the location of the resource. - * @return the next definition stage. - */ - WithCreate withRegion(String location); - } - - /** - * The stage of the ComputeResource definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Contains resource tags defined as key/value pairs.. - * - * @param tags Contains resource tags defined as key/value pairs. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the ComputeResource definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The identity of the resource.. - * - * @param identity The identity of the resource. - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the ComputeResource definition allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: The sku of the workspace.. - * - * @param sku The sku of the workspace. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - - /** - * The stage of the ComputeResource definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Compute properties. - * - * @param properties Compute properties. - * @return the next definition stage. - */ - WithCreate withProperties(Compute properties); - } - } - - /** - * Begins update for the ComputeResource resource. - * - * @return the stage of resource update. - */ - ComputeResource.Update update(); - - /** - * The template for ComputeResource update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ComputeResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ComputeResource apply(Context context); - } - - /** - * The ComputeResource update stages. - */ - interface UpdateStages { - /** - * The stage of the ComputeResource update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Properties of ClusterUpdate. - * - * @param properties Properties of ClusterUpdate. - * @return the next definition stage. - */ - Update withProperties(ScaleSettingsInformation properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ComputeResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ComputeResource refresh(Context context); - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @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 details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listNodes(); - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @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 details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listNodes(Context context); - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @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 secrets related to Machine Learning compute (storage keys, service credentials, etc) along with - * {@link Response}. - */ - Response listKeysWithResponse(Context context); - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @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 secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - ComputeSecrets listKeys(); - - /** - * Posts a start action to a compute instance. - * - * @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. - */ - void start(); - - /** - * Posts a start action to a compute instance. - * - * @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. - */ - void start(Context context); - - /** - * Posts a stop action to a compute instance. - * - * @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. - */ - void stop(); - - /** - * Posts a stop action to a compute instance. - * - * @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. - */ - void stop(Context context); - - /** - * Posts a restart action to a compute instance. - * - * @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. - */ - void restart(); - - /** - * Posts a restart action to a compute instance. - * - * @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. - */ - void restart(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.java deleted file mode 100644 index 018f7e1e3388..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ComputeResourceSchema model. - */ -@Fluent -public class ComputeResourceSchema implements JsonSerializable { - /* - * Compute properties - */ - private Compute properties; - - /** - * Creates an instance of ComputeResourceSchema class. - */ - public ComputeResourceSchema() { - } - - /** - * Get the properties property: Compute properties. - * - * @return the properties value. - */ - public Compute properties() { - return this.properties; - } - - /** - * Set the properties property: Compute properties. - * - * @param properties the properties value to set. - * @return the ComputeResourceSchema object itself. - */ - public ComputeResourceSchema withProperties(Compute properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeResourceSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeResourceSchema if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeResourceSchema. - */ - public static ComputeResourceSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeResourceSchema deserializedComputeResourceSchema = new ComputeResourceSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedComputeResourceSchema.properties = Compute.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeResourceSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRuntimeDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRuntimeDto.java deleted file mode 100644 index ad32d64c5000..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRuntimeDto.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Compute runtime config for feature store type workspace. - */ -@Fluent -public final class ComputeRuntimeDto implements JsonSerializable { - /* - * The sparkRuntimeVersion property. - */ - private String sparkRuntimeVersion; - - /** - * Creates an instance of ComputeRuntimeDto class. - */ - public ComputeRuntimeDto() { - } - - /** - * Get the sparkRuntimeVersion property: The sparkRuntimeVersion property. - * - * @return the sparkRuntimeVersion value. - */ - public String sparkRuntimeVersion() { - return this.sparkRuntimeVersion; - } - - /** - * Set the sparkRuntimeVersion property: The sparkRuntimeVersion property. - * - * @param sparkRuntimeVersion the sparkRuntimeVersion value to set. - * @return the ComputeRuntimeDto object itself. - */ - public ComputeRuntimeDto withSparkRuntimeVersion(String sparkRuntimeVersion) { - this.sparkRuntimeVersion = sparkRuntimeVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sparkRuntimeVersion", this.sparkRuntimeVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeRuntimeDto from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeRuntimeDto if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeRuntimeDto. - */ - public static ComputeRuntimeDto fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeRuntimeDto deserializedComputeRuntimeDto = new ComputeRuntimeDto(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sparkRuntimeVersion".equals(fieldName)) { - deserializedComputeRuntimeDto.sparkRuntimeVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeRuntimeDto; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.java deleted file mode 100644 index d40a2846fa07..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The list of schedules to be applied on the computes. - */ -@Fluent -public final class ComputeSchedules implements JsonSerializable { - /* - * The list of compute start stop schedules to be applied. - */ - private List computeStartStop; - - /** - * Creates an instance of ComputeSchedules class. - */ - public ComputeSchedules() { - } - - /** - * Get the computeStartStop property: The list of compute start stop schedules to be applied. - * - * @return the computeStartStop value. - */ - public List computeStartStop() { - return this.computeStartStop; - } - - /** - * Set the computeStartStop property: The list of compute start stop schedules to be applied. - * - * @param computeStartStop the computeStartStop value to set. - * @return the ComputeSchedules object itself. - */ - public ComputeSchedules withComputeStartStop(List computeStartStop) { - this.computeStartStop = computeStartStop; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (computeStartStop() != null) { - computeStartStop().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("computeStartStop", this.computeStartStop, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeSchedules from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeSchedules if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeSchedules. - */ - public static ComputeSchedules fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeSchedules deserializedComputeSchedules = new ComputeSchedules(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeStartStop".equals(fieldName)) { - List computeStartStop - = reader.readArray(reader1 -> ComputeStartStopSchedule.fromJson(reader1)); - deserializedComputeSchedules.computeStartStop = computeStartStop; - } else { - reader.skipChildren(); - } - } - - return deserializedComputeSchedules; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSecrets.java deleted file mode 100644 index 9a9ecbac7777..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSecrets.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; - -/** - * An immutable client-side representation of ComputeSecrets. - */ -public interface ComputeSecrets { - /** - * Gets the computeType property: The type of compute. - * - * @return the computeType value. - */ - ComputeType computeType(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner object. - * - * @return the inner object. - */ - ComputeSecretsInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeStartStopSchedule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeStartStopSchedule.java deleted file mode 100644 index 02bd326c80a4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeStartStopSchedule.java +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Compute start stop schedule properties. - */ -@Fluent -public final class ComputeStartStopSchedule implements JsonSerializable { - /* - * A system assigned id for the schedule. - */ - private String id; - - /* - * The current deployment state of schedule. - */ - private ProvisioningStatus provisioningStatus; - - /* - * Is the schedule enabled or disabled? - */ - private ScheduleStatus status; - - /* - * [Required] The compute power action. - */ - private ComputePowerAction action; - - /* - * [Required] The schedule trigger type. - */ - private ComputeTriggerType triggerType; - - /* - * Required if triggerType is Recurrence. - */ - private Recurrence recurrence; - - /* - * Required if triggerType is Cron. - */ - private Cron cron; - - /* - * [Deprecated] Not used any more. - */ - private ScheduleBase schedule; - - /** - * Creates an instance of ComputeStartStopSchedule class. - */ - public ComputeStartStopSchedule() { - } - - /** - * Get the id property: A system assigned id for the schedule. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the provisioningStatus property: The current deployment state of schedule. - * - * @return the provisioningStatus value. - */ - public ProvisioningStatus provisioningStatus() { - return this.provisioningStatus; - } - - /** - * Get the status property: Is the schedule enabled or disabled?. - * - * @return the status value. - */ - public ScheduleStatus status() { - return this.status; - } - - /** - * Set the status property: Is the schedule enabled or disabled?. - * - * @param status the status value to set. - * @return the ComputeStartStopSchedule object itself. - */ - public ComputeStartStopSchedule withStatus(ScheduleStatus status) { - this.status = status; - return this; - } - - /** - * Get the action property: [Required] The compute power action. - * - * @return the action value. - */ - public ComputePowerAction action() { - return this.action; - } - - /** - * Set the action property: [Required] The compute power action. - * - * @param action the action value to set. - * @return the ComputeStartStopSchedule object itself. - */ - public ComputeStartStopSchedule withAction(ComputePowerAction action) { - this.action = action; - return this; - } - - /** - * Get the triggerType property: [Required] The schedule trigger type. - * - * @return the triggerType value. - */ - public ComputeTriggerType triggerType() { - return this.triggerType; - } - - /** - * Set the triggerType property: [Required] The schedule trigger type. - * - * @param triggerType the triggerType value to set. - * @return the ComputeStartStopSchedule object itself. - */ - public ComputeStartStopSchedule withTriggerType(ComputeTriggerType triggerType) { - this.triggerType = triggerType; - return this; - } - - /** - * Get the recurrence property: Required if triggerType is Recurrence. - * - * @return the recurrence value. - */ - public Recurrence recurrence() { - return this.recurrence; - } - - /** - * Set the recurrence property: Required if triggerType is Recurrence. - * - * @param recurrence the recurrence value to set. - * @return the ComputeStartStopSchedule object itself. - */ - public ComputeStartStopSchedule withRecurrence(Recurrence recurrence) { - this.recurrence = recurrence; - return this; - } - - /** - * Get the cron property: Required if triggerType is Cron. - * - * @return the cron value. - */ - public Cron cron() { - return this.cron; - } - - /** - * Set the cron property: Required if triggerType is Cron. - * - * @param cron the cron value to set. - * @return the ComputeStartStopSchedule object itself. - */ - public ComputeStartStopSchedule withCron(Cron cron) { - this.cron = cron; - return this; - } - - /** - * Get the schedule property: [Deprecated] Not used any more. - * - * @return the schedule value. - */ - public ScheduleBase schedule() { - return this.schedule; - } - - /** - * Set the schedule property: [Deprecated] Not used any more. - * - * @param schedule the schedule value to set. - * @return the ComputeStartStopSchedule object itself. - */ - public ComputeStartStopSchedule withSchedule(ScheduleBase schedule) { - this.schedule = schedule; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (recurrence() != null) { - recurrence().validate(); - } - if (cron() != null) { - cron().validate(); - } - if (schedule() != null) { - schedule().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); - jsonWriter.writeStringField("triggerType", this.triggerType == null ? null : this.triggerType.toString()); - jsonWriter.writeJsonField("recurrence", this.recurrence); - jsonWriter.writeJsonField("cron", this.cron); - jsonWriter.writeJsonField("schedule", this.schedule); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeStartStopSchedule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeStartStopSchedule if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ComputeStartStopSchedule. - */ - public static ComputeStartStopSchedule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeStartStopSchedule deserializedComputeStartStopSchedule = new ComputeStartStopSchedule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedComputeStartStopSchedule.id = reader.getString(); - } else if ("provisioningStatus".equals(fieldName)) { - deserializedComputeStartStopSchedule.provisioningStatus - = ProvisioningStatus.fromString(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedComputeStartStopSchedule.status = ScheduleStatus.fromString(reader.getString()); - } else if ("action".equals(fieldName)) { - deserializedComputeStartStopSchedule.action = ComputePowerAction.fromString(reader.getString()); - } else if ("triggerType".equals(fieldName)) { - deserializedComputeStartStopSchedule.triggerType - = ComputeTriggerType.fromString(reader.getString()); - } else if ("recurrence".equals(fieldName)) { - deserializedComputeStartStopSchedule.recurrence = Recurrence.fromJson(reader); - } else if ("cron".equals(fieldName)) { - deserializedComputeStartStopSchedule.cron = Cron.fromJson(reader); - } else if ("schedule".equals(fieldName)) { - deserializedComputeStartStopSchedule.schedule = ScheduleBase.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeStartStopSchedule; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeTriggerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeTriggerType.java deleted file mode 100644 index 3fde166513a0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeTriggerType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Is the trigger type recurrence or cron. - */ -public final class ComputeTriggerType extends ExpandableStringEnum { - /** - * Static value Recurrence for ComputeTriggerType. - */ - public static final ComputeTriggerType RECURRENCE = fromString("Recurrence"); - - /** - * Static value Cron for ComputeTriggerType. - */ - public static final ComputeTriggerType CRON = fromString("Cron"); - - /** - * Creates a new instance of ComputeTriggerType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ComputeTriggerType() { - } - - /** - * Creates or finds a ComputeTriggerType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputeTriggerType. - */ - public static ComputeTriggerType fromString(String name) { - return fromString(name, ComputeTriggerType.class); - } - - /** - * Gets known ComputeTriggerType values. - * - * @return known ComputeTriggerType values. - */ - public static Collection values() { - return values(ComputeTriggerType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.java deleted file mode 100644 index c57b6fc0c187..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of compute. - */ -public final class ComputeType extends ExpandableStringEnum { - /** - * Static value AKS for ComputeType. - */ - public static final ComputeType AKS = fromString("AKS"); - - /** - * Static value Kubernetes for ComputeType. - */ - public static final ComputeType KUBERNETES = fromString("Kubernetes"); - - /** - * Static value AmlCompute for ComputeType. - */ - public static final ComputeType AML_COMPUTE = fromString("AmlCompute"); - - /** - * Static value ComputeInstance for ComputeType. - */ - public static final ComputeType COMPUTE_INSTANCE = fromString("ComputeInstance"); - - /** - * Static value DataFactory for ComputeType. - */ - public static final ComputeType DATA_FACTORY = fromString("DataFactory"); - - /** - * Static value VirtualMachine for ComputeType. - */ - public static final ComputeType VIRTUAL_MACHINE = fromString("VirtualMachine"); - - /** - * Static value HDInsight for ComputeType. - */ - public static final ComputeType HDINSIGHT = fromString("HDInsight"); - - /** - * Static value Databricks for ComputeType. - */ - public static final ComputeType DATABRICKS = fromString("Databricks"); - - /** - * Static value DataLakeAnalytics for ComputeType. - */ - public static final ComputeType DATA_LAKE_ANALYTICS = fromString("DataLakeAnalytics"); - - /** - * Static value SynapseSpark for ComputeType. - */ - public static final ComputeType SYNAPSE_SPARK = fromString("SynapseSpark"); - - /** - * Creates a new instance of ComputeType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ComputeType() { - } - - /** - * Creates or finds a ComputeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputeType. - */ - public static ComputeType fromString(String name) { - return fromString(name, ComputeType.class); - } - - /** - * Gets known ComputeType values. - * - * @return known ComputeType values. - */ - public static Collection values() { - return values(ComputeType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeWeekDay.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeWeekDay.java deleted file mode 100644 index 40c64d9e242c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeWeekDay.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum of weekday. - */ -public final class ComputeWeekDay extends ExpandableStringEnum { - /** - * Static value Monday for ComputeWeekDay. - */ - public static final ComputeWeekDay MONDAY = fromString("Monday"); - - /** - * Static value Tuesday for ComputeWeekDay. - */ - public static final ComputeWeekDay TUESDAY = fromString("Tuesday"); - - /** - * Static value Wednesday for ComputeWeekDay. - */ - public static final ComputeWeekDay WEDNESDAY = fromString("Wednesday"); - - /** - * Static value Thursday for ComputeWeekDay. - */ - public static final ComputeWeekDay THURSDAY = fromString("Thursday"); - - /** - * Static value Friday for ComputeWeekDay. - */ - public static final ComputeWeekDay FRIDAY = fromString("Friday"); - - /** - * Static value Saturday for ComputeWeekDay. - */ - public static final ComputeWeekDay SATURDAY = fromString("Saturday"); - - /** - * Static value Sunday for ComputeWeekDay. - */ - public static final ComputeWeekDay SUNDAY = fromString("Sunday"); - - /** - * Creates a new instance of ComputeWeekDay value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ComputeWeekDay() { - } - - /** - * Creates or finds a ComputeWeekDay from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputeWeekDay. - */ - public static ComputeWeekDay fromString(String name) { - return fromString(name, ComputeWeekDay.class); - } - - /** - * Gets known ComputeWeekDay values. - * - * @return known ComputeWeekDay values. - */ - public static Collection values() { - return values(ComputeWeekDay.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Computes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Computes.java deleted file mode 100644 index 23ed47cce177..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Computes.java +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 Computes. - */ -public interface Computes { - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 computes in specified workspace as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 computes in specified workspace as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, Context context); - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 compute definition by its name along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String computeName, - Context context); - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 compute definition by its name. - */ - ComputeResource get(String resourceGroupName, String workspaceName, String computeName); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction, Context context); - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listNodes(String resourceGroupName, String workspaceName, - String computeName); - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listNodes(String resourceGroupName, String workspaceName, - String computeName, Context context); - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 secrets related to Machine Learning compute (storage keys, service credentials, etc) along with - * {@link Response}. - */ - Response listKeysWithResponse(String resourceGroupName, String workspaceName, String computeName, - Context context); - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - ComputeSecrets listKeys(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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. - */ - void start(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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. - */ - void start(String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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. - */ - void stop(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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. - */ - void stop(String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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. - */ - void restart(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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. - */ - void restart(String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @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 compute definition by its name along with {@link Response}. - */ - ComputeResource getById(String id); - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @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 compute definition by its name along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ComputeResource resource. - * - * @param name resource name. - * @return the first stage of the new ComputeResource definition. - */ - ComputeResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.java deleted file mode 100644 index 8256a868a1bd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Authentication type of the connection target. - */ -public final class ConnectionAuthType extends ExpandableStringEnum { - /** - * Static value PAT for ConnectionAuthType. - */ - public static final ConnectionAuthType PAT = fromString("PAT"); - - /** - * Static value ManagedIdentity for ConnectionAuthType. - */ - public static final ConnectionAuthType MANAGED_IDENTITY = fromString("ManagedIdentity"); - - /** - * Static value UsernamePassword for ConnectionAuthType. - */ - public static final ConnectionAuthType USERNAME_PASSWORD = fromString("UsernamePassword"); - - /** - * Static value None for ConnectionAuthType. - */ - public static final ConnectionAuthType NONE = fromString("None"); - - /** - * Static value SAS for ConnectionAuthType. - */ - public static final ConnectionAuthType SAS = fromString("SAS"); - - /** - * Static value AccountKey for ConnectionAuthType. - */ - public static final ConnectionAuthType ACCOUNT_KEY = fromString("AccountKey"); - - /** - * Static value ServicePrincipal for ConnectionAuthType. - */ - public static final ConnectionAuthType SERVICE_PRINCIPAL = fromString("ServicePrincipal"); - - /** - * Static value AccessKey for ConnectionAuthType. - */ - public static final ConnectionAuthType ACCESS_KEY = fromString("AccessKey"); - - /** - * Static value ApiKey for ConnectionAuthType. - */ - public static final ConnectionAuthType API_KEY = fromString("ApiKey"); - - /** - * Static value CustomKeys for ConnectionAuthType. - */ - public static final ConnectionAuthType CUSTOM_KEYS = fromString("CustomKeys"); - - /** - * Static value OAuth2 for ConnectionAuthType. - */ - public static final ConnectionAuthType OAUTH2 = fromString("OAuth2"); - - /** - * Static value AAD for ConnectionAuthType. - */ - public static final ConnectionAuthType AAD = fromString("AAD"); - - /** - * Creates a new instance of ConnectionAuthType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ConnectionAuthType() { - } - - /** - * Creates or finds a ConnectionAuthType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConnectionAuthType. - */ - public static ConnectionAuthType fromString(String name) { - return fromString(name, ConnectionAuthType.class); - } - - /** - * Gets known ConnectionAuthType values. - * - * @return known ConnectionAuthType values. - */ - public static Collection values() { - return values(ConnectionAuthType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionCategory.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionCategory.java deleted file mode 100644 index 4de28370a230..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionCategory.java +++ /dev/null @@ -1,551 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Category of the connection. - */ -public final class ConnectionCategory extends ExpandableStringEnum { - /** - * Static value PythonFeed for ConnectionCategory. - */ - public static final ConnectionCategory PYTHON_FEED = fromString("PythonFeed"); - - /** - * Static value ContainerRegistry for ConnectionCategory. - */ - public static final ConnectionCategory CONTAINER_REGISTRY = fromString("ContainerRegistry"); - - /** - * Static value Git for ConnectionCategory. - */ - public static final ConnectionCategory GIT = fromString("Git"); - - /** - * Static value S3 for ConnectionCategory. - */ - public static final ConnectionCategory S3 = fromString("S3"); - - /** - * Static value Snowflake for ConnectionCategory. - */ - public static final ConnectionCategory SNOWFLAKE = fromString("Snowflake"); - - /** - * Static value AzureSqlDb for ConnectionCategory. - */ - public static final ConnectionCategory AZURE_SQL_DB = fromString("AzureSqlDb"); - - /** - * Static value AzureSynapseAnalytics for ConnectionCategory. - */ - public static final ConnectionCategory AZURE_SYNAPSE_ANALYTICS = fromString("AzureSynapseAnalytics"); - - /** - * Static value AzureMySqlDb for ConnectionCategory. - */ - public static final ConnectionCategory AZURE_MY_SQL_DB = fromString("AzureMySqlDb"); - - /** - * Static value AzurePostgresDb for ConnectionCategory. - */ - public static final ConnectionCategory AZURE_POSTGRES_DB = fromString("AzurePostgresDb"); - - /** - * Static value ADLSGen2 for ConnectionCategory. - */ - public static final ConnectionCategory ADLSGEN2 = fromString("ADLSGen2"); - - /** - * Static value Redis for ConnectionCategory. - */ - public static final ConnectionCategory REDIS = fromString("Redis"); - - /** - * Static value ApiKey for ConnectionCategory. - */ - public static final ConnectionCategory API_KEY = fromString("ApiKey"); - - /** - * Static value AzureOpenAI for ConnectionCategory. - */ - public static final ConnectionCategory AZURE_OPEN_AI = fromString("AzureOpenAI"); - - /** - * Static value CognitiveSearch for ConnectionCategory. - */ - public static final ConnectionCategory COGNITIVE_SEARCH = fromString("CognitiveSearch"); - - /** - * Static value CognitiveService for ConnectionCategory. - */ - public static final ConnectionCategory COGNITIVE_SERVICE = fromString("CognitiveService"); - - /** - * Static value CustomKeys for ConnectionCategory. - */ - public static final ConnectionCategory CUSTOM_KEYS = fromString("CustomKeys"); - - /** - * Static value AzureBlob for ConnectionCategory. - */ - public static final ConnectionCategory AZURE_BLOB = fromString("AzureBlob"); - - /** - * Static value AzureOneLake for ConnectionCategory. - */ - public static final ConnectionCategory AZURE_ONE_LAKE = fromString("AzureOneLake"); - - /** - * Static value CosmosDb for ConnectionCategory. - */ - public static final ConnectionCategory COSMOS_DB = fromString("CosmosDb"); - - /** - * Static value CosmosDbMongoDbApi for ConnectionCategory. - */ - public static final ConnectionCategory COSMOS_DB_MONGO_DB_API = fromString("CosmosDbMongoDbApi"); - - /** - * Static value AzureDataExplorer for ConnectionCategory. - */ - public static final ConnectionCategory AZURE_DATA_EXPLORER = fromString("AzureDataExplorer"); - - /** - * Static value AzureMariaDb for ConnectionCategory. - */ - public static final ConnectionCategory AZURE_MARIA_DB = fromString("AzureMariaDb"); - - /** - * Static value AzureDatabricksDeltaLake for ConnectionCategory. - */ - public static final ConnectionCategory AZURE_DATABRICKS_DELTA_LAKE = fromString("AzureDatabricksDeltaLake"); - - /** - * Static value AzureSqlMi for ConnectionCategory. - */ - public static final ConnectionCategory AZURE_SQL_MI = fromString("AzureSqlMi"); - - /** - * Static value AzureTableStorage for ConnectionCategory. - */ - public static final ConnectionCategory AZURE_TABLE_STORAGE = fromString("AzureTableStorage"); - - /** - * Static value AmazonRdsForOracle for ConnectionCategory. - */ - public static final ConnectionCategory AMAZON_RDS_FOR_ORACLE = fromString("AmazonRdsForOracle"); - - /** - * Static value AmazonRdsForSqlServer for ConnectionCategory. - */ - public static final ConnectionCategory AMAZON_RDS_FOR_SQL_SERVER = fromString("AmazonRdsForSqlServer"); - - /** - * Static value AmazonRedshift for ConnectionCategory. - */ - public static final ConnectionCategory AMAZON_REDSHIFT = fromString("AmazonRedshift"); - - /** - * Static value Db2 for ConnectionCategory. - */ - public static final ConnectionCategory DB2 = fromString("Db2"); - - /** - * Static value Drill for ConnectionCategory. - */ - public static final ConnectionCategory DRILL = fromString("Drill"); - - /** - * Static value GoogleBigQuery for ConnectionCategory. - */ - public static final ConnectionCategory GOOGLE_BIG_QUERY = fromString("GoogleBigQuery"); - - /** - * Static value Greenplum for ConnectionCategory. - */ - public static final ConnectionCategory GREENPLUM = fromString("Greenplum"); - - /** - * Static value Hbase for ConnectionCategory. - */ - public static final ConnectionCategory HBASE = fromString("Hbase"); - - /** - * Static value Hive for ConnectionCategory. - */ - public static final ConnectionCategory HIVE = fromString("Hive"); - - /** - * Static value Impala for ConnectionCategory. - */ - public static final ConnectionCategory IMPALA = fromString("Impala"); - - /** - * Static value Informix for ConnectionCategory. - */ - public static final ConnectionCategory INFORMIX = fromString("Informix"); - - /** - * Static value MariaDb for ConnectionCategory. - */ - public static final ConnectionCategory MARIA_DB = fromString("MariaDb"); - - /** - * Static value MicrosoftAccess for ConnectionCategory. - */ - public static final ConnectionCategory MICROSOFT_ACCESS = fromString("MicrosoftAccess"); - - /** - * Static value MySql for ConnectionCategory. - */ - public static final ConnectionCategory MY_SQL = fromString("MySql"); - - /** - * Static value Netezza for ConnectionCategory. - */ - public static final ConnectionCategory NETEZZA = fromString("Netezza"); - - /** - * Static value Oracle for ConnectionCategory. - */ - public static final ConnectionCategory ORACLE = fromString("Oracle"); - - /** - * Static value Phoenix for ConnectionCategory. - */ - public static final ConnectionCategory PHOENIX = fromString("Phoenix"); - - /** - * Static value PostgreSql for ConnectionCategory. - */ - public static final ConnectionCategory POSTGRE_SQL = fromString("PostgreSql"); - - /** - * Static value Presto for ConnectionCategory. - */ - public static final ConnectionCategory PRESTO = fromString("Presto"); - - /** - * Static value SapOpenHub for ConnectionCategory. - */ - public static final ConnectionCategory SAP_OPEN_HUB = fromString("SapOpenHub"); - - /** - * Static value SapBw for ConnectionCategory. - */ - public static final ConnectionCategory SAP_BW = fromString("SapBw"); - - /** - * Static value SapHana for ConnectionCategory. - */ - public static final ConnectionCategory SAP_HANA = fromString("SapHana"); - - /** - * Static value SapTable for ConnectionCategory. - */ - public static final ConnectionCategory SAP_TABLE = fromString("SapTable"); - - /** - * Static value Spark for ConnectionCategory. - */ - public static final ConnectionCategory SPARK = fromString("Spark"); - - /** - * Static value SqlServer for ConnectionCategory. - */ - public static final ConnectionCategory SQL_SERVER = fromString("SqlServer"); - - /** - * Static value Sybase for ConnectionCategory. - */ - public static final ConnectionCategory SYBASE = fromString("Sybase"); - - /** - * Static value Teradata for ConnectionCategory. - */ - public static final ConnectionCategory TERADATA = fromString("Teradata"); - - /** - * Static value Vertica for ConnectionCategory. - */ - public static final ConnectionCategory VERTICA = fromString("Vertica"); - - /** - * Static value Cassandra for ConnectionCategory. - */ - public static final ConnectionCategory CASSANDRA = fromString("Cassandra"); - - /** - * Static value Couchbase for ConnectionCategory. - */ - public static final ConnectionCategory COUCHBASE = fromString("Couchbase"); - - /** - * Static value MongoDbV2 for ConnectionCategory. - */ - public static final ConnectionCategory MONGO_DB_V2 = fromString("MongoDbV2"); - - /** - * Static value MongoDbAtlas for ConnectionCategory. - */ - public static final ConnectionCategory MONGO_DB_ATLAS = fromString("MongoDbAtlas"); - - /** - * Static value AmazonS3Compatible for ConnectionCategory. - */ - public static final ConnectionCategory AMAZON_S3COMPATIBLE = fromString("AmazonS3Compatible"); - - /** - * Static value FileServer for ConnectionCategory. - */ - public static final ConnectionCategory FILE_SERVER = fromString("FileServer"); - - /** - * Static value FtpServer for ConnectionCategory. - */ - public static final ConnectionCategory FTP_SERVER = fromString("FtpServer"); - - /** - * Static value GoogleCloudStorage for ConnectionCategory. - */ - public static final ConnectionCategory GOOGLE_CLOUD_STORAGE = fromString("GoogleCloudStorage"); - - /** - * Static value Hdfs for ConnectionCategory. - */ - public static final ConnectionCategory HDFS = fromString("Hdfs"); - - /** - * Static value OracleCloudStorage for ConnectionCategory. - */ - public static final ConnectionCategory ORACLE_CLOUD_STORAGE = fromString("OracleCloudStorage"); - - /** - * Static value Sftp for ConnectionCategory. - */ - public static final ConnectionCategory SFTP = fromString("Sftp"); - - /** - * Static value GenericHttp for ConnectionCategory. - */ - public static final ConnectionCategory GENERIC_HTTP = fromString("GenericHttp"); - - /** - * Static value ODataRest for ConnectionCategory. - */ - public static final ConnectionCategory ODATA_REST = fromString("ODataRest"); - - /** - * Static value Odbc for ConnectionCategory. - */ - public static final ConnectionCategory ODBC = fromString("Odbc"); - - /** - * Static value GenericRest for ConnectionCategory. - */ - public static final ConnectionCategory GENERIC_REST = fromString("GenericRest"); - - /** - * Static value AmazonMws for ConnectionCategory. - */ - public static final ConnectionCategory AMAZON_MWS = fromString("AmazonMws"); - - /** - * Static value Concur for ConnectionCategory. - */ - public static final ConnectionCategory CONCUR = fromString("Concur"); - - /** - * Static value Dynamics for ConnectionCategory. - */ - public static final ConnectionCategory DYNAMICS = fromString("Dynamics"); - - /** - * Static value DynamicsAx for ConnectionCategory. - */ - public static final ConnectionCategory DYNAMICS_AX = fromString("DynamicsAx"); - - /** - * Static value DynamicsCrm for ConnectionCategory. - */ - public static final ConnectionCategory DYNAMICS_CRM = fromString("DynamicsCrm"); - - /** - * Static value GoogleAdWords for ConnectionCategory. - */ - public static final ConnectionCategory GOOGLE_AD_WORDS = fromString("GoogleAdWords"); - - /** - * Static value Hubspot for ConnectionCategory. - */ - public static final ConnectionCategory HUBSPOT = fromString("Hubspot"); - - /** - * Static value Jira for ConnectionCategory. - */ - public static final ConnectionCategory JIRA = fromString("Jira"); - - /** - * Static value Magento for ConnectionCategory. - */ - public static final ConnectionCategory MAGENTO = fromString("Magento"); - - /** - * Static value Marketo for ConnectionCategory. - */ - public static final ConnectionCategory MARKETO = fromString("Marketo"); - - /** - * Static value Office365 for ConnectionCategory. - */ - public static final ConnectionCategory OFFICE365 = fromString("Office365"); - - /** - * Static value Eloqua for ConnectionCategory. - */ - public static final ConnectionCategory ELOQUA = fromString("Eloqua"); - - /** - * Static value Responsys for ConnectionCategory. - */ - public static final ConnectionCategory RESPONSYS = fromString("Responsys"); - - /** - * Static value OracleServiceCloud for ConnectionCategory. - */ - public static final ConnectionCategory ORACLE_SERVICE_CLOUD = fromString("OracleServiceCloud"); - - /** - * Static value PayPal for ConnectionCategory. - */ - public static final ConnectionCategory PAY_PAL = fromString("PayPal"); - - /** - * Static value QuickBooks for ConnectionCategory. - */ - public static final ConnectionCategory QUICK_BOOKS = fromString("QuickBooks"); - - /** - * Static value Salesforce for ConnectionCategory. - */ - public static final ConnectionCategory SALESFORCE = fromString("Salesforce"); - - /** - * Static value SalesforceServiceCloud for ConnectionCategory. - */ - public static final ConnectionCategory SALESFORCE_SERVICE_CLOUD = fromString("SalesforceServiceCloud"); - - /** - * Static value SalesforceMarketingCloud for ConnectionCategory. - */ - public static final ConnectionCategory SALESFORCE_MARKETING_CLOUD = fromString("SalesforceMarketingCloud"); - - /** - * Static value SapCloudForCustomer for ConnectionCategory. - */ - public static final ConnectionCategory SAP_CLOUD_FOR_CUSTOMER = fromString("SapCloudForCustomer"); - - /** - * Static value SapEcc for ConnectionCategory. - */ - public static final ConnectionCategory SAP_ECC = fromString("SapEcc"); - - /** - * Static value ServiceNow for ConnectionCategory. - */ - public static final ConnectionCategory SERVICE_NOW = fromString("ServiceNow"); - - /** - * Static value SharePointOnlineList for ConnectionCategory. - */ - public static final ConnectionCategory SHARE_POINT_ONLINE_LIST = fromString("SharePointOnlineList"); - - /** - * Static value Shopify for ConnectionCategory. - */ - public static final ConnectionCategory SHOPIFY = fromString("Shopify"); - - /** - * Static value Square for ConnectionCategory. - */ - public static final ConnectionCategory SQUARE = fromString("Square"); - - /** - * Static value WebTable for ConnectionCategory. - */ - public static final ConnectionCategory WEB_TABLE = fromString("WebTable"); - - /** - * Static value Xero for ConnectionCategory. - */ - public static final ConnectionCategory XERO = fromString("Xero"); - - /** - * Static value Zoho for ConnectionCategory. - */ - public static final ConnectionCategory ZOHO = fromString("Zoho"); - - /** - * Static value GenericContainerRegistry for ConnectionCategory. - */ - public static final ConnectionCategory GENERIC_CONTAINER_REGISTRY = fromString("GenericContainerRegistry"); - - /** - * Static value OpenAI for ConnectionCategory. - */ - public static final ConnectionCategory OPEN_AI = fromString("OpenAI"); - - /** - * Static value Serp for ConnectionCategory. - */ - public static final ConnectionCategory SERP = fromString("Serp"); - - /** - * Static value BingLLMSearch for ConnectionCategory. - */ - public static final ConnectionCategory BING_LLMSEARCH = fromString("BingLLMSearch"); - - /** - * Static value Serverless for ConnectionCategory. - */ - public static final ConnectionCategory SERVERLESS = fromString("Serverless"); - - /** - * Static value AIServices for ConnectionCategory. - */ - public static final ConnectionCategory AISERVICES = fromString("AIServices"); - - /** - * Creates a new instance of ConnectionCategory value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ConnectionCategory() { - } - - /** - * Creates or finds a ConnectionCategory from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConnectionCategory. - */ - public static ConnectionCategory fromString(String name) { - return fromString(name, ConnectionCategory.class); - } - - /** - * Gets known ConnectionCategory values. - * - * @return known ConnectionCategory values. - */ - public static Collection values() { - return values(ConnectionCategory.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionGroup.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionGroup.java deleted file mode 100644 index 095930dc350f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionGroup.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Group based on connection category. - */ -public final class ConnectionGroup extends ExpandableStringEnum { - /** - * Static value Azure for ConnectionGroup. - */ - public static final ConnectionGroup AZURE = fromString("Azure"); - - /** - * Static value AzureAI for ConnectionGroup. - */ - public static final ConnectionGroup AZURE_AI = fromString("AzureAI"); - - /** - * Static value Database for ConnectionGroup. - */ - public static final ConnectionGroup DATABASE = fromString("Database"); - - /** - * Static value NoSQL for ConnectionGroup. - */ - public static final ConnectionGroup NO_SQL = fromString("NoSQL"); - - /** - * Static value File for ConnectionGroup. - */ - public static final ConnectionGroup FILE = fromString("File"); - - /** - * Static value GenericProtocol for ConnectionGroup. - */ - public static final ConnectionGroup GENERIC_PROTOCOL = fromString("GenericProtocol"); - - /** - * Static value ServicesAndApps for ConnectionGroup. - */ - public static final ConnectionGroup SERVICES_AND_APPS = fromString("ServicesAndApps"); - - /** - * Creates a new instance of ConnectionGroup value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ConnectionGroup() { - } - - /** - * Creates or finds a ConnectionGroup from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConnectionGroup. - */ - public static ConnectionGroup fromString(String name) { - return fromString(name, ConnectionGroup.class); - } - - /** - * Gets known ConnectionGroup values. - * - * @return known ConnectionGroup values. - */ - public static Collection values() { - return values(ConnectionGroup.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java deleted file mode 100644 index e689a8e9fcf0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Resource requirements for each container instance within an online deployment. - */ -@Fluent -public final class ContainerResourceRequirements implements JsonSerializable { - /* - * Container resource request info: - */ - private ContainerResourceSettings containerResourceRequests; - - /* - * Container resource limit info: - */ - private ContainerResourceSettings containerResourceLimits; - - /** - * Creates an instance of ContainerResourceRequirements class. - */ - public ContainerResourceRequirements() { - } - - /** - * Get the containerResourceRequests property: Container resource request info:. - * - * @return the containerResourceRequests value. - */ - public ContainerResourceSettings containerResourceRequests() { - return this.containerResourceRequests; - } - - /** - * Set the containerResourceRequests property: Container resource request info:. - * - * @param containerResourceRequests the containerResourceRequests value to set. - * @return the ContainerResourceRequirements object itself. - */ - public ContainerResourceRequirements - withContainerResourceRequests(ContainerResourceSettings containerResourceRequests) { - this.containerResourceRequests = containerResourceRequests; - return this; - } - - /** - * Get the containerResourceLimits property: Container resource limit info:. - * - * @return the containerResourceLimits value. - */ - public ContainerResourceSettings containerResourceLimits() { - return this.containerResourceLimits; - } - - /** - * Set the containerResourceLimits property: Container resource limit info:. - * - * @param containerResourceLimits the containerResourceLimits value to set. - * @return the ContainerResourceRequirements object itself. - */ - public ContainerResourceRequirements - withContainerResourceLimits(ContainerResourceSettings containerResourceLimits) { - this.containerResourceLimits = containerResourceLimits; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (containerResourceRequests() != null) { - containerResourceRequests().validate(); - } - if (containerResourceLimits() != null) { - containerResourceLimits().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("containerResourceRequests", this.containerResourceRequests); - jsonWriter.writeJsonField("containerResourceLimits", this.containerResourceLimits); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerResourceRequirements from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerResourceRequirements if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ContainerResourceRequirements. - */ - public static ContainerResourceRequirements fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerResourceRequirements deserializedContainerResourceRequirements - = new ContainerResourceRequirements(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("containerResourceRequests".equals(fieldName)) { - deserializedContainerResourceRequirements.containerResourceRequests - = ContainerResourceSettings.fromJson(reader); - } else if ("containerResourceLimits".equals(fieldName)) { - deserializedContainerResourceRequirements.containerResourceLimits - = ContainerResourceSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerResourceRequirements; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceSettings.java deleted file mode 100644 index 2f23c63d3ef8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceSettings.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ContainerResourceSettings model. - */ -@Fluent -public final class ContainerResourceSettings implements JsonSerializable { - /* - * Number of vCPUs request/limit for container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - */ - private String cpu; - - /* - * Memory size request/limit for container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - */ - private String memory; - - /* - * Number of Nvidia GPU cards request/limit for container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - */ - private String gpu; - - /** - * Creates an instance of ContainerResourceSettings class. - */ - public ContainerResourceSettings() { - } - - /** - * Get the cpu property: Number of vCPUs request/limit for container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * - * @return the cpu value. - */ - public String cpu() { - return this.cpu; - } - - /** - * Set the cpu property: Number of vCPUs request/limit for container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * - * @param cpu the cpu value to set. - * @return the ContainerResourceSettings object itself. - */ - public ContainerResourceSettings withCpu(String cpu) { - this.cpu = cpu; - return this; - } - - /** - * Get the memory property: Memory size request/limit for container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * - * @return the memory value. - */ - public String memory() { - return this.memory; - } - - /** - * Set the memory property: Memory size request/limit for container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * - * @param memory the memory value to set. - * @return the ContainerResourceSettings object itself. - */ - public ContainerResourceSettings withMemory(String memory) { - this.memory = memory; - return this; - } - - /** - * Get the gpu property: Number of Nvidia GPU cards request/limit for container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * - * @return the gpu value. - */ - public String gpu() { - return this.gpu; - } - - /** - * Set the gpu property: Number of Nvidia GPU cards request/limit for container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * - * @param gpu the gpu value to set. - * @return the ContainerResourceSettings object itself. - */ - public ContainerResourceSettings withGpu(String gpu) { - this.gpu = gpu; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("cpu", this.cpu); - jsonWriter.writeStringField("memory", this.memory); - jsonWriter.writeStringField("gpu", this.gpu); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerResourceSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerResourceSettings if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ContainerResourceSettings. - */ - public static ContainerResourceSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerResourceSettings deserializedContainerResourceSettings = new ContainerResourceSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("cpu".equals(fieldName)) { - deserializedContainerResourceSettings.cpu = reader.getString(); - } else if ("memory".equals(fieldName)) { - deserializedContainerResourceSettings.memory = reader.getString(); - } else if ("gpu".equals(fieldName)) { - deserializedContainerResourceSettings.gpu = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerResourceSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerType.java deleted file mode 100644 index 31f8e6fb84c1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for ContainerType. - */ -public final class ContainerType extends ExpandableStringEnum { - /** - * Static value StorageInitializer for ContainerType. - */ - public static final ContainerType STORAGE_INITIALIZER = fromString("StorageInitializer"); - - /** - * Static value InferenceServer for ContainerType. - */ - public static final ContainerType INFERENCE_SERVER = fromString("InferenceServer"); - - /** - * Creates a new instance of ContainerType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ContainerType() { - } - - /** - * Creates or finds a ContainerType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ContainerType. - */ - public static ContainerType fromString(String name) { - return fromString(name, ContainerType.class); - } - - /** - * Gets known ContainerType values. - * - * @return known ContainerType values. - */ - public static Collection values() { - return values(ContainerType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafety.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafety.java deleted file mode 100644 index e804a39a53b5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafety.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ContentSafety model. - */ -@Fluent -public final class ContentSafety implements JsonSerializable { - /* - * [Required] Specifies the status of content safety. - */ - private ContentSafetyStatus contentSafetyStatus; - - /** - * Creates an instance of ContentSafety class. - */ - public ContentSafety() { - } - - /** - * Get the contentSafetyStatus property: [Required] Specifies the status of content safety. - * - * @return the contentSafetyStatus value. - */ - public ContentSafetyStatus contentSafetyStatus() { - return this.contentSafetyStatus; - } - - /** - * Set the contentSafetyStatus property: [Required] Specifies the status of content safety. - * - * @param contentSafetyStatus the contentSafetyStatus value to set. - * @return the ContentSafety object itself. - */ - public ContentSafety withContentSafetyStatus(ContentSafetyStatus contentSafetyStatus) { - this.contentSafetyStatus = contentSafetyStatus; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (contentSafetyStatus() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property contentSafetyStatus in model ContentSafety")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContentSafety.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("contentSafetyStatus", - this.contentSafetyStatus == null ? null : this.contentSafetyStatus.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContentSafety from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContentSafety if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContentSafety. - */ - public static ContentSafety fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContentSafety deserializedContentSafety = new ContentSafety(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("contentSafetyStatus".equals(fieldName)) { - deserializedContentSafety.contentSafetyStatus = ContentSafetyStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedContentSafety; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyStatus.java deleted file mode 100644 index 22cba5cdda41..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyStatus.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the status of content safety. - */ -public final class ContentSafetyStatus extends ExpandableStringEnum { - /** - * Static value Enabled for ContentSafetyStatus. - */ - public static final ContentSafetyStatus ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for ContentSafetyStatus. - */ - public static final ContentSafetyStatus DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of ContentSafetyStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ContentSafetyStatus() { - } - - /** - * Creates or finds a ContentSafetyStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ContentSafetyStatus. - */ - public static ContentSafetyStatus fromString(String name) { - return fromString(name, ContentSafetyStatus.class); - } - - /** - * Gets known ContentSafetyStatus values. - * - * @return known ContentSafetyStatus values. - */ - public static Collection values() { - return values(ContentSafetyStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.java deleted file mode 100644 index 1578c354e5d9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The CosmosDbSettings model. - */ -@Fluent -public final class CosmosDbSettings implements JsonSerializable { - /* - * The throughput of the collections in cosmosdb database - */ - private Integer collectionsThroughput; - - /** - * Creates an instance of CosmosDbSettings class. - */ - public CosmosDbSettings() { - } - - /** - * Get the collectionsThroughput property: The throughput of the collections in cosmosdb database. - * - * @return the collectionsThroughput value. - */ - public Integer collectionsThroughput() { - return this.collectionsThroughput; - } - - /** - * Set the collectionsThroughput property: The throughput of the collections in cosmosdb database. - * - * @param collectionsThroughput the collectionsThroughput value to set. - * @return the CosmosDbSettings object itself. - */ - public CosmosDbSettings withCollectionsThroughput(Integer collectionsThroughput) { - this.collectionsThroughput = collectionsThroughput; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("collectionsThroughput", this.collectionsThroughput); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CosmosDbSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CosmosDbSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the CosmosDbSettings. - */ - public static CosmosDbSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CosmosDbSettings deserializedCosmosDbSettings = new CosmosDbSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("collectionsThroughput".equals(fieldName)) { - deserializedCosmosDbSettings.collectionsThroughput = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedCosmosDbSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CreateMonitorAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CreateMonitorAction.java deleted file mode 100644 index c98290a484cc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CreateMonitorAction.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The CreateMonitorAction model. - */ -@Fluent -public final class CreateMonitorAction extends ScheduleActionBase { - /* - * [Required] Specifies the action type of the schedule - */ - private ScheduleActionType actionType = ScheduleActionType.CREATE_MONITOR; - - /* - * [Required] Defines the monitor. - */ - private MonitorDefinition monitorDefinition; - - /** - * Creates an instance of CreateMonitorAction class. - */ - public CreateMonitorAction() { - } - - /** - * Get the actionType property: [Required] Specifies the action type of the schedule. - * - * @return the actionType value. - */ - @Override - public ScheduleActionType actionType() { - return this.actionType; - } - - /** - * Get the monitorDefinition property: [Required] Defines the monitor. - * - * @return the monitorDefinition value. - */ - public MonitorDefinition monitorDefinition() { - return this.monitorDefinition; - } - - /** - * Set the monitorDefinition property: [Required] Defines the monitor. - * - * @param monitorDefinition the monitorDefinition value to set. - * @return the CreateMonitorAction object itself. - */ - public CreateMonitorAction withMonitorDefinition(MonitorDefinition monitorDefinition) { - this.monitorDefinition = monitorDefinition; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (monitorDefinition() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property monitorDefinition in model CreateMonitorAction")); - } else { - monitorDefinition().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CreateMonitorAction.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("monitorDefinition", this.monitorDefinition); - jsonWriter.writeStringField("actionType", this.actionType == null ? null : this.actionType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreateMonitorAction from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreateMonitorAction if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CreateMonitorAction. - */ - public static CreateMonitorAction fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CreateMonitorAction deserializedCreateMonitorAction = new CreateMonitorAction(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("monitorDefinition".equals(fieldName)) { - deserializedCreateMonitorAction.monitorDefinition = MonitorDefinition.fromJson(reader); - } else if ("actionType".equals(fieldName)) { - deserializedCreateMonitorAction.actionType = ScheduleActionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCreateMonitorAction; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.java deleted file mode 100644 index da5ce9a5ee0a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine the datastore credentials type. - */ -public final class CredentialsType extends ExpandableStringEnum { - /** - * Static value AccountKey for CredentialsType. - */ - public static final CredentialsType ACCOUNT_KEY = fromString("AccountKey"); - - /** - * Static value Certificate for CredentialsType. - */ - public static final CredentialsType CERTIFICATE = fromString("Certificate"); - - /** - * Static value None for CredentialsType. - */ - public static final CredentialsType NONE = fromString("None"); - - /** - * Static value Sas for CredentialsType. - */ - public static final CredentialsType SAS = fromString("Sas"); - - /** - * Static value ServicePrincipal for CredentialsType. - */ - public static final CredentialsType SERVICE_PRINCIPAL = fromString("ServicePrincipal"); - - /** - * Creates a new instance of CredentialsType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CredentialsType() { - } - - /** - * Creates or finds a CredentialsType from its string representation. - * - * @param name a name to look for. - * @return the corresponding CredentialsType. - */ - public static CredentialsType fromString(String name) { - return fromString(name, CredentialsType.class); - } - - /** - * Gets known CredentialsType values. - * - * @return known CredentialsType values. - */ - public static Collection values() { - return values(CredentialsType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.java deleted file mode 100644 index bdfe885b6437..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The workflow trigger cron for ComputeStartStop schedule type. - */ -@Fluent -public final class Cron implements JsonSerializable { - /* - * The start time in yyyy-MM-ddTHH:mm:ss format. - */ - private String startTime; - - /* - * Specifies time zone in which the schedule runs. - * TimeZone should follow Windows time zone format. Refer: - * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 - */ - private String timeZone; - - /* - * [Required] Specifies cron expression of schedule. - * The expression should follow NCronTab format. - */ - private String expression; - - /** - * Creates an instance of Cron class. - */ - public Cron() { - } - - /** - * Get the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format. - * - * @return the startTime value. - */ - public String startTime() { - return this.startTime; - } - - /** - * Set the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format. - * - * @param startTime the startTime value to set. - * @return the Cron object itself. - */ - public Cron withStartTime(String startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the timeZone property: Specifies time zone in which the schedule runs. - * TimeZone should follow Windows time zone format. Refer: - * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. - * - * @return the timeZone value. - */ - public String timeZone() { - return this.timeZone; - } - - /** - * Set the timeZone property: Specifies time zone in which the schedule runs. - * TimeZone should follow Windows time zone format. Refer: - * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. - * - * @param timeZone the timeZone value to set. - * @return the Cron object itself. - */ - public Cron withTimeZone(String timeZone) { - this.timeZone = timeZone; - return this; - } - - /** - * Get the expression property: [Required] Specifies cron expression of schedule. - * The expression should follow NCronTab format. - * - * @return the expression value. - */ - public String expression() { - return this.expression; - } - - /** - * Set the expression property: [Required] Specifies cron expression of schedule. - * The expression should follow NCronTab format. - * - * @param expression the expression value to set. - * @return the Cron object itself. - */ - public Cron withExpression(String expression) { - this.expression = expression; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("startTime", this.startTime); - jsonWriter.writeStringField("timeZone", this.timeZone); - jsonWriter.writeStringField("expression", this.expression); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Cron from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Cron if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Cron. - */ - public static Cron fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Cron deserializedCron = new Cron(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("startTime".equals(fieldName)) { - deserializedCron.startTime = reader.getString(); - } else if ("timeZone".equals(fieldName)) { - deserializedCron.timeZone = reader.getString(); - } else if ("expression".equals(fieldName)) { - deserializedCron.expression = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCron; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java deleted file mode 100644 index bcf293efc974..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The CronTrigger model. - */ -@Fluent -public final class CronTrigger extends TriggerBase { - /* - * [Required] - */ - private TriggerType triggerType = TriggerType.CRON; - - /* - * [Required] Specifies cron expression of schedule. - * The expression should follow NCronTab format. - */ - private String expression; - - /** - * Creates an instance of CronTrigger class. - */ - public CronTrigger() { - } - - /** - * Get the triggerType property: [Required]. - * - * @return the triggerType value. - */ - @Override - public TriggerType triggerType() { - return this.triggerType; - } - - /** - * Get the expression property: [Required] Specifies cron expression of schedule. - * The expression should follow NCronTab format. - * - * @return the expression value. - */ - public String expression() { - return this.expression; - } - - /** - * Set the expression property: [Required] Specifies cron expression of schedule. - * The expression should follow NCronTab format. - * - * @param expression the expression value to set. - * @return the CronTrigger object itself. - */ - public CronTrigger withExpression(String expression) { - this.expression = expression; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CronTrigger withEndTime(String endTime) { - super.withEndTime(endTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CronTrigger withStartTime(String startTime) { - super.withStartTime(startTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CronTrigger withTimeZone(String timeZone) { - super.withTimeZone(timeZone); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (expression() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property expression in model CronTrigger")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CronTrigger.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("endTime", endTime()); - jsonWriter.writeStringField("startTime", startTime()); - jsonWriter.writeStringField("timeZone", timeZone()); - jsonWriter.writeStringField("expression", this.expression); - jsonWriter.writeStringField("triggerType", this.triggerType == null ? null : this.triggerType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CronTrigger from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CronTrigger if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CronTrigger. - */ - public static CronTrigger fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CronTrigger deserializedCronTrigger = new CronTrigger(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("endTime".equals(fieldName)) { - deserializedCronTrigger.withEndTime(reader.getString()); - } else if ("startTime".equals(fieldName)) { - deserializedCronTrigger.withStartTime(reader.getString()); - } else if ("timeZone".equals(fieldName)) { - deserializedCronTrigger.withTimeZone(reader.getString()); - } else if ("expression".equals(fieldName)) { - deserializedCronTrigger.expression = reader.getString(); - } else if ("triggerType".equals(fieldName)) { - deserializedCronTrigger.triggerType = TriggerType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCronTrigger; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.java deleted file mode 100644 index b3d3c25650eb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The desired maximum forecast horizon in units of time-series frequency. - */ -@Fluent -public final class CustomForecastHorizon extends ForecastHorizon { - /* - * [Required] Set forecast horizon value selection mode. - */ - private ForecastHorizonMode mode = ForecastHorizonMode.CUSTOM; - - /* - * [Required] Forecast horizon value. - */ - private int value; - - /** - * Creates an instance of CustomForecastHorizon class. - */ - public CustomForecastHorizon() { - } - - /** - * Get the mode property: [Required] Set forecast horizon value selection mode. - * - * @return the mode value. - */ - @Override - public ForecastHorizonMode mode() { - return this.mode; - } - - /** - * Get the value property: [Required] Forecast horizon value. - * - * @return the value value. - */ - public int value() { - return this.value; - } - - /** - * Set the value property: [Required] Forecast horizon value. - * - * @param value the value value to set. - * @return the CustomForecastHorizon object itself. - */ - public CustomForecastHorizon withValue(int value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeIntField("value", this.value); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomForecastHorizon from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomForecastHorizon if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CustomForecastHorizon. - */ - public static CustomForecastHorizon fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomForecastHorizon deserializedCustomForecastHorizon = new CustomForecastHorizon(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - deserializedCustomForecastHorizon.value = reader.getInt(); - } else if ("mode".equals(fieldName)) { - deserializedCustomForecastHorizon.mode = ForecastHorizonMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomForecastHorizon; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeys.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeys.java deleted file mode 100644 index cde6f6ddac28..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeys.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Custom Keys credential object. - */ -@Fluent -public final class CustomKeys implements JsonSerializable { - /* - * Dictionary of - */ - private Map keys; - - /** - * Creates an instance of CustomKeys class. - */ - public CustomKeys() { - } - - /** - * Get the keys property: Dictionary of <string>. - * - * @return the keys value. - */ - public Map keys() { - return this.keys; - } - - /** - * Set the keys property: Dictionary of <string>. - * - * @param keys the keys value to set. - * @return the CustomKeys object itself. - */ - public CustomKeys withKeys(Map keys) { - this.keys = keys; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("keys", this.keys, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomKeys from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomKeys if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the CustomKeys. - */ - public static CustomKeys fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomKeys deserializedCustomKeys = new CustomKeys(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("keys".equals(fieldName)) { - Map keys = reader.readMap(reader1 -> reader1.getString()); - deserializedCustomKeys.keys = keys; - } else { - reader.skipChildren(); - } - } - - return deserializedCustomKeys; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeysWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeysWorkspaceConnectionProperties.java deleted file mode 100644 index 3b2acc870c51..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeysWorkspaceConnectionProperties.java +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; - -/** - * Category:= CustomKeys - * AuthType:= CustomKeys (as type discriminator) - * Credentials:= {CustomKeys} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.CustomKeys - * Target:= {any value} - * Use Metadata property bag for ApiVersion and other metadata fields. - */ -@Fluent -public final class CustomKeysWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /* - * Authentication type of the connection target - */ - private ConnectionAuthType authType = ConnectionAuthType.CUSTOM_KEYS; - - /* - * Custom Keys credential object - */ - private CustomKeys credentials; - - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - - /** - * Creates an instance of CustomKeysWorkspaceConnectionProperties class. - */ - public CustomKeysWorkspaceConnectionProperties() { - } - - /** - * Get the authType property: Authentication type of the connection target. - * - * @return the authType value. - */ - @Override - public ConnectionAuthType authType() { - return this.authType; - } - - /** - * Get the credentials property: Custom Keys credential object. - * - * @return the credentials value. - */ - public CustomKeys credentials() { - return this.credentials; - } - - /** - * Set the credentials property: Custom Keys credential object. - * - * @param credentials the credentials value to set. - * @return the CustomKeysWorkspaceConnectionProperties object itself. - */ - public CustomKeysWorkspaceConnectionProperties withCredentials(CustomKeys credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. - */ - @Override - public ConnectionGroup group() { - return this.group; - } - - /** - * {@inheritDoc} - */ - @Override - public CustomKeysWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CustomKeysWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CustomKeysWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CustomKeysWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CustomKeysWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CustomKeysWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { - super.withSharedUserList(sharedUserList); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CustomKeysWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CustomKeysWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", category() == null ? null : category().toString()); - jsonWriter.writeStringField("expiryTime", - expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); - jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); - jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("sharedUserList", sharedUserList(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeJsonField("credentials", this.credentials); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomKeysWorkspaceConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomKeysWorkspaceConnectionProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CustomKeysWorkspaceConnectionProperties. - */ - public static CustomKeysWorkspaceConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomKeysWorkspaceConnectionProperties deserializedCustomKeysWorkspaceConnectionProperties - = new CustomKeysWorkspaceConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties - .withCategory(ConnectionCategory.fromString(reader.getString())); - } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); - } else if ("expiryTime".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties.withExpiryTime(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("group".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); - } else if ("isSharedToAll".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties - .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties.withTarget(reader.getString()); - } else if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedCustomKeysWorkspaceConnectionProperties.withMetadata(metadata); - } else if ("sharedUserList".equals(fieldName)) { - List sharedUserList = reader.readArray(reader1 -> reader1.getString()); - deserializedCustomKeysWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties.authType - = ConnectionAuthType.fromString(reader.getString()); - } else if ("credentials".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties.credentials = CustomKeys.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomKeysWorkspaceConnectionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMetricThreshold.java deleted file mode 100644 index ab4f07ea6505..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMetricThreshold.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The CustomMetricThreshold model. - */ -@Fluent -public final class CustomMetricThreshold implements JsonSerializable { - /* - * The threshold value. If null, a default value will be set depending on the selected metric. - */ - private MonitoringThreshold threshold; - - /* - * [Required] The user-defined metric to calculate. - */ - private String metric; - - /** - * Creates an instance of CustomMetricThreshold class. - */ - public CustomMetricThreshold() { - } - - /** - * Get the threshold property: The threshold value. If null, a default value will be set depending on the selected - * metric. - * - * @return the threshold value. - */ - public MonitoringThreshold threshold() { - return this.threshold; - } - - /** - * Set the threshold property: The threshold value. If null, a default value will be set depending on the selected - * metric. - * - * @param threshold the threshold value to set. - * @return the CustomMetricThreshold object itself. - */ - public CustomMetricThreshold withThreshold(MonitoringThreshold threshold) { - this.threshold = threshold; - return this; - } - - /** - * Get the metric property: [Required] The user-defined metric to calculate. - * - * @return the metric value. - */ - public String metric() { - return this.metric; - } - - /** - * Set the metric property: [Required] The user-defined metric to calculate. - * - * @param metric the metric value to set. - * @return the CustomMetricThreshold object itself. - */ - public CustomMetricThreshold withMetric(String metric) { - this.metric = metric; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (threshold() != null) { - threshold().validate(); - } - if (metric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property metric in model CustomMetricThreshold")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomMetricThreshold.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("metric", this.metric); - jsonWriter.writeJsonField("threshold", this.threshold); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomMetricThreshold from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomMetricThreshold if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CustomMetricThreshold. - */ - public static CustomMetricThreshold fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomMetricThreshold deserializedCustomMetricThreshold = new CustomMetricThreshold(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("metric".equals(fieldName)) { - deserializedCustomMetricThreshold.metric = reader.getString(); - } else if ("threshold".equals(fieldName)) { - deserializedCustomMetricThreshold.threshold = MonitoringThreshold.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomMetricThreshold; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobInput.java deleted file mode 100644 index 3d895c8d9fd5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobInput.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The CustomModelJobInput model. - */ -@Fluent -public final class CustomModelJobInput extends JobInput { - /* - * [Required] Specifies the type of job. - */ - private JobInputType jobInputType = JobInputType.CUSTOM_MODEL; - - /* - * [Required] Input Asset URI. - */ - private String uri; - - /* - * Input Asset Delivery Mode. - */ - private InputDeliveryMode mode; - - /** - * Creates an instance of CustomModelJobInput class. - */ - public CustomModelJobInput() { - } - - /** - * Get the jobInputType property: [Required] Specifies the type of job. - * - * @return the jobInputType value. - */ - @Override - public JobInputType jobInputType() { - return this.jobInputType; - } - - /** - * Get the uri property: [Required] Input Asset URI. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: [Required] Input Asset URI. - * - * @param uri the uri value to set. - * @return the CustomModelJobInput object itself. - */ - public CustomModelJobInput withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the mode property: Input Asset Delivery Mode. - * - * @return the mode value. - */ - public InputDeliveryMode mode() { - return this.mode; - } - - /** - * Set the mode property: Input Asset Delivery Mode. - * - * @param mode the mode value to set. - * @return the CustomModelJobInput object itself. - */ - public CustomModelJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CustomModelJobInput withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model CustomModelJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomModelJobInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("jobInputType", this.jobInputType == null ? null : this.jobInputType.toString()); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomModelJobInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomModelJobInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CustomModelJobInput. - */ - public static CustomModelJobInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomModelJobInput deserializedCustomModelJobInput = new CustomModelJobInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedCustomModelJobInput.withDescription(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedCustomModelJobInput.uri = reader.getString(); - } else if ("jobInputType".equals(fieldName)) { - deserializedCustomModelJobInput.jobInputType = JobInputType.fromString(reader.getString()); - } else if ("mode".equals(fieldName)) { - deserializedCustomModelJobInput.mode = InputDeliveryMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomModelJobInput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobOutput.java deleted file mode 100644 index a7820eb16a67..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobOutput.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The CustomModelJobOutput model. - */ -@Fluent -public final class CustomModelJobOutput extends JobOutput { - /* - * [Required] Specifies the type of job. - */ - private JobOutputType jobOutputType = JobOutputType.CUSTOM_MODEL; - - /* - * Output Asset URI. - */ - private String uri; - - /* - * Output Asset Delivery Mode. - */ - private OutputDeliveryMode mode; - - /** - * Creates an instance of CustomModelJobOutput class. - */ - public CustomModelJobOutput() { - } - - /** - * Get the jobOutputType property: [Required] Specifies the type of job. - * - * @return the jobOutputType value. - */ - @Override - public JobOutputType jobOutputType() { - return this.jobOutputType; - } - - /** - * Get the uri property: Output Asset URI. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: Output Asset URI. - * - * @param uri the uri value to set. - * @return the CustomModelJobOutput object itself. - */ - public CustomModelJobOutput withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the mode property: Output Asset Delivery Mode. - * - * @return the mode value. - */ - public OutputDeliveryMode mode() { - return this.mode; - } - - /** - * Set the mode property: Output Asset Delivery Mode. - * - * @param mode the mode value to set. - * @return the CustomModelJobOutput object itself. - */ - public CustomModelJobOutput withMode(OutputDeliveryMode mode) { - this.mode = mode; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CustomModelJobOutput withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomModelJobOutput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomModelJobOutput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the CustomModelJobOutput. - */ - public static CustomModelJobOutput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomModelJobOutput deserializedCustomModelJobOutput = new CustomModelJobOutput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedCustomModelJobOutput.withDescription(reader.getString()); - } else if ("jobOutputType".equals(fieldName)) { - deserializedCustomModelJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedCustomModelJobOutput.uri = reader.getString(); - } else if ("mode".equals(fieldName)) { - deserializedCustomModelJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomModelJobOutput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMonitoringSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMonitoringSignal.java deleted file mode 100644 index 64a217b9f8d0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMonitoringSignal.java +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * The CustomMonitoringSignal model. - */ -@Fluent -public final class CustomMonitoringSignal extends MonitoringSignalBase { - /* - * [Required] Specifies the type of signal to monitor. - */ - private MonitoringSignalType signalType = MonitoringSignalType.CUSTOM; - - /* - * Monitoring assets to take as input. Key is the component input port name, value is the data asset. - */ - private Map inputAssets; - - /* - * Extra component parameters to take as input. Key is the component literal input port name, value is the parameter - * value. - */ - private Map inputs; - - /* - * [Required] Reference to the component asset used to calculate the custom metrics. - */ - private String componentId; - - /* - * [Required] A list of metrics to calculate and their associated thresholds. - */ - private List metricThresholds; - - /** - * Creates an instance of CustomMonitoringSignal class. - */ - public CustomMonitoringSignal() { - } - - /** - * Get the signalType property: [Required] Specifies the type of signal to monitor. - * - * @return the signalType value. - */ - @Override - public MonitoringSignalType signalType() { - return this.signalType; - } - - /** - * Get the inputAssets property: Monitoring assets to take as input. Key is the component input port name, value is - * the data asset. - * - * @return the inputAssets value. - */ - public Map inputAssets() { - return this.inputAssets; - } - - /** - * Set the inputAssets property: Monitoring assets to take as input. Key is the component input port name, value is - * the data asset. - * - * @param inputAssets the inputAssets value to set. - * @return the CustomMonitoringSignal object itself. - */ - public CustomMonitoringSignal withInputAssets(Map inputAssets) { - this.inputAssets = inputAssets; - return this; - } - - /** - * Get the inputs property: Extra component parameters to take as input. Key is the component literal input port - * name, value is the parameter value. - * - * @return the inputs value. - */ - public Map inputs() { - return this.inputs; - } - - /** - * Set the inputs property: Extra component parameters to take as input. Key is the component literal input port - * name, value is the parameter value. - * - * @param inputs the inputs value to set. - * @return the CustomMonitoringSignal object itself. - */ - public CustomMonitoringSignal withInputs(Map inputs) { - this.inputs = inputs; - return this; - } - - /** - * Get the componentId property: [Required] Reference to the component asset used to calculate the custom metrics. - * - * @return the componentId value. - */ - public String componentId() { - return this.componentId; - } - - /** - * Set the componentId property: [Required] Reference to the component asset used to calculate the custom metrics. - * - * @param componentId the componentId value to set. - * @return the CustomMonitoringSignal object itself. - */ - public CustomMonitoringSignal withComponentId(String componentId) { - this.componentId = componentId; - return this; - } - - /** - * Get the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. - * - * @return the metricThresholds value. - */ - public List metricThresholds() { - return this.metricThresholds; - } - - /** - * Set the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. - * - * @param metricThresholds the metricThresholds value to set. - * @return the CustomMonitoringSignal object itself. - */ - public CustomMonitoringSignal withMetricThresholds(List metricThresholds) { - this.metricThresholds = metricThresholds; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CustomMonitoringSignal withNotificationTypes(List notificationTypes) { - super.withNotificationTypes(notificationTypes); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CustomMonitoringSignal withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (inputAssets() != null) { - inputAssets().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (inputs() != null) { - inputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (componentId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property componentId in model CustomMonitoringSignal")); - } - if (metricThresholds() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metricThresholds in model CustomMonitoringSignal")); - } else { - metricThresholds().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomMonitoringSignal.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("notificationTypes", notificationTypes(), - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("componentId", this.componentId); - jsonWriter.writeArrayField("metricThresholds", this.metricThresholds, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("signalType", this.signalType == null ? null : this.signalType.toString()); - jsonWriter.writeMapField("inputAssets", this.inputAssets, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeMapField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomMonitoringSignal from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomMonitoringSignal if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CustomMonitoringSignal. - */ - public static CustomMonitoringSignal fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomMonitoringSignal deserializedCustomMonitoringSignal = new CustomMonitoringSignal(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("notificationTypes".equals(fieldName)) { - List notificationTypes - = reader.readArray(reader1 -> MonitoringNotificationType.fromString(reader1.getString())); - deserializedCustomMonitoringSignal.withNotificationTypes(notificationTypes); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedCustomMonitoringSignal.withProperties(properties); - } else if ("componentId".equals(fieldName)) { - deserializedCustomMonitoringSignal.componentId = reader.getString(); - } else if ("metricThresholds".equals(fieldName)) { - List metricThresholds - = reader.readArray(reader1 -> CustomMetricThreshold.fromJson(reader1)); - deserializedCustomMonitoringSignal.metricThresholds = metricThresholds; - } else if ("signalType".equals(fieldName)) { - deserializedCustomMonitoringSignal.signalType = MonitoringSignalType.fromString(reader.getString()); - } else if ("inputAssets".equals(fieldName)) { - Map inputAssets - = reader.readMap(reader1 -> MonitoringInputDataBase.fromJson(reader1)); - deserializedCustomMonitoringSignal.inputAssets = inputAssets; - } else if ("inputs".equals(fieldName)) { - Map inputs = reader.readMap(reader1 -> JobInput.fromJson(reader1)); - deserializedCustomMonitoringSignal.inputs = inputs; - } else { - reader.skipChildren(); - } - } - - return deserializedCustomMonitoringSignal; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.java deleted file mode 100644 index 000e6185d5e5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * N-Cross validations are specified by user. - */ -@Fluent -public final class CustomNCrossValidations extends NCrossValidations { - /* - * [Required] Mode for determining N-Cross validations. - */ - private NCrossValidationsMode mode = NCrossValidationsMode.CUSTOM; - - /* - * [Required] N-Cross validations value. - */ - private int value; - - /** - * Creates an instance of CustomNCrossValidations class. - */ - public CustomNCrossValidations() { - } - - /** - * Get the mode property: [Required] Mode for determining N-Cross validations. - * - * @return the mode value. - */ - @Override - public NCrossValidationsMode mode() { - return this.mode; - } - - /** - * Get the value property: [Required] N-Cross validations value. - * - * @return the value value. - */ - public int value() { - return this.value; - } - - /** - * Set the value property: [Required] N-Cross validations value. - * - * @param value the value value to set. - * @return the CustomNCrossValidations object itself. - */ - public CustomNCrossValidations withValue(int value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeIntField("value", this.value); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomNCrossValidations from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomNCrossValidations if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CustomNCrossValidations. - */ - public static CustomNCrossValidations fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomNCrossValidations deserializedCustomNCrossValidations = new CustomNCrossValidations(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - deserializedCustomNCrossValidations.value = reader.getInt(); - } else if ("mode".equals(fieldName)) { - deserializedCustomNCrossValidations.mode = NCrossValidationsMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomNCrossValidations; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java deleted file mode 100644 index 30010953c90b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The CustomSeasonality model. - */ -@Fluent -public final class CustomSeasonality extends Seasonality { - /* - * [Required] Seasonality mode. - */ - private SeasonalityMode mode = SeasonalityMode.CUSTOM; - - /* - * [Required] Seasonality value. - */ - private int value; - - /** - * Creates an instance of CustomSeasonality class. - */ - public CustomSeasonality() { - } - - /** - * Get the mode property: [Required] Seasonality mode. - * - * @return the mode value. - */ - @Override - public SeasonalityMode mode() { - return this.mode; - } - - /** - * Get the value property: [Required] Seasonality value. - * - * @return the value value. - */ - public int value() { - return this.value; - } - - /** - * Set the value property: [Required] Seasonality value. - * - * @param value the value value to set. - * @return the CustomSeasonality object itself. - */ - public CustomSeasonality withValue(int value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeIntField("value", this.value); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomSeasonality from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomSeasonality if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CustomSeasonality. - */ - public static CustomSeasonality fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomSeasonality deserializedCustomSeasonality = new CustomSeasonality(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - deserializedCustomSeasonality.value = reader.getInt(); - } else if ("mode".equals(fieldName)) { - deserializedCustomSeasonality.mode = SeasonalityMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomSeasonality; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java deleted file mode 100644 index 60bc67ca2f9b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -/** - * Specifies the custom service configuration. - */ -@Fluent -public final class CustomService implements JsonSerializable { - /* - * Name of the Custom Service - */ - private String name; - - /* - * Describes the Image Specifications - */ - private Image image; - - /* - * Environment Variable for the container - */ - private Map environmentVariables; - - /* - * Describes the docker settings for the image - */ - private Docker docker; - - /* - * Configuring the endpoints for the container - */ - private List endpoints; - - /* - * Configuring the volumes for the container - */ - private List volumes; - - /* - * Specifies the custom service configuration - */ - private Map additionalProperties; - - /** - * Creates an instance of CustomService class. - */ - public CustomService() { - } - - /** - * Get the name property: Name of the Custom Service. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the Custom Service. - * - * @param name the name value to set. - * @return the CustomService object itself. - */ - public CustomService withName(String name) { - this.name = name; - return this; - } - - /** - * Get the image property: Describes the Image Specifications. - * - * @return the image value. - */ - public Image image() { - return this.image; - } - - /** - * Set the image property: Describes the Image Specifications. - * - * @param image the image value to set. - * @return the CustomService object itself. - */ - public CustomService withImage(Image image) { - this.image = image; - return this; - } - - /** - * Get the environmentVariables property: Environment Variable for the container. - * - * @return the environmentVariables value. - */ - public Map environmentVariables() { - return this.environmentVariables; - } - - /** - * Set the environmentVariables property: Environment Variable for the container. - * - * @param environmentVariables the environmentVariables value to set. - * @return the CustomService object itself. - */ - public CustomService withEnvironmentVariables(Map environmentVariables) { - this.environmentVariables = environmentVariables; - return this; - } - - /** - * Get the docker property: Describes the docker settings for the image. - * - * @return the docker value. - */ - public Docker docker() { - return this.docker; - } - - /** - * Set the docker property: Describes the docker settings for the image. - * - * @param docker the docker value to set. - * @return the CustomService object itself. - */ - public CustomService withDocker(Docker docker) { - this.docker = docker; - return this; - } - - /** - * Get the endpoints property: Configuring the endpoints for the container. - * - * @return the endpoints value. - */ - public List endpoints() { - return this.endpoints; - } - - /** - * Set the endpoints property: Configuring the endpoints for the container. - * - * @param endpoints the endpoints value to set. - * @return the CustomService object itself. - */ - public CustomService withEndpoints(List endpoints) { - this.endpoints = endpoints; - return this; - } - - /** - * Get the volumes property: Configuring the volumes for the container. - * - * @return the volumes value. - */ - public List volumes() { - return this.volumes; - } - - /** - * Set the volumes property: Configuring the volumes for the container. - * - * @param volumes the volumes value to set. - * @return the CustomService object itself. - */ - public CustomService withVolumes(List volumes) { - this.volumes = volumes; - return this; - } - - /** - * Get the additionalProperties property: Specifies the custom service configuration. - * - * @return the additionalProperties value. - */ - public Map additionalProperties() { - return this.additionalProperties; - } - - /** - * Set the additionalProperties property: Specifies the custom service configuration. - * - * @param additionalProperties the additionalProperties value to set. - * @return the CustomService object itself. - */ - public CustomService withAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (image() != null) { - image().validate(); - } - if (environmentVariables() != null) { - environmentVariables().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (docker() != null) { - docker().validate(); - } - if (endpoints() != null) { - endpoints().forEach(e -> e.validate()); - } - if (volumes() != null) { - volumes().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("image", this.image); - jsonWriter.writeMapField("environmentVariables", this.environmentVariables, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("docker", this.docker); - jsonWriter.writeArrayField("endpoints", this.endpoints, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("volumes", this.volumes, (writer, element) -> writer.writeJson(element)); - if (additionalProperties != null) { - for (Map.Entry additionalProperty : additionalProperties.entrySet()) { - jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); - } - } - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomService from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomService if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the CustomService. - */ - public static CustomService fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomService deserializedCustomService = new CustomService(); - Map additionalProperties = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedCustomService.name = reader.getString(); - } else if ("image".equals(fieldName)) { - deserializedCustomService.image = Image.fromJson(reader); - } else if ("environmentVariables".equals(fieldName)) { - Map environmentVariables - = reader.readMap(reader1 -> EnvironmentVariable.fromJson(reader1)); - deserializedCustomService.environmentVariables = environmentVariables; - } else if ("docker".equals(fieldName)) { - deserializedCustomService.docker = Docker.fromJson(reader); - } else if ("endpoints".equals(fieldName)) { - List endpoints = reader.readArray(reader1 -> Endpoint.fromJson(reader1)); - deserializedCustomService.endpoints = endpoints; - } else if ("volumes".equals(fieldName)) { - List volumes = reader.readArray(reader1 -> VolumeDefinition.fromJson(reader1)); - deserializedCustomService.volumes = volumes; - } else { - if (additionalProperties == null) { - additionalProperties = new LinkedHashMap<>(); - } - - additionalProperties.put(fieldName, reader.readUntyped()); - } - } - deserializedCustomService.additionalProperties = additionalProperties; - - return deserializedCustomService; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.java deleted file mode 100644 index 7234e7df1197..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The CustomTargetLags model. - */ -@Fluent -public final class CustomTargetLags extends TargetLags { - /* - * [Required] Set target lags mode - Auto/Custom - */ - private TargetLagsMode mode = TargetLagsMode.CUSTOM; - - /* - * [Required] Set target lags values. - */ - private List values; - - /** - * Creates an instance of CustomTargetLags class. - */ - public CustomTargetLags() { - } - - /** - * Get the mode property: [Required] Set target lags mode - Auto/Custom. - * - * @return the mode value. - */ - @Override - public TargetLagsMode mode() { - return this.mode; - } - - /** - * Get the values property: [Required] Set target lags values. - * - * @return the values value. - */ - public List values() { - return this.values; - } - - /** - * Set the values property: [Required] Set target lags values. - * - * @param values the values value to set. - * @return the CustomTargetLags object itself. - */ - public CustomTargetLags withValues(List values) { - this.values = values; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (values() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property values in model CustomTargetLags")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomTargetLags.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeInt(element)); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomTargetLags from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomTargetLags if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CustomTargetLags. - */ - public static CustomTargetLags fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomTargetLags deserializedCustomTargetLags = new CustomTargetLags(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("values".equals(fieldName)) { - List values = reader.readArray(reader1 -> reader1.getInt()); - deserializedCustomTargetLags.values = values; - } else if ("mode".equals(fieldName)) { - deserializedCustomTargetLags.mode = TargetLagsMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomTargetLags; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.java deleted file mode 100644 index 4ed9f0833981..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The CustomTargetRollingWindowSize model. - */ -@Fluent -public final class CustomTargetRollingWindowSize extends TargetRollingWindowSize { - /* - * [Required] TargetRollingWindowSiz detection mode. - */ - private TargetRollingWindowSizeMode mode = TargetRollingWindowSizeMode.CUSTOM; - - /* - * [Required] TargetRollingWindowSize value. - */ - private int value; - - /** - * Creates an instance of CustomTargetRollingWindowSize class. - */ - public CustomTargetRollingWindowSize() { - } - - /** - * Get the mode property: [Required] TargetRollingWindowSiz detection mode. - * - * @return the mode value. - */ - @Override - public TargetRollingWindowSizeMode mode() { - return this.mode; - } - - /** - * Get the value property: [Required] TargetRollingWindowSize value. - * - * @return the value value. - */ - public int value() { - return this.value; - } - - /** - * Set the value property: [Required] TargetRollingWindowSize value. - * - * @param value the value value to set. - * @return the CustomTargetRollingWindowSize object itself. - */ - public CustomTargetRollingWindowSize withValue(int value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeIntField("value", this.value); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomTargetRollingWindowSize from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomTargetRollingWindowSize if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CustomTargetRollingWindowSize. - */ - public static CustomTargetRollingWindowSize fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomTargetRollingWindowSize deserializedCustomTargetRollingWindowSize - = new CustomTargetRollingWindowSize(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - deserializedCustomTargetRollingWindowSize.value = reader.getInt(); - } else if ("mode".equals(fieldName)) { - deserializedCustomTargetRollingWindowSize.mode - = TargetRollingWindowSizeMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomTargetRollingWindowSize; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataAvailabilityStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataAvailabilityStatus.java deleted file mode 100644 index 721b6ecae781..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataAvailabilityStatus.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for DataAvailabilityStatus. - */ -public final class DataAvailabilityStatus extends ExpandableStringEnum { - /** - * Static value None for DataAvailabilityStatus. - */ - public static final DataAvailabilityStatus NONE = fromString("None"); - - /** - * Static value Pending for DataAvailabilityStatus. - */ - public static final DataAvailabilityStatus PENDING = fromString("Pending"); - - /** - * Static value Incomplete for DataAvailabilityStatus. - */ - public static final DataAvailabilityStatus INCOMPLETE = fromString("Incomplete"); - - /** - * Static value Complete for DataAvailabilityStatus. - */ - public static final DataAvailabilityStatus COMPLETE = fromString("Complete"); - - /** - * Creates a new instance of DataAvailabilityStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DataAvailabilityStatus() { - } - - /** - * Creates or finds a DataAvailabilityStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataAvailabilityStatus. - */ - public static DataAvailabilityStatus fromString(String name) { - return fromString(name, DataAvailabilityStatus.class); - } - - /** - * Gets known DataAvailabilityStatus values. - * - * @return known DataAvailabilityStatus values. - */ - public static Collection values() { - return values(DataAvailabilityStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollectionMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollectionMode.java deleted file mode 100644 index 303b59a49c1f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollectionMode.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for DataCollectionMode. - */ -public final class DataCollectionMode extends ExpandableStringEnum { - /** - * Static value Enabled for DataCollectionMode. - */ - public static final DataCollectionMode ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for DataCollectionMode. - */ - public static final DataCollectionMode DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of DataCollectionMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DataCollectionMode() { - } - - /** - * Creates or finds a DataCollectionMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataCollectionMode. - */ - public static DataCollectionMode fromString(String name) { - return fromString(name, DataCollectionMode.class); - } - - /** - * Gets known DataCollectionMode values. - * - * @return known DataCollectionMode values. - */ - public static Collection values() { - return values(DataCollectionMode.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollector.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollector.java deleted file mode 100644 index 160e0fd1c261..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollector.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The DataCollector model. - */ -@Fluent -public final class DataCollector implements JsonSerializable { - /* - * [Required] The collection configuration. Each collection has it own configuration to collect model data and the - * name of collection can be arbitrary string. - * Model data collector can be used for either payload logging or custom logging or both of them. Collection request - * and response are reserved for payload logging, others are for custom logging. - */ - private Map collections; - - /* - * When model data is collected to blob storage, we need to roll the data to different path to avoid logging all of - * them in a single blob file. - * If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. - * If it's day, all data will be collected in blob path /yyyy/MM/dd/. - * The other benefit of rolling path is that model monitoring ui is able to select a time range of data very - * quickly. - */ - private RollingRateType rollingRate; - - /* - * The request logging configuration for mdc, it includes advanced logging settings for all collections. It's - * optional. - */ - private RequestLogging requestLogging; - - /** - * Creates an instance of DataCollector class. - */ - public DataCollector() { - } - - /** - * Get the collections property: [Required] The collection configuration. Each collection has it own configuration - * to collect model data and the name of collection can be arbitrary string. - * Model data collector can be used for either payload logging or custom logging or both of them. Collection request - * and response are reserved for payload logging, others are for custom logging. - * - * @return the collections value. - */ - public Map collections() { - return this.collections; - } - - /** - * Set the collections property: [Required] The collection configuration. Each collection has it own configuration - * to collect model data and the name of collection can be arbitrary string. - * Model data collector can be used for either payload logging or custom logging or both of them. Collection request - * and response are reserved for payload logging, others are for custom logging. - * - * @param collections the collections value to set. - * @return the DataCollector object itself. - */ - public DataCollector withCollections(Map collections) { - this.collections = collections; - return this; - } - - /** - * Get the rollingRate property: When model data is collected to blob storage, we need to roll the data to different - * path to avoid logging all of them in a single blob file. - * If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. - * If it's day, all data will be collected in blob path /yyyy/MM/dd/. - * The other benefit of rolling path is that model monitoring ui is able to select a time range of data very - * quickly. - * - * @return the rollingRate value. - */ - public RollingRateType rollingRate() { - return this.rollingRate; - } - - /** - * Set the rollingRate property: When model data is collected to blob storage, we need to roll the data to different - * path to avoid logging all of them in a single blob file. - * If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. - * If it's day, all data will be collected in blob path /yyyy/MM/dd/. - * The other benefit of rolling path is that model monitoring ui is able to select a time range of data very - * quickly. - * - * @param rollingRate the rollingRate value to set. - * @return the DataCollector object itself. - */ - public DataCollector withRollingRate(RollingRateType rollingRate) { - this.rollingRate = rollingRate; - return this; - } - - /** - * Get the requestLogging property: The request logging configuration for mdc, it includes advanced logging settings - * for all collections. It's optional. - * - * @return the requestLogging value. - */ - public RequestLogging requestLogging() { - return this.requestLogging; - } - - /** - * Set the requestLogging property: The request logging configuration for mdc, it includes advanced logging settings - * for all collections. It's optional. - * - * @param requestLogging the requestLogging value to set. - * @return the DataCollector object itself. - */ - public DataCollector withRequestLogging(RequestLogging requestLogging) { - this.requestLogging = requestLogging; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (collections() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property collections in model DataCollector")); - } else { - collections().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (requestLogging() != null) { - requestLogging().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataCollector.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("collections", this.collections, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("rollingRate", this.rollingRate == null ? null : this.rollingRate.toString()); - jsonWriter.writeJsonField("requestLogging", this.requestLogging); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataCollector from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataCollector if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DataCollector. - */ - public static DataCollector fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataCollector deserializedDataCollector = new DataCollector(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("collections".equals(fieldName)) { - Map collections = reader.readMap(reader1 -> Collection.fromJson(reader1)); - deserializedDataCollector.collections = collections; - } else if ("rollingRate".equals(fieldName)) { - deserializedDataCollector.rollingRate = RollingRateType.fromString(reader.getString()); - } else if ("requestLogging".equals(fieldName)) { - deserializedDataCollector.requestLogging = RequestLogging.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDataCollector; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.java deleted file mode 100644 index 5a1eb419ecca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.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.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; - -/** - * An immutable client-side representation of DataContainer. - */ -public interface DataContainer { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - DataContainerProperties 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.machinelearning.fluent.models.DataContainerInner object. - * - * @return the inner object. - */ - DataContainerInner innerModel(); - - /** - * The entirety of the DataContainer definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The DataContainer definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the DataContainer definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the DataContainer definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the DataContainer definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(DataContainerProperties properties); - } - - /** - * The stage of the DataContainer 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - DataContainer create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DataContainer create(Context context); - } - } - - /** - * Begins update for the DataContainer resource. - * - * @return the stage of resource update. - */ - DataContainer.Update update(); - - /** - * The template for DataContainer update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DataContainer apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DataContainer apply(Context context); - } - - /** - * The DataContainer update stages. - */ - interface UpdateStages { - /** - * The stage of the DataContainer update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(DataContainerProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DataContainer refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DataContainer refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java deleted file mode 100644 index db1bf0750a7d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Container for data asset versions. - */ -@Fluent -public final class DataContainerProperties extends AssetContainer { - /* - * [Required] Specifies the type of data. - */ - private DataType dataType; - - /* - * The latest version inside this container. - */ - private String latestVersion; - - /* - * The next auto incremental version - */ - private String nextVersion; - - /** - * Creates an instance of DataContainerProperties class. - */ - public DataContainerProperties() { - } - - /** - * Get the dataType property: [Required] Specifies the type of data. - * - * @return the dataType value. - */ - public DataType dataType() { - return this.dataType; - } - - /** - * Set the dataType property: [Required] Specifies the type of data. - * - * @param dataType the dataType value to set. - * @return the DataContainerProperties object itself. - */ - public DataContainerProperties withDataType(DataType dataType) { - this.dataType = dataType; - return this; - } - - /** - * Get the latestVersion property: The latest version inside this container. - * - * @return the latestVersion value. - */ - @Override - public String latestVersion() { - return this.latestVersion; - } - - /** - * Get the nextVersion property: The next auto incremental version. - * - * @return the nextVersion value. - */ - @Override - public String nextVersion() { - return this.nextVersion; - } - - /** - * {@inheritDoc} - */ - @Override - public DataContainerProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataContainerProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataContainerProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataContainerProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property dataType in model DataContainerProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataContainerProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataContainerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataContainerProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DataContainerProperties. - */ - public static DataContainerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataContainerProperties deserializedDataContainerProperties = new DataContainerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedDataContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDataContainerProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedDataContainerProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedDataContainerProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("latestVersion".equals(fieldName)) { - deserializedDataContainerProperties.latestVersion = reader.getString(); - } else if ("nextVersion".equals(fieldName)) { - deserializedDataContainerProperties.nextVersion = reader.getString(); - } else if ("dataType".equals(fieldName)) { - deserializedDataContainerProperties.dataType = DataType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDataContainerProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerResourceArmPaginatedResult.java deleted file mode 100644 index 29b91f378cba..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerResourceArmPaginatedResult.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of DataContainer entities. - */ -@Fluent -public final class DataContainerResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type DataContainer. - */ - private List value; - - /* - * The link to the next page of DataContainer objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of DataContainerResourceArmPaginatedResult class. - */ - public DataContainerResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type DataContainer. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type DataContainer. - * - * @param value the value value to set. - * @return the DataContainerResourceArmPaginatedResult object itself. - */ - public DataContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of DataContainer objects. If null, there are no additional - * pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of DataContainer objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the DataContainerResourceArmPaginatedResult object itself. - */ - public DataContainerResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataContainerResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataContainerResourceArmPaginatedResult if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DataContainerResourceArmPaginatedResult. - */ - public static DataContainerResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataContainerResourceArmPaginatedResult deserializedDataContainerResourceArmPaginatedResult - = new DataContainerResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> DataContainerInner.fromJson(reader1)); - deserializedDataContainerResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDataContainerResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDataContainerResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainers.java deleted file mode 100644 index abbe6939107c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainers.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 DataContainers. - */ -public interface DataContainers { - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container. - */ - DataContainer get(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @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 container along with {@link Response}. - */ - DataContainer getById(String id); - - /** - * Get container. - * - * @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 container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete container. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new DataContainer resource. - * - * @param name resource name. - * @return the first stage of the new DataContainer definition. - */ - DataContainer.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMetricThresholdBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMetricThresholdBase.java deleted file mode 100644 index e3026cd89ddf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMetricThresholdBase.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The DataDriftMetricThresholdBase model. - */ -@Fluent -public class DataDriftMetricThresholdBase implements JsonSerializable { - /* - * [Required] Specifies the data type of the metric threshold. - */ - private MonitoringFeatureDataType dataType = MonitoringFeatureDataType.fromString("DataDriftMetricThresholdBase"); - - /* - * The threshold value. If null, a default value will be set depending on the selected metric. - */ - private MonitoringThreshold threshold; - - /** - * Creates an instance of DataDriftMetricThresholdBase class. - */ - public DataDriftMetricThresholdBase() { - } - - /** - * Get the dataType property: [Required] Specifies the data type of the metric threshold. - * - * @return the dataType value. - */ - public MonitoringFeatureDataType dataType() { - return this.dataType; - } - - /** - * Get the threshold property: The threshold value. If null, a default value will be set depending on the selected - * metric. - * - * @return the threshold value. - */ - public MonitoringThreshold threshold() { - return this.threshold; - } - - /** - * Set the threshold property: The threshold value. If null, a default value will be set depending on the selected - * metric. - * - * @param threshold the threshold value to set. - * @return the DataDriftMetricThresholdBase object itself. - */ - public DataDriftMetricThresholdBase withThreshold(MonitoringThreshold threshold) { - this.threshold = threshold; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (threshold() != null) { - threshold().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); - jsonWriter.writeJsonField("threshold", this.threshold); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataDriftMetricThresholdBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataDriftMetricThresholdBase if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DataDriftMetricThresholdBase. - */ - public static DataDriftMetricThresholdBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("dataType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Categorical".equals(discriminatorValue)) { - return CategoricalDataDriftMetricThreshold.fromJson(readerToUse.reset()); - } else if ("Numerical".equals(discriminatorValue)) { - return NumericalDataDriftMetricThreshold.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static DataDriftMetricThresholdBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataDriftMetricThresholdBase deserializedDataDriftMetricThresholdBase = new DataDriftMetricThresholdBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("dataType".equals(fieldName)) { - deserializedDataDriftMetricThresholdBase.dataType - = MonitoringFeatureDataType.fromString(reader.getString()); - } else if ("threshold".equals(fieldName)) { - deserializedDataDriftMetricThresholdBase.threshold = MonitoringThreshold.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDataDriftMetricThresholdBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMonitoringSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMonitoringSignal.java deleted file mode 100644 index 34ba11d52a67..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMonitoringSignal.java +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * The DataDriftMonitoringSignal model. - */ -@Fluent -public final class DataDriftMonitoringSignal extends MonitoringSignalBase { - /* - * [Required] Specifies the type of signal to monitor. - */ - private MonitoringSignalType signalType = MonitoringSignalType.DATA_DRIFT; - - /* - * The feature filter which identifies which feature to calculate drift over. - */ - private MonitoringFeatureFilterBase features; - - /* - * The settings for computing feature importance. - */ - private FeatureImportanceSettings featureImportanceSettings; - - /* - * [Required] A list of metrics to calculate and their associated thresholds. - */ - private List metricThresholds; - - /* - * [Required] The data which drift will be calculated for. - */ - private MonitoringInputDataBase productionData; - - /* - * [Required] The data to calculate drift against. - */ - private MonitoringInputDataBase referenceData; - - /* - * A dictionary that maps feature names to their respective data types. - */ - private Map featureDataTypeOverride; - - /** - * Creates an instance of DataDriftMonitoringSignal class. - */ - public DataDriftMonitoringSignal() { - } - - /** - * Get the signalType property: [Required] Specifies the type of signal to monitor. - * - * @return the signalType value. - */ - @Override - public MonitoringSignalType signalType() { - return this.signalType; - } - - /** - * Get the features property: The feature filter which identifies which feature to calculate drift over. - * - * @return the features value. - */ - public MonitoringFeatureFilterBase features() { - return this.features; - } - - /** - * Set the features property: The feature filter which identifies which feature to calculate drift over. - * - * @param features the features value to set. - * @return the DataDriftMonitoringSignal object itself. - */ - public DataDriftMonitoringSignal withFeatures(MonitoringFeatureFilterBase features) { - this.features = features; - return this; - } - - /** - * Get the featureImportanceSettings property: The settings for computing feature importance. - * - * @return the featureImportanceSettings value. - */ - public FeatureImportanceSettings featureImportanceSettings() { - return this.featureImportanceSettings; - } - - /** - * Set the featureImportanceSettings property: The settings for computing feature importance. - * - * @param featureImportanceSettings the featureImportanceSettings value to set. - * @return the DataDriftMonitoringSignal object itself. - */ - public DataDriftMonitoringSignal - withFeatureImportanceSettings(FeatureImportanceSettings featureImportanceSettings) { - this.featureImportanceSettings = featureImportanceSettings; - return this; - } - - /** - * Get the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. - * - * @return the metricThresholds value. - */ - public List metricThresholds() { - return this.metricThresholds; - } - - /** - * Set the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. - * - * @param metricThresholds the metricThresholds value to set. - * @return the DataDriftMonitoringSignal object itself. - */ - public DataDriftMonitoringSignal withMetricThresholds(List metricThresholds) { - this.metricThresholds = metricThresholds; - return this; - } - - /** - * Get the productionData property: [Required] The data which drift will be calculated for. - * - * @return the productionData value. - */ - public MonitoringInputDataBase productionData() { - return this.productionData; - } - - /** - * Set the productionData property: [Required] The data which drift will be calculated for. - * - * @param productionData the productionData value to set. - * @return the DataDriftMonitoringSignal object itself. - */ - public DataDriftMonitoringSignal withProductionData(MonitoringInputDataBase productionData) { - this.productionData = productionData; - return this; - } - - /** - * Get the referenceData property: [Required] The data to calculate drift against. - * - * @return the referenceData value. - */ - public MonitoringInputDataBase referenceData() { - return this.referenceData; - } - - /** - * Set the referenceData property: [Required] The data to calculate drift against. - * - * @param referenceData the referenceData value to set. - * @return the DataDriftMonitoringSignal object itself. - */ - public DataDriftMonitoringSignal withReferenceData(MonitoringInputDataBase referenceData) { - this.referenceData = referenceData; - return this; - } - - /** - * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. - * - * @return the featureDataTypeOverride value. - */ - public Map featureDataTypeOverride() { - return this.featureDataTypeOverride; - } - - /** - * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. - * - * @param featureDataTypeOverride the featureDataTypeOverride value to set. - * @return the DataDriftMonitoringSignal object itself. - */ - public DataDriftMonitoringSignal - withFeatureDataTypeOverride(Map featureDataTypeOverride) { - this.featureDataTypeOverride = featureDataTypeOverride; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataDriftMonitoringSignal withNotificationTypes(List notificationTypes) { - super.withNotificationTypes(notificationTypes); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataDriftMonitoringSignal withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (features() != null) { - features().validate(); - } - if (featureImportanceSettings() != null) { - featureImportanceSettings().validate(); - } - if (metricThresholds() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metricThresholds in model DataDriftMonitoringSignal")); - } else { - metricThresholds().forEach(e -> e.validate()); - } - if (productionData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property productionData in model DataDriftMonitoringSignal")); - } else { - productionData().validate(); - } - if (referenceData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property referenceData in model DataDriftMonitoringSignal")); - } else { - referenceData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataDriftMonitoringSignal.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("notificationTypes", notificationTypes(), - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("metricThresholds", this.metricThresholds, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("productionData", this.productionData); - jsonWriter.writeJsonField("referenceData", this.referenceData); - jsonWriter.writeStringField("signalType", this.signalType == null ? null : this.signalType.toString()); - jsonWriter.writeJsonField("features", this.features); - jsonWriter.writeJsonField("featureImportanceSettings", this.featureImportanceSettings); - jsonWriter.writeMapField("featureDataTypeOverride", this.featureDataTypeOverride, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataDriftMonitoringSignal from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataDriftMonitoringSignal if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DataDriftMonitoringSignal. - */ - public static DataDriftMonitoringSignal fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataDriftMonitoringSignal deserializedDataDriftMonitoringSignal = new DataDriftMonitoringSignal(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("notificationTypes".equals(fieldName)) { - List notificationTypes - = reader.readArray(reader1 -> MonitoringNotificationType.fromString(reader1.getString())); - deserializedDataDriftMonitoringSignal.withNotificationTypes(notificationTypes); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedDataDriftMonitoringSignal.withProperties(properties); - } else if ("metricThresholds".equals(fieldName)) { - List metricThresholds - = reader.readArray(reader1 -> DataDriftMetricThresholdBase.fromJson(reader1)); - deserializedDataDriftMonitoringSignal.metricThresholds = metricThresholds; - } else if ("productionData".equals(fieldName)) { - deserializedDataDriftMonitoringSignal.productionData = MonitoringInputDataBase.fromJson(reader); - } else if ("referenceData".equals(fieldName)) { - deserializedDataDriftMonitoringSignal.referenceData = MonitoringInputDataBase.fromJson(reader); - } else if ("signalType".equals(fieldName)) { - deserializedDataDriftMonitoringSignal.signalType - = MonitoringSignalType.fromString(reader.getString()); - } else if ("features".equals(fieldName)) { - deserializedDataDriftMonitoringSignal.features = MonitoringFeatureFilterBase.fromJson(reader); - } else if ("featureImportanceSettings".equals(fieldName)) { - deserializedDataDriftMonitoringSignal.featureImportanceSettings - = FeatureImportanceSettings.fromJson(reader); - } else if ("featureDataTypeOverride".equals(fieldName)) { - Map featureDataTypeOverride - = reader.readMap(reader1 -> MonitoringFeatureDataType.fromString(reader1.getString())); - deserializedDataDriftMonitoringSignal.featureDataTypeOverride = featureDataTypeOverride; - } else { - reader.skipChildren(); - } - } - - return deserializedDataDriftMonitoringSignal; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java deleted file mode 100644 index 1de839ee3698..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * A DataFactory compute. - */ -@Fluent -public final class DataFactory extends Compute { - /* - * The type of compute - */ - private ComputeType computeType = ComputeType.DATA_FACTORY; - - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - - /** - * Creates an instance of DataFactory class. - */ - public DataFactory() { - } - - /** - * Get the computeType property: The type of compute. - * - * @return the computeType value. - */ - @Override - public ComputeType computeType() { - return this.computeType; - } - - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - - /** - * {@inheritDoc} - */ - @Override - public DataFactory withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataFactory withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataFactory withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataFactory withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeLocation", computeLocation()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("resourceId", resourceId()); - jsonWriter.writeBooleanField("disableLocalAuth", disableLocalAuth()); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataFactory from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataFactory if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DataFactory. - */ - public static DataFactory fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataFactory deserializedDataFactory = new DataFactory(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeLocation".equals(fieldName)) { - deserializedDataFactory.withComputeLocation(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedDataFactory.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedDataFactory.withDescription(reader.getString()); - } else if ("createdOn".equals(fieldName)) { - deserializedDataFactory.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("modifiedOn".equals(fieldName)) { - deserializedDataFactory.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("resourceId".equals(fieldName)) { - deserializedDataFactory.withResourceId(reader.getString()); - } else if ("provisioningErrors".equals(fieldName)) { - List provisioningErrors - = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedDataFactory.provisioningErrors = provisioningErrors; - } else if ("isAttachedCompute".equals(fieldName)) { - deserializedDataFactory.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); - } else if ("disableLocalAuth".equals(fieldName)) { - deserializedDataFactory.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); - } else if ("computeType".equals(fieldName)) { - deserializedDataFactory.computeType = ComputeType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDataFactory; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java deleted file mode 100644 index 0fc59f89cb7b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * A DataLakeAnalytics compute. - */ -@Fluent -public final class DataLakeAnalytics extends Compute { - /* - * The type of compute - */ - private ComputeType computeType = ComputeType.DATA_LAKE_ANALYTICS; - - /* - * The properties property. - */ - private DataLakeAnalyticsSchemaProperties properties; - - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - - /** - * Creates an instance of DataLakeAnalytics class. - */ - public DataLakeAnalytics() { - } - - /** - * Get the computeType property: The type of compute. - * - * @return the computeType value. - */ - @Override - public ComputeType computeType() { - return this.computeType; - } - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public DataLakeAnalyticsSchemaProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the DataLakeAnalytics object itself. - */ - public DataLakeAnalytics withProperties(DataLakeAnalyticsSchemaProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - - /** - * {@inheritDoc} - */ - @Override - public DataLakeAnalytics withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataLakeAnalytics withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataLakeAnalytics withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataLakeAnalytics withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeLocation", computeLocation()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("resourceId", resourceId()); - jsonWriter.writeBooleanField("disableLocalAuth", disableLocalAuth()); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataLakeAnalytics from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataLakeAnalytics if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DataLakeAnalytics. - */ - public static DataLakeAnalytics fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataLakeAnalytics deserializedDataLakeAnalytics = new DataLakeAnalytics(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeLocation".equals(fieldName)) { - deserializedDataLakeAnalytics.withComputeLocation(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedDataLakeAnalytics.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedDataLakeAnalytics.withDescription(reader.getString()); - } else if ("createdOn".equals(fieldName)) { - deserializedDataLakeAnalytics.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("modifiedOn".equals(fieldName)) { - deserializedDataLakeAnalytics.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("resourceId".equals(fieldName)) { - deserializedDataLakeAnalytics.withResourceId(reader.getString()); - } else if ("provisioningErrors".equals(fieldName)) { - List provisioningErrors - = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedDataLakeAnalytics.provisioningErrors = provisioningErrors; - } else if ("isAttachedCompute".equals(fieldName)) { - deserializedDataLakeAnalytics.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); - } else if ("disableLocalAuth".equals(fieldName)) { - deserializedDataLakeAnalytics.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); - } else if ("computeType".equals(fieldName)) { - deserializedDataLakeAnalytics.computeType = ComputeType.fromString(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedDataLakeAnalytics.properties = DataLakeAnalyticsSchemaProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDataLakeAnalytics; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchema.java deleted file mode 100644 index fa249102d79e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchema.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The DataLakeAnalyticsSchema model. - */ -@Fluent -public class DataLakeAnalyticsSchema implements JsonSerializable { - /* - * The properties property. - */ - private DataLakeAnalyticsSchemaProperties properties; - - /** - * Creates an instance of DataLakeAnalyticsSchema class. - */ - public DataLakeAnalyticsSchema() { - } - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public DataLakeAnalyticsSchemaProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the DataLakeAnalyticsSchema object itself. - */ - public DataLakeAnalyticsSchema withProperties(DataLakeAnalyticsSchemaProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataLakeAnalyticsSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataLakeAnalyticsSchema if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DataLakeAnalyticsSchema. - */ - public static DataLakeAnalyticsSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataLakeAnalyticsSchema deserializedDataLakeAnalyticsSchema = new DataLakeAnalyticsSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedDataLakeAnalyticsSchema.properties = DataLakeAnalyticsSchemaProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDataLakeAnalyticsSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.java deleted file mode 100644 index 1a8b16c22485..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The DataLakeAnalyticsSchemaProperties model. - */ -@Fluent -public final class DataLakeAnalyticsSchemaProperties implements JsonSerializable { - /* - * DataLake Store Account Name - */ - private String dataLakeStoreAccountName; - - /** - * Creates an instance of DataLakeAnalyticsSchemaProperties class. - */ - public DataLakeAnalyticsSchemaProperties() { - } - - /** - * Get the dataLakeStoreAccountName property: DataLake Store Account Name. - * - * @return the dataLakeStoreAccountName value. - */ - public String dataLakeStoreAccountName() { - return this.dataLakeStoreAccountName; - } - - /** - * Set the dataLakeStoreAccountName property: DataLake Store Account Name. - * - * @param dataLakeStoreAccountName the dataLakeStoreAccountName value to set. - * @return the DataLakeAnalyticsSchemaProperties object itself. - */ - public DataLakeAnalyticsSchemaProperties withDataLakeStoreAccountName(String dataLakeStoreAccountName) { - this.dataLakeStoreAccountName = dataLakeStoreAccountName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataLakeStoreAccountName", this.dataLakeStoreAccountName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataLakeAnalyticsSchemaProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataLakeAnalyticsSchemaProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DataLakeAnalyticsSchemaProperties. - */ - public static DataLakeAnalyticsSchemaProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataLakeAnalyticsSchemaProperties deserializedDataLakeAnalyticsSchemaProperties - = new DataLakeAnalyticsSchemaProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("dataLakeStoreAccountName".equals(fieldName)) { - deserializedDataLakeAnalyticsSchemaProperties.dataLakeStoreAccountName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDataLakeAnalyticsSchemaProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.java deleted file mode 100644 index a9084e06af97..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Reference to an asset via its path in a datastore. - */ -@Fluent -public final class DataPathAssetReference extends AssetReferenceBase { - /* - * [Required] Specifies the type of asset reference. - */ - private ReferenceType referenceType = ReferenceType.DATA_PATH; - - /* - * The path of the file/directory in the datastore. - */ - private String path; - - /* - * ARM resource ID of the datastore where the asset is located. - */ - private String datastoreId; - - /** - * Creates an instance of DataPathAssetReference class. - */ - public DataPathAssetReference() { - } - - /** - * Get the referenceType property: [Required] Specifies the type of asset reference. - * - * @return the referenceType value. - */ - @Override - public ReferenceType referenceType() { - return this.referenceType; - } - - /** - * Get the path property: The path of the file/directory in the datastore. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: The path of the file/directory in the datastore. - * - * @param path the path value to set. - * @return the DataPathAssetReference object itself. - */ - public DataPathAssetReference withPath(String path) { - this.path = path; - return this; - } - - /** - * Get the datastoreId property: ARM resource ID of the datastore where the asset is located. - * - * @return the datastoreId value. - */ - public String datastoreId() { - return this.datastoreId; - } - - /** - * Set the datastoreId property: ARM resource ID of the datastore where the asset is located. - * - * @param datastoreId the datastoreId value to set. - * @return the DataPathAssetReference object itself. - */ - public DataPathAssetReference withDatastoreId(String datastoreId) { - this.datastoreId = datastoreId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("referenceType", this.referenceType == null ? null : this.referenceType.toString()); - jsonWriter.writeStringField("path", this.path); - jsonWriter.writeStringField("datastoreId", this.datastoreId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataPathAssetReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataPathAssetReference if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DataPathAssetReference. - */ - public static DataPathAssetReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataPathAssetReference deserializedDataPathAssetReference = new DataPathAssetReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("referenceType".equals(fieldName)) { - deserializedDataPathAssetReference.referenceType = ReferenceType.fromString(reader.getString()); - } else if ("path".equals(fieldName)) { - deserializedDataPathAssetReference.path = reader.getString(); - } else if ("datastoreId".equals(fieldName)) { - deserializedDataPathAssetReference.datastoreId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDataPathAssetReference; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMetricThresholdBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMetricThresholdBase.java deleted file mode 100644 index 8ec4a6973981..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMetricThresholdBase.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The DataQualityMetricThresholdBase model. - */ -@Fluent -public class DataQualityMetricThresholdBase implements JsonSerializable { - /* - * [Required] Specifies the data type of the metric threshold. - */ - private MonitoringFeatureDataType dataType = MonitoringFeatureDataType.fromString("DataQualityMetricThresholdBase"); - - /* - * The threshold value. If null, a default value will be set depending on the selected metric. - */ - private MonitoringThreshold threshold; - - /** - * Creates an instance of DataQualityMetricThresholdBase class. - */ - public DataQualityMetricThresholdBase() { - } - - /** - * Get the dataType property: [Required] Specifies the data type of the metric threshold. - * - * @return the dataType value. - */ - public MonitoringFeatureDataType dataType() { - return this.dataType; - } - - /** - * Get the threshold property: The threshold value. If null, a default value will be set depending on the selected - * metric. - * - * @return the threshold value. - */ - public MonitoringThreshold threshold() { - return this.threshold; - } - - /** - * Set the threshold property: The threshold value. If null, a default value will be set depending on the selected - * metric. - * - * @param threshold the threshold value to set. - * @return the DataQualityMetricThresholdBase object itself. - */ - public DataQualityMetricThresholdBase withThreshold(MonitoringThreshold threshold) { - this.threshold = threshold; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (threshold() != null) { - threshold().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); - jsonWriter.writeJsonField("threshold", this.threshold); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataQualityMetricThresholdBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataQualityMetricThresholdBase if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DataQualityMetricThresholdBase. - */ - public static DataQualityMetricThresholdBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("dataType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Categorical".equals(discriminatorValue)) { - return CategoricalDataQualityMetricThreshold.fromJson(readerToUse.reset()); - } else if ("Numerical".equals(discriminatorValue)) { - return NumericalDataQualityMetricThreshold.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static DataQualityMetricThresholdBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataQualityMetricThresholdBase deserializedDataQualityMetricThresholdBase - = new DataQualityMetricThresholdBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("dataType".equals(fieldName)) { - deserializedDataQualityMetricThresholdBase.dataType - = MonitoringFeatureDataType.fromString(reader.getString()); - } else if ("threshold".equals(fieldName)) { - deserializedDataQualityMetricThresholdBase.threshold = MonitoringThreshold.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDataQualityMetricThresholdBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMonitoringSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMonitoringSignal.java deleted file mode 100644 index b80a6afbd0fc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMonitoringSignal.java +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * The DataQualityMonitoringSignal model. - */ -@Fluent -public final class DataQualityMonitoringSignal extends MonitoringSignalBase { - /* - * [Required] Specifies the type of signal to monitor. - */ - private MonitoringSignalType signalType = MonitoringSignalType.DATA_QUALITY; - - /* - * The features to calculate drift over. - */ - private MonitoringFeatureFilterBase features; - - /* - * The settings for computing feature importance. - */ - private FeatureImportanceSettings featureImportanceSettings; - - /* - * [Required] A list of metrics to calculate and their associated thresholds. - */ - private List metricThresholds; - - /* - * [Required] The data produced by the production service which drift will be calculated for. - */ - private MonitoringInputDataBase productionData; - - /* - * [Required] The data to calculate drift against. - */ - private MonitoringInputDataBase referenceData; - - /* - * A dictionary that maps feature names to their respective data types. - */ - private Map featureDataTypeOverride; - - /** - * Creates an instance of DataQualityMonitoringSignal class. - */ - public DataQualityMonitoringSignal() { - } - - /** - * Get the signalType property: [Required] Specifies the type of signal to monitor. - * - * @return the signalType value. - */ - @Override - public MonitoringSignalType signalType() { - return this.signalType; - } - - /** - * Get the features property: The features to calculate drift over. - * - * @return the features value. - */ - public MonitoringFeatureFilterBase features() { - return this.features; - } - - /** - * Set the features property: The features to calculate drift over. - * - * @param features the features value to set. - * @return the DataQualityMonitoringSignal object itself. - */ - public DataQualityMonitoringSignal withFeatures(MonitoringFeatureFilterBase features) { - this.features = features; - return this; - } - - /** - * Get the featureImportanceSettings property: The settings for computing feature importance. - * - * @return the featureImportanceSettings value. - */ - public FeatureImportanceSettings featureImportanceSettings() { - return this.featureImportanceSettings; - } - - /** - * Set the featureImportanceSettings property: The settings for computing feature importance. - * - * @param featureImportanceSettings the featureImportanceSettings value to set. - * @return the DataQualityMonitoringSignal object itself. - */ - public DataQualityMonitoringSignal - withFeatureImportanceSettings(FeatureImportanceSettings featureImportanceSettings) { - this.featureImportanceSettings = featureImportanceSettings; - return this; - } - - /** - * Get the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. - * - * @return the metricThresholds value. - */ - public List metricThresholds() { - return this.metricThresholds; - } - - /** - * Set the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. - * - * @param metricThresholds the metricThresholds value to set. - * @return the DataQualityMonitoringSignal object itself. - */ - public DataQualityMonitoringSignal withMetricThresholds(List metricThresholds) { - this.metricThresholds = metricThresholds; - return this; - } - - /** - * Get the productionData property: [Required] The data produced by the production service which drift will be - * calculated for. - * - * @return the productionData value. - */ - public MonitoringInputDataBase productionData() { - return this.productionData; - } - - /** - * Set the productionData property: [Required] The data produced by the production service which drift will be - * calculated for. - * - * @param productionData the productionData value to set. - * @return the DataQualityMonitoringSignal object itself. - */ - public DataQualityMonitoringSignal withProductionData(MonitoringInputDataBase productionData) { - this.productionData = productionData; - return this; - } - - /** - * Get the referenceData property: [Required] The data to calculate drift against. - * - * @return the referenceData value. - */ - public MonitoringInputDataBase referenceData() { - return this.referenceData; - } - - /** - * Set the referenceData property: [Required] The data to calculate drift against. - * - * @param referenceData the referenceData value to set. - * @return the DataQualityMonitoringSignal object itself. - */ - public DataQualityMonitoringSignal withReferenceData(MonitoringInputDataBase referenceData) { - this.referenceData = referenceData; - return this; - } - - /** - * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. - * - * @return the featureDataTypeOverride value. - */ - public Map featureDataTypeOverride() { - return this.featureDataTypeOverride; - } - - /** - * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. - * - * @param featureDataTypeOverride the featureDataTypeOverride value to set. - * @return the DataQualityMonitoringSignal object itself. - */ - public DataQualityMonitoringSignal - withFeatureDataTypeOverride(Map featureDataTypeOverride) { - this.featureDataTypeOverride = featureDataTypeOverride; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataQualityMonitoringSignal withNotificationTypes(List notificationTypes) { - super.withNotificationTypes(notificationTypes); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataQualityMonitoringSignal withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (features() != null) { - features().validate(); - } - if (featureImportanceSettings() != null) { - featureImportanceSettings().validate(); - } - if (metricThresholds() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metricThresholds in model DataQualityMonitoringSignal")); - } else { - metricThresholds().forEach(e -> e.validate()); - } - if (productionData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property productionData in model DataQualityMonitoringSignal")); - } else { - productionData().validate(); - } - if (referenceData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property referenceData in model DataQualityMonitoringSignal")); - } else { - referenceData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataQualityMonitoringSignal.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("notificationTypes", notificationTypes(), - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("metricThresholds", this.metricThresholds, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("productionData", this.productionData); - jsonWriter.writeJsonField("referenceData", this.referenceData); - jsonWriter.writeStringField("signalType", this.signalType == null ? null : this.signalType.toString()); - jsonWriter.writeJsonField("features", this.features); - jsonWriter.writeJsonField("featureImportanceSettings", this.featureImportanceSettings); - jsonWriter.writeMapField("featureDataTypeOverride", this.featureDataTypeOverride, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataQualityMonitoringSignal from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataQualityMonitoringSignal if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DataQualityMonitoringSignal. - */ - public static DataQualityMonitoringSignal fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataQualityMonitoringSignal deserializedDataQualityMonitoringSignal = new DataQualityMonitoringSignal(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("notificationTypes".equals(fieldName)) { - List notificationTypes - = reader.readArray(reader1 -> MonitoringNotificationType.fromString(reader1.getString())); - deserializedDataQualityMonitoringSignal.withNotificationTypes(notificationTypes); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedDataQualityMonitoringSignal.withProperties(properties); - } else if ("metricThresholds".equals(fieldName)) { - List metricThresholds - = reader.readArray(reader1 -> DataQualityMetricThresholdBase.fromJson(reader1)); - deserializedDataQualityMonitoringSignal.metricThresholds = metricThresholds; - } else if ("productionData".equals(fieldName)) { - deserializedDataQualityMonitoringSignal.productionData = MonitoringInputDataBase.fromJson(reader); - } else if ("referenceData".equals(fieldName)) { - deserializedDataQualityMonitoringSignal.referenceData = MonitoringInputDataBase.fromJson(reader); - } else if ("signalType".equals(fieldName)) { - deserializedDataQualityMonitoringSignal.signalType - = MonitoringSignalType.fromString(reader.getString()); - } else if ("features".equals(fieldName)) { - deserializedDataQualityMonitoringSignal.features = MonitoringFeatureFilterBase.fromJson(reader); - } else if ("featureImportanceSettings".equals(fieldName)) { - deserializedDataQualityMonitoringSignal.featureImportanceSettings - = FeatureImportanceSettings.fromJson(reader); - } else if ("featureDataTypeOverride".equals(fieldName)) { - Map featureDataTypeOverride - = reader.readMap(reader1 -> MonitoringFeatureDataType.fromString(reader1.getString())); - deserializedDataQualityMonitoringSignal.featureDataTypeOverride = featureDataTypeOverride; - } else { - reader.skipChildren(); - } - } - - return deserializedDataQualityMonitoringSignal; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredential.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredential.java deleted file mode 100644 index 628cd4ec4a6c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredential.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * DataReferenceCredential base class. - */ -@Immutable -public class DataReferenceCredential implements JsonSerializable { - /* - * [Required] Credential type used to authentication with storage. - */ - private DataReferenceCredentialType credentialType - = DataReferenceCredentialType.fromString("DataReferenceCredential"); - - /** - * Creates an instance of DataReferenceCredential class. - */ - public DataReferenceCredential() { - } - - /** - * Get the credentialType property: [Required] Credential type used to authentication with storage. - * - * @return the credentialType value. - */ - public DataReferenceCredentialType credentialType() { - return this.credentialType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("credentialType", - this.credentialType == null ? null : this.credentialType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataReferenceCredential from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataReferenceCredential if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DataReferenceCredential. - */ - public static DataReferenceCredential fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("credentialType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("NoCredentials".equals(discriminatorValue)) { - return AnonymousAccessCredential.fromJson(readerToUse.reset()); - } else if ("DockerCredentials".equals(discriminatorValue)) { - return DockerCredential.fromJson(readerToUse.reset()); - } else if ("ManagedIdentity".equals(discriminatorValue)) { - return ManagedIdentityCredential.fromJson(readerToUse.reset()); - } else if ("SAS".equals(discriminatorValue)) { - return SasCredential.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static DataReferenceCredential fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataReferenceCredential deserializedDataReferenceCredential = new DataReferenceCredential(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("credentialType".equals(fieldName)) { - deserializedDataReferenceCredential.credentialType - = DataReferenceCredentialType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDataReferenceCredential; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredentialType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredentialType.java deleted file mode 100644 index c364b7398d33..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredentialType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine the DataReference credentials type. - */ -public final class DataReferenceCredentialType extends ExpandableStringEnum { - /** - * Static value SAS for DataReferenceCredentialType. - */ - public static final DataReferenceCredentialType SAS = fromString("SAS"); - - /** - * Static value DockerCredentials for DataReferenceCredentialType. - */ - public static final DataReferenceCredentialType DOCKER_CREDENTIALS = fromString("DockerCredentials"); - - /** - * Static value ManagedIdentity for DataReferenceCredentialType. - */ - public static final DataReferenceCredentialType MANAGED_IDENTITY = fromString("ManagedIdentity"); - - /** - * Static value NoCredentials for DataReferenceCredentialType. - */ - public static final DataReferenceCredentialType NO_CREDENTIALS = fromString("NoCredentials"); - - /** - * Creates a new instance of DataReferenceCredentialType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DataReferenceCredentialType() { - } - - /** - * Creates or finds a DataReferenceCredentialType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataReferenceCredentialType. - */ - public static DataReferenceCredentialType fromString(String name) { - return fromString(name, DataReferenceCredentialType.class); - } - - /** - * Gets known DataReferenceCredentialType values. - * - * @return known DataReferenceCredentialType values. - */ - public static Collection values() { - return values(DataReferenceCredentialType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataType.java deleted file mode 100644 index f5d4202cbc11..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine the type of data. - */ -public final class DataType extends ExpandableStringEnum { - /** - * Static value uri_file for DataType. - */ - public static final DataType URI_FILE = fromString("uri_file"); - - /** - * Static value uri_folder for DataType. - */ - public static final DataType URI_FOLDER = fromString("uri_folder"); - - /** - * Static value mltable for DataType. - */ - public static final DataType MLTABLE = fromString("mltable"); - - /** - * Creates a new instance of DataType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DataType() { - } - - /** - * Creates or finds a DataType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataType. - */ - public static DataType fromString(String name) { - return fromString(name, DataType.class); - } - - /** - * Gets known DataType values. - * - * @return known DataType values. - */ - public static Collection values() { - return values(DataType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBase.java deleted file mode 100644 index dcb21a9cb27f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBase.java +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; - -/** - * An immutable client-side representation of DataVersionBase. - */ -public interface DataVersionBase { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - DataVersionBaseProperties 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.machinelearning.fluent.models.DataVersionBaseInner object. - * - * @return the inner object. - */ - DataVersionBaseInner innerModel(); - - /** - * The entirety of the DataVersionBase definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The DataVersionBase definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the DataVersionBase definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the DataVersionBase definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @return the next definition stage. - */ - WithProperties withExistingData(String resourceGroupName, String workspaceName, String name); - } - - /** - * The stage of the DataVersionBase definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(DataVersionBaseProperties properties); - } - - /** - * The stage of the DataVersionBase 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - DataVersionBase create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DataVersionBase create(Context context); - } - } - - /** - * Begins update for the DataVersionBase resource. - * - * @return the stage of resource update. - */ - DataVersionBase.Update update(); - - /** - * The template for DataVersionBase update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DataVersionBase apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DataVersionBase apply(Context context); - } - - /** - * The DataVersionBase update stages. - */ - interface UpdateStages { - /** - * The stage of the DataVersionBase update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(DataVersionBaseProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DataVersionBase refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DataVersionBase refresh(Context context); - - /** - * Publish version asset into registry. - * - * @param body Destination registry info. - * @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. - */ - void publish(DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param body Destination registry info. - * @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. - */ - void publish(DestinationAsset body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseProperties.java deleted file mode 100644 index e9eee92e70eb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseProperties.java +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Data version base definition. - */ -@Fluent -public class DataVersionBaseProperties extends AssetBase { - /* - * [Required] Specifies the type of data. - */ - private DataType dataType = DataType.fromString("DataVersionBaseProperties"); - - /* - * [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 - */ - private String dataUri; - - /** - * Creates an instance of DataVersionBaseProperties class. - */ - public DataVersionBaseProperties() { - } - - /** - * Get the dataType property: [Required] Specifies the type of data. - * - * @return the dataType value. - */ - public DataType dataType() { - return this.dataType; - } - - /** - * Get the dataUri property: [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. - * - * @return the dataUri value. - */ - public String dataUri() { - return this.dataUri; - } - - /** - * Set the dataUri property: [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. - * - * @param dataUri the dataUri value to set. - * @return the DataVersionBaseProperties object itself. - */ - public DataVersionBaseProperties withDataUri(String dataUri) { - this.dataUri = dataUri; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataVersionBaseProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataVersionBaseProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataVersionBaseProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataVersionBaseProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DataVersionBaseProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataUri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property dataUri in model DataVersionBaseProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataVersionBaseProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); - jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); - jsonWriter.writeStringField("dataUri", this.dataUri); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataVersionBaseProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataVersionBaseProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DataVersionBaseProperties. - */ - public static DataVersionBaseProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("dataType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("mltable".equals(discriminatorValue)) { - return MLTableData.fromJson(readerToUse.reset()); - } else if ("uri_file".equals(discriminatorValue)) { - return UriFileDataVersion.fromJson(readerToUse.reset()); - } else if ("uri_folder".equals(discriminatorValue)) { - return UriFolderDataVersion.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static DataVersionBaseProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataVersionBaseProperties deserializedDataVersionBaseProperties = new DataVersionBaseProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedDataVersionBaseProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDataVersionBaseProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedDataVersionBaseProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedDataVersionBaseProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("isAnonymous".equals(fieldName)) { - deserializedDataVersionBaseProperties.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); - } else if ("dataUri".equals(fieldName)) { - deserializedDataVersionBaseProperties.dataUri = reader.getString(); - } else if ("dataType".equals(fieldName)) { - deserializedDataVersionBaseProperties.dataType = DataType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDataVersionBaseProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseResourceArmPaginatedResult.java deleted file mode 100644 index ae9a6f08344c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseResourceArmPaginatedResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of DataVersionBase entities. - */ -@Fluent -public final class DataVersionBaseResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type DataVersionBase. - */ - private List value; - - /* - * The link to the next page of DataVersionBase objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of DataVersionBaseResourceArmPaginatedResult class. - */ - public DataVersionBaseResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type DataVersionBase. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type DataVersionBase. - * - * @param value the value value to set. - * @return the DataVersionBaseResourceArmPaginatedResult object itself. - */ - public DataVersionBaseResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of DataVersionBase objects. If null, there are no additional - * pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of DataVersionBase objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the DataVersionBaseResourceArmPaginatedResult object itself. - */ - public DataVersionBaseResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataVersionBaseResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataVersionBaseResourceArmPaginatedResult if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DataVersionBaseResourceArmPaginatedResult. - */ - public static DataVersionBaseResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataVersionBaseResourceArmPaginatedResult deserializedDataVersionBaseResourceArmPaginatedResult - = new DataVersionBaseResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> DataVersionBaseInner.fromJson(reader1)); - deserializedDataVersionBaseResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDataVersionBaseResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDataVersionBaseResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersions.java deleted file mode 100644 index 97c13eebe19b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersions.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 DataVersions. - */ -public interface DataVersions { - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @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 a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @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 a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, - Integer top, String skip, String tags, ListViewType listViewType, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version. - */ - DataVersionBase get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, - Context context); - - /** - * Get version. - * - * @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 version along with {@link Response}. - */ - DataVersionBase getById(String id); - - /** - * Get version. - * - * @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 version along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete version. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete version. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new DataVersionBase resource. - * - * @param name resource name. - * @return the first stage of the new DataVersionBase definition. - */ - DataVersionBase.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java deleted file mode 100644 index a4ce92e15f05..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * A DataFactory compute. - */ -@Fluent -public final class Databricks extends Compute { - /* - * The type of compute - */ - private ComputeType computeType = ComputeType.DATABRICKS; - - /* - * Properties of Databricks - */ - private DatabricksProperties properties; - - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - - /** - * Creates an instance of Databricks class. - */ - public Databricks() { - } - - /** - * Get the computeType property: The type of compute. - * - * @return the computeType value. - */ - @Override - public ComputeType computeType() { - return this.computeType; - } - - /** - * Get the properties property: Properties of Databricks. - * - * @return the properties value. - */ - public DatabricksProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of Databricks. - * - * @param properties the properties value to set. - * @return the Databricks object itself. - */ - public Databricks withProperties(DatabricksProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - - /** - * {@inheritDoc} - */ - @Override - public Databricks withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Databricks withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Databricks withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Databricks withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeLocation", computeLocation()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("resourceId", resourceId()); - jsonWriter.writeBooleanField("disableLocalAuth", disableLocalAuth()); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Databricks from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Databricks if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the Databricks. - */ - public static Databricks fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Databricks deserializedDatabricks = new Databricks(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeLocation".equals(fieldName)) { - deserializedDatabricks.withComputeLocation(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedDatabricks.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedDatabricks.withDescription(reader.getString()); - } else if ("createdOn".equals(fieldName)) { - deserializedDatabricks.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("modifiedOn".equals(fieldName)) { - deserializedDatabricks.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("resourceId".equals(fieldName)) { - deserializedDatabricks.withResourceId(reader.getString()); - } else if ("provisioningErrors".equals(fieldName)) { - List provisioningErrors - = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedDatabricks.provisioningErrors = provisioningErrors; - } else if ("isAttachedCompute".equals(fieldName)) { - deserializedDatabricks.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); - } else if ("disableLocalAuth".equals(fieldName)) { - deserializedDatabricks.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); - } else if ("computeType".equals(fieldName)) { - deserializedDatabricks.computeType = ComputeType.fromString(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedDatabricks.properties = DatabricksProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDatabricks; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.java deleted file mode 100644 index 846d0988f71a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; -import java.io.IOException; - -/** - * Secrets related to a Machine Learning compute based on Databricks. - */ -@Fluent -public final class DatabricksComputeSecrets extends ComputeSecretsInner { - /* - * The type of compute - */ - private ComputeType computeType = ComputeType.DATABRICKS; - - /* - * access token for databricks account. - */ - private String databricksAccessToken; - - /** - * Creates an instance of DatabricksComputeSecrets class. - */ - public DatabricksComputeSecrets() { - } - - /** - * Get the computeType property: The type of compute. - * - * @return the computeType value. - */ - @Override - public ComputeType computeType() { - return this.computeType; - } - - /** - * Get the databricksAccessToken property: access token for databricks account. - * - * @return the databricksAccessToken value. - */ - public String databricksAccessToken() { - return this.databricksAccessToken; - } - - /** - * Set the databricksAccessToken property: access token for databricks account. - * - * @param databricksAccessToken the databricksAccessToken value to set. - * @return the DatabricksComputeSecrets object itself. - */ - public DatabricksComputeSecrets withDatabricksAccessToken(String databricksAccessToken) { - this.databricksAccessToken = databricksAccessToken; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - jsonWriter.writeStringField("databricksAccessToken", this.databricksAccessToken); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatabricksComputeSecrets from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabricksComputeSecrets if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DatabricksComputeSecrets. - */ - public static DatabricksComputeSecrets fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DatabricksComputeSecrets deserializedDatabricksComputeSecrets = new DatabricksComputeSecrets(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeType".equals(fieldName)) { - deserializedDatabricksComputeSecrets.computeType = ComputeType.fromString(reader.getString()); - } else if ("databricksAccessToken".equals(fieldName)) { - deserializedDatabricksComputeSecrets.databricksAccessToken = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDatabricksComputeSecrets; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecretsProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecretsProperties.java deleted file mode 100644 index 39459ed8d282..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecretsProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties of Databricks Compute Secrets. - */ -@Fluent -public class DatabricksComputeSecretsProperties implements JsonSerializable { - /* - * access token for databricks account. - */ - private String databricksAccessToken; - - /** - * Creates an instance of DatabricksComputeSecretsProperties class. - */ - public DatabricksComputeSecretsProperties() { - } - - /** - * Get the databricksAccessToken property: access token for databricks account. - * - * @return the databricksAccessToken value. - */ - public String databricksAccessToken() { - return this.databricksAccessToken; - } - - /** - * Set the databricksAccessToken property: access token for databricks account. - * - * @param databricksAccessToken the databricksAccessToken value to set. - * @return the DatabricksComputeSecretsProperties object itself. - */ - public DatabricksComputeSecretsProperties withDatabricksAccessToken(String databricksAccessToken) { - this.databricksAccessToken = databricksAccessToken; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("databricksAccessToken", this.databricksAccessToken); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatabricksComputeSecretsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabricksComputeSecretsProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DatabricksComputeSecretsProperties. - */ - public static DatabricksComputeSecretsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DatabricksComputeSecretsProperties deserializedDatabricksComputeSecretsProperties - = new DatabricksComputeSecretsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("databricksAccessToken".equals(fieldName)) { - deserializedDatabricksComputeSecretsProperties.databricksAccessToken = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDatabricksComputeSecretsProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.java deleted file mode 100644 index 5f73a76b73c0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties of Databricks. - */ -@Fluent -public final class DatabricksProperties implements JsonSerializable { - /* - * Databricks access token - */ - private String databricksAccessToken; - - /* - * Workspace Url - */ - private String workspaceUrl; - - /** - * Creates an instance of DatabricksProperties class. - */ - public DatabricksProperties() { - } - - /** - * Get the databricksAccessToken property: Databricks access token. - * - * @return the databricksAccessToken value. - */ - public String databricksAccessToken() { - return this.databricksAccessToken; - } - - /** - * Set the databricksAccessToken property: Databricks access token. - * - * @param databricksAccessToken the databricksAccessToken value to set. - * @return the DatabricksProperties object itself. - */ - public DatabricksProperties withDatabricksAccessToken(String databricksAccessToken) { - this.databricksAccessToken = databricksAccessToken; - return this; - } - - /** - * Get the workspaceUrl property: Workspace Url. - * - * @return the workspaceUrl value. - */ - public String workspaceUrl() { - return this.workspaceUrl; - } - - /** - * Set the workspaceUrl property: Workspace Url. - * - * @param workspaceUrl the workspaceUrl value to set. - * @return the DatabricksProperties object itself. - */ - public DatabricksProperties withWorkspaceUrl(String workspaceUrl) { - this.workspaceUrl = workspaceUrl; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("databricksAccessToken", this.databricksAccessToken); - jsonWriter.writeStringField("workspaceUrl", this.workspaceUrl); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatabricksProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabricksProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DatabricksProperties. - */ - public static DatabricksProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DatabricksProperties deserializedDatabricksProperties = new DatabricksProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("databricksAccessToken".equals(fieldName)) { - deserializedDatabricksProperties.databricksAccessToken = reader.getString(); - } else if ("workspaceUrl".equals(fieldName)) { - deserializedDatabricksProperties.workspaceUrl = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDatabricksProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksSchema.java deleted file mode 100644 index 80f84da479f3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksSchema.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The DatabricksSchema model. - */ -@Fluent -public class DatabricksSchema implements JsonSerializable { - /* - * Properties of Databricks - */ - private DatabricksProperties properties; - - /** - * Creates an instance of DatabricksSchema class. - */ - public DatabricksSchema() { - } - - /** - * Get the properties property: Properties of Databricks. - * - * @return the properties value. - */ - public DatabricksProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of Databricks. - * - * @param properties the properties value to set. - * @return the DatabricksSchema object itself. - */ - public DatabricksSchema withProperties(DatabricksProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatabricksSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabricksSchema if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DatabricksSchema. - */ - public static DatabricksSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DatabricksSchema deserializedDatabricksSchema = new DatabricksSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedDatabricksSchema.properties = DatabricksProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDatabricksSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java deleted file mode 100644 index b2134852d145..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.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.machinelearning.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; - -/** - * An immutable client-side representation of Datastore. - */ -public interface Datastore { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - DatastoreProperties 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.machinelearning.fluent.models.DatastoreInner object. - * - * @return the inner object. - */ - DatastoreInner innerModel(); - - /** - * The entirety of the Datastore definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The Datastore definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Datastore definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the Datastore definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the Datastore definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(DatastoreProperties properties); - } - - /** - * The stage of the Datastore 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.WithSkipValidation { - /** - * Executes the create request. - * - * @return the created resource. - */ - Datastore create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Datastore create(Context context); - } - - /** - * The stage of the Datastore definition allowing to specify skipValidation. - */ - interface WithSkipValidation { - /** - * Specifies the skipValidation property: Flag to skip validation.. - * - * @param skipValidation Flag to skip validation. - * @return the next definition stage. - */ - WithCreate withSkipValidation(Boolean skipValidation); - } - } - - /** - * Begins update for the Datastore resource. - * - * @return the stage of resource update. - */ - Datastore.Update update(); - - /** - * The template for Datastore update. - */ - interface Update extends UpdateStages.WithProperties, UpdateStages.WithSkipValidation { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Datastore apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Datastore apply(Context context); - } - - /** - * The Datastore update stages. - */ - interface UpdateStages { - /** - * The stage of the Datastore update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(DatastoreProperties properties); - } - - /** - * The stage of the Datastore update allowing to specify skipValidation. - */ - interface WithSkipValidation { - /** - * Specifies the skipValidation property: Flag to skip validation.. - * - * @param skipValidation Flag to skip validation. - * @return the next definition stage. - */ - Update withSkipValidation(Boolean skipValidation); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Datastore refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Datastore refresh(Context context); - - /** - * Get datastore secrets. - * - * @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 datastore secrets along with {@link Response}. - */ - Response listSecretsWithResponse(Context context); - - /** - * Get datastore secrets. - * - * @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 datastore secrets. - */ - DatastoreSecrets listSecrets(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java deleted file mode 100644 index 8a2822c5920e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base definition for datastore credentials. - */ -@Immutable -public class DatastoreCredentials implements JsonSerializable { - /* - * [Required] Credential type used to authentication with storage. - */ - private CredentialsType credentialsType = CredentialsType.fromString("DatastoreCredentials"); - - /** - * Creates an instance of DatastoreCredentials class. - */ - public DatastoreCredentials() { - } - - /** - * Get the credentialsType property: [Required] Credential type used to authentication with storage. - * - * @return the credentialsType value. - */ - public CredentialsType credentialsType() { - return this.credentialsType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("credentialsType", - this.credentialsType == null ? null : this.credentialsType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatastoreCredentials from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatastoreCredentials if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DatastoreCredentials. - */ - public static DatastoreCredentials fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("credentialsType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AccountKey".equals(discriminatorValue)) { - return AccountKeyDatastoreCredentials.fromJson(readerToUse.reset()); - } else if ("Certificate".equals(discriminatorValue)) { - return CertificateDatastoreCredentials.fromJson(readerToUse.reset()); - } else if ("None".equals(discriminatorValue)) { - return NoneDatastoreCredentials.fromJson(readerToUse.reset()); - } else if ("Sas".equals(discriminatorValue)) { - return SasDatastoreCredentials.fromJson(readerToUse.reset()); - } else if ("ServicePrincipal".equals(discriminatorValue)) { - return ServicePrincipalDatastoreCredentials.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static DatastoreCredentials fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DatastoreCredentials deserializedDatastoreCredentials = new DatastoreCredentials(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("credentialsType".equals(fieldName)) { - deserializedDatastoreCredentials.credentialsType = CredentialsType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDatastoreCredentials; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.java deleted file mode 100644 index 966f35cbc1e9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Base definition for datastore contents configuration. - */ -@Fluent -public class DatastoreProperties extends ResourceBase { - /* - * [Required] Storage type backing the datastore. - */ - private DatastoreType datastoreType = DatastoreType.fromString("DatastoreProperties"); - - /* - * Readonly property to indicate if datastore is the workspace default datastore - */ - private Boolean isDefault; - - /* - * [Required] Account credentials. - */ - private DatastoreCredentials credentials; - - /** - * Creates an instance of DatastoreProperties class. - */ - public DatastoreProperties() { - } - - /** - * Get the datastoreType property: [Required] Storage type backing the datastore. - * - * @return the datastoreType value. - */ - public DatastoreType datastoreType() { - return this.datastoreType; - } - - /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. - * - * @return the isDefault value. - */ - public Boolean isDefault() { - return this.isDefault; - } - - /** - * Set the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. - * - * @param isDefault the isDefault value to set. - * @return the DatastoreProperties object itself. - */ - DatastoreProperties withIsDefault(Boolean isDefault) { - this.isDefault = isDefault; - return this; - } - - /** - * Get the credentials property: [Required] Account credentials. - * - * @return the credentials value. - */ - public DatastoreCredentials credentials() { - return this.credentials; - } - - /** - * Set the credentials property: [Required] Account credentials. - * - * @param credentials the credentials value to set. - * @return the DatastoreProperties object itself. - */ - public DatastoreProperties withCredentials(DatastoreCredentials credentials) { - this.credentials = credentials; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DatastoreProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DatastoreProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DatastoreProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (credentials() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property credentials in model DatastoreProperties")); - } else { - credentials().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DatastoreProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("credentials", this.credentials); - jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatastoreProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatastoreProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DatastoreProperties. - */ - public static DatastoreProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("datastoreType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AzureBlob".equals(discriminatorValue)) { - return AzureBlobDatastore.fromJson(readerToUse.reset()); - } else if ("AzureDataLakeGen1".equals(discriminatorValue)) { - return AzureDataLakeGen1Datastore.fromJson(readerToUse.reset()); - } else if ("AzureDataLakeGen2".equals(discriminatorValue)) { - return AzureDataLakeGen2Datastore.fromJson(readerToUse.reset()); - } else if ("AzureFile".equals(discriminatorValue)) { - return AzureFileDatastore.fromJson(readerToUse.reset()); - } else if ("OneLake".equals(discriminatorValue)) { - return OneLakeDatastore.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static DatastoreProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DatastoreProperties deserializedDatastoreProperties = new DatastoreProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedDatastoreProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDatastoreProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedDatastoreProperties.withProperties(properties); - } else if ("credentials".equals(fieldName)) { - deserializedDatastoreProperties.credentials = DatastoreCredentials.fromJson(reader); - } else if ("datastoreType".equals(fieldName)) { - deserializedDatastoreProperties.datastoreType = DatastoreType.fromString(reader.getString()); - } else if ("isDefault".equals(fieldName)) { - deserializedDatastoreProperties.isDefault = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedDatastoreProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreResourceArmPaginatedResult.java deleted file mode 100644 index aa45491067d0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreResourceArmPaginatedResult.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of Datastore entities. - */ -@Fluent -public final class DatastoreResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type Datastore. - */ - private List value; - - /* - * The link to the next page of Datastore objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of DatastoreResourceArmPaginatedResult class. - */ - public DatastoreResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type Datastore. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type Datastore. - * - * @param value the value value to set. - * @return the DatastoreResourceArmPaginatedResult object itself. - */ - public DatastoreResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of Datastore objects. If null, there are no additional - * pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of Datastore objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the DatastoreResourceArmPaginatedResult object itself. - */ - public DatastoreResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatastoreResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatastoreResourceArmPaginatedResult if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DatastoreResourceArmPaginatedResult. - */ - public static DatastoreResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DatastoreResourceArmPaginatedResult deserializedDatastoreResourceArmPaginatedResult - = new DatastoreResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> DatastoreInner.fromJson(reader1)); - deserializedDatastoreResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDatastoreResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDatastoreResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreSecrets.java deleted file mode 100644 index 9e4949c1c8f6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreSecrets.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; - -/** - * An immutable client-side representation of DatastoreSecrets. - */ -public interface DatastoreSecrets { - /** - * Gets the secretsType property: [Required] Credential type used to authentication with storage. - * - * @return the secretsType value. - */ - SecretsType secretsType(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner object. - * - * @return the inner object. - */ - DatastoreSecretsInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.java deleted file mode 100644 index 1e3c89c1091d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine the datastore contents type. - */ -public final class DatastoreType extends ExpandableStringEnum { - /** - * Static value AzureBlob for DatastoreType. - */ - public static final DatastoreType AZURE_BLOB = fromString("AzureBlob"); - - /** - * Static value AzureDataLakeGen1 for DatastoreType. - */ - public static final DatastoreType AZURE_DATA_LAKE_GEN1 = fromString("AzureDataLakeGen1"); - - /** - * Static value AzureDataLakeGen2 for DatastoreType. - */ - public static final DatastoreType AZURE_DATA_LAKE_GEN2 = fromString("AzureDataLakeGen2"); - - /** - * Static value AzureFile for DatastoreType. - */ - public static final DatastoreType AZURE_FILE = fromString("AzureFile"); - - /** - * Static value OneLake for DatastoreType. - */ - public static final DatastoreType ONE_LAKE = fromString("OneLake"); - - /** - * Creates a new instance of DatastoreType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DatastoreType() { - } - - /** - * Creates or finds a DatastoreType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DatastoreType. - */ - public static DatastoreType fromString(String name) { - return fromString(name, DatastoreType.class); - } - - /** - * Gets known DatastoreType values. - * - * @return known DatastoreType values. - */ - public static Collection values() { - return values(DatastoreType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastores.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastores.java deleted file mode 100644 index eae2adceb76d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastores.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import java.util.List; - -/** - * Resource collection API of Datastores. - */ -public interface Datastores { - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of Datastore entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @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 a paginated list of Datastore entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, - Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, Context context); - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore. - */ - Datastore get(String resourceGroupName, String workspaceName, String name); - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore secrets along with {@link Response}. - */ - Response listSecretsWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @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 datastore secrets. - */ - DatastoreSecrets listSecrets(String resourceGroupName, String workspaceName, String name); - - /** - * Get datastore. - * - * @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 datastore along with {@link Response}. - */ - Datastore getById(String id); - - /** - * Get datastore. - * - * @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 datastore along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete datastore. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete datastore. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Datastore resource. - * - * @param name resource name. - * @return the first stage of the new Datastore definition. - */ - Datastore.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java deleted file mode 100644 index cb04bce37c10..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The DefaultScaleSettings model. - */ -@Immutable -public final class DefaultScaleSettings extends OnlineScaleSettings { - /* - * [Required] Type of deployment scaling algorithm - */ - private ScaleType scaleType = ScaleType.DEFAULT; - - /** - * Creates an instance of DefaultScaleSettings class. - */ - public DefaultScaleSettings() { - } - - /** - * Get the scaleType property: [Required] Type of deployment scaling algorithm. - * - * @return the scaleType value. - */ - @Override - public ScaleType scaleType() { - return this.scaleType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("scaleType", this.scaleType == null ? null : this.scaleType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DefaultScaleSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DefaultScaleSettings if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DefaultScaleSettings. - */ - public static DefaultScaleSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DefaultScaleSettings deserializedDefaultScaleSettings = new DefaultScaleSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scaleType".equals(fieldName)) { - deserializedDefaultScaleSettings.scaleType = ScaleType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDefaultScaleSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogs.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogs.java deleted file mode 100644 index b2144defa3e0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogs.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner; - -/** - * An immutable client-side representation of DeploymentLogs. - */ -public interface DeploymentLogs { - /** - * Gets the content property: The retrieved online deployment logs. - * - * @return the content value. - */ - String content(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner object. - * - * @return the inner object. - */ - DeploymentLogsInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java deleted file mode 100644 index 755e973638f3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The DeploymentLogsRequest model. - */ -@Fluent -public final class DeploymentLogsRequest implements JsonSerializable { - /* - * The type of container to retrieve logs from. - */ - private ContainerType containerType; - - /* - * The maximum number of lines to tail. - */ - private Integer tail; - - /** - * Creates an instance of DeploymentLogsRequest class. - */ - public DeploymentLogsRequest() { - } - - /** - * Get the containerType property: The type of container to retrieve logs from. - * - * @return the containerType value. - */ - public ContainerType containerType() { - return this.containerType; - } - - /** - * Set the containerType property: The type of container to retrieve logs from. - * - * @param containerType the containerType value to set. - * @return the DeploymentLogsRequest object itself. - */ - public DeploymentLogsRequest withContainerType(ContainerType containerType) { - this.containerType = containerType; - return this; - } - - /** - * Get the tail property: The maximum number of lines to tail. - * - * @return the tail value. - */ - public Integer tail() { - return this.tail; - } - - /** - * Set the tail property: The maximum number of lines to tail. - * - * @param tail the tail value to set. - * @return the DeploymentLogsRequest object itself. - */ - public DeploymentLogsRequest withTail(Integer tail) { - this.tail = tail; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("containerType", this.containerType == null ? null : this.containerType.toString()); - jsonWriter.writeNumberField("tail", this.tail); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DeploymentLogsRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DeploymentLogsRequest if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DeploymentLogsRequest. - */ - public static DeploymentLogsRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DeploymentLogsRequest deserializedDeploymentLogsRequest = new DeploymentLogsRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("containerType".equals(fieldName)) { - deserializedDeploymentLogsRequest.containerType = ContainerType.fromString(reader.getString()); - } else if ("tail".equals(fieldName)) { - deserializedDeploymentLogsRequest.tail = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedDeploymentLogsRequest; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.java deleted file mode 100644 index 5f476db23fa0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Possible values for DeploymentProvisioningState. - */ -public final class DeploymentProvisioningState extends ExpandableStringEnum { - /** - * Static value Creating for DeploymentProvisioningState. - */ - public static final DeploymentProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Deleting for DeploymentProvisioningState. - */ - public static final DeploymentProvisioningState DELETING = fromString("Deleting"); - - /** - * Static value Scaling for DeploymentProvisioningState. - */ - public static final DeploymentProvisioningState SCALING = fromString("Scaling"); - - /** - * Static value Updating for DeploymentProvisioningState. - */ - public static final DeploymentProvisioningState UPDATING = fromString("Updating"); - - /** - * Static value Succeeded for DeploymentProvisioningState. - */ - public static final DeploymentProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for DeploymentProvisioningState. - */ - public static final DeploymentProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for DeploymentProvisioningState. - */ - public static final DeploymentProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of DeploymentProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DeploymentProvisioningState() { - } - - /** - * Creates or finds a DeploymentProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeploymentProvisioningState. - */ - public static DeploymentProvisioningState fromString(String name) { - return fromString(name, DeploymentProvisioningState.class); - } - - /** - * Gets known DeploymentProvisioningState values. - * - * @return known DeploymentProvisioningState values. - */ - public static Collection values() { - return values(DeploymentProvisioningState.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java deleted file mode 100644 index 9478808332d5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The DeploymentResourceConfiguration model. - */ -@Fluent -public final class DeploymentResourceConfiguration extends ResourceConfiguration { - /** - * Creates an instance of DeploymentResourceConfiguration class. - */ - public DeploymentResourceConfiguration() { - } - - /** - * {@inheritDoc} - */ - @Override - public DeploymentResourceConfiguration withInstanceCount(Integer instanceCount) { - super.withInstanceCount(instanceCount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DeploymentResourceConfiguration withInstanceType(String instanceType) { - super.withInstanceType(instanceType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DeploymentResourceConfiguration withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("instanceCount", instanceCount()); - jsonWriter.writeStringField("instanceType", instanceType()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeUntyped(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DeploymentResourceConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DeploymentResourceConfiguration if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DeploymentResourceConfiguration. - */ - public static DeploymentResourceConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DeploymentResourceConfiguration deserializedDeploymentResourceConfiguration - = new DeploymentResourceConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceCount".equals(fieldName)) { - deserializedDeploymentResourceConfiguration - .withInstanceCount(reader.getNullable(JsonReader::getInt)); - } else if ("instanceType".equals(fieldName)) { - deserializedDeploymentResourceConfiguration.withInstanceType(reader.getString()); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDeploymentResourceConfiguration.withProperties(properties); - } else { - reader.skipChildren(); - } - } - - return deserializedDeploymentResourceConfiguration; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DestinationAsset.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DestinationAsset.java deleted file mode 100644 index 48aada0f708f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DestinationAsset.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Publishing destination registry asset information. - */ -@Fluent -public final class DestinationAsset implements JsonSerializable { - /* - * Destination registry name - */ - private String registryName; - - /* - * Destination asset name - */ - private String destinationName; - - /* - * Destination asset version - */ - private String destinationVersion; - - /** - * Creates an instance of DestinationAsset class. - */ - public DestinationAsset() { - } - - /** - * Get the registryName property: Destination registry name. - * - * @return the registryName value. - */ - public String registryName() { - return this.registryName; - } - - /** - * Set the registryName property: Destination registry name. - * - * @param registryName the registryName value to set. - * @return the DestinationAsset object itself. - */ - public DestinationAsset withRegistryName(String registryName) { - this.registryName = registryName; - return this; - } - - /** - * Get the destinationName property: Destination asset name. - * - * @return the destinationName value. - */ - public String destinationName() { - return this.destinationName; - } - - /** - * Set the destinationName property: Destination asset name. - * - * @param destinationName the destinationName value to set. - * @return the DestinationAsset object itself. - */ - public DestinationAsset withDestinationName(String destinationName) { - this.destinationName = destinationName; - return this; - } - - /** - * Get the destinationVersion property: Destination asset version. - * - * @return the destinationVersion value. - */ - public String destinationVersion() { - return this.destinationVersion; - } - - /** - * Set the destinationVersion property: Destination asset version. - * - * @param destinationVersion the destinationVersion value to set. - * @return the DestinationAsset object itself. - */ - public DestinationAsset withDestinationVersion(String destinationVersion) { - this.destinationVersion = destinationVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("registryName", this.registryName); - jsonWriter.writeStringField("destinationName", this.destinationName); - jsonWriter.writeStringField("destinationVersion", this.destinationVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DestinationAsset from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DestinationAsset if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DestinationAsset. - */ - public static DestinationAsset fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DestinationAsset deserializedDestinationAsset = new DestinationAsset(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("registryName".equals(fieldName)) { - deserializedDestinationAsset.registryName = reader.getString(); - } else if ("destinationName".equals(fieldName)) { - deserializedDestinationAsset.destinationName = reader.getString(); - } else if ("destinationVersion".equals(fieldName)) { - deserializedDestinationAsset.destinationVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDestinationAsset; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseRequestProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseRequestProperties.java deleted file mode 100644 index d681a1cab2e3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseRequestProperties.java +++ /dev/null @@ -1,331 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The DiagnoseRequestProperties model. - */ -@Fluent -public final class DiagnoseRequestProperties implements JsonSerializable { - /* - * Setting for diagnosing user defined routing - */ - private Map udr; - - /* - * Setting for diagnosing network security group - */ - private Map nsg; - - /* - * Setting for diagnosing resource lock - */ - private Map resourceLock; - - /* - * Setting for diagnosing dns resolution - */ - private Map dnsResolution; - - /* - * Setting for diagnosing dependent storage account - */ - private Map storageAccount; - - /* - * Setting for diagnosing dependent key vault - */ - private Map keyVault; - - /* - * Setting for diagnosing dependent container registry - */ - private Map containerRegistry; - - /* - * Setting for diagnosing dependent application insights - */ - private Map applicationInsights; - - /* - * Setting for diagnosing unclassified category of problems - */ - private Map others; - - /** - * Creates an instance of DiagnoseRequestProperties class. - */ - public DiagnoseRequestProperties() { - } - - /** - * Get the udr property: Setting for diagnosing user defined routing. - * - * @return the udr value. - */ - public Map udr() { - return this.udr; - } - - /** - * Set the udr property: Setting for diagnosing user defined routing. - * - * @param udr the udr value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withUdr(Map udr) { - this.udr = udr; - return this; - } - - /** - * Get the nsg property: Setting for diagnosing network security group. - * - * @return the nsg value. - */ - public Map nsg() { - return this.nsg; - } - - /** - * Set the nsg property: Setting for diagnosing network security group. - * - * @param nsg the nsg value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withNsg(Map nsg) { - this.nsg = nsg; - return this; - } - - /** - * Get the resourceLock property: Setting for diagnosing resource lock. - * - * @return the resourceLock value. - */ - public Map resourceLock() { - return this.resourceLock; - } - - /** - * Set the resourceLock property: Setting for diagnosing resource lock. - * - * @param resourceLock the resourceLock value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withResourceLock(Map resourceLock) { - this.resourceLock = resourceLock; - return this; - } - - /** - * Get the dnsResolution property: Setting for diagnosing dns resolution. - * - * @return the dnsResolution value. - */ - public Map dnsResolution() { - return this.dnsResolution; - } - - /** - * Set the dnsResolution property: Setting for diagnosing dns resolution. - * - * @param dnsResolution the dnsResolution value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withDnsResolution(Map dnsResolution) { - this.dnsResolution = dnsResolution; - return this; - } - - /** - * Get the storageAccount property: Setting for diagnosing dependent storage account. - * - * @return the storageAccount value. - */ - public Map storageAccount() { - return this.storageAccount; - } - - /** - * Set the storageAccount property: Setting for diagnosing dependent storage account. - * - * @param storageAccount the storageAccount value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withStorageAccount(Map storageAccount) { - this.storageAccount = storageAccount; - return this; - } - - /** - * Get the keyVault property: Setting for diagnosing dependent key vault. - * - * @return the keyVault value. - */ - public Map keyVault() { - return this.keyVault; - } - - /** - * Set the keyVault property: Setting for diagnosing dependent key vault. - * - * @param keyVault the keyVault value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withKeyVault(Map keyVault) { - this.keyVault = keyVault; - return this; - } - - /** - * Get the containerRegistry property: Setting for diagnosing dependent container registry. - * - * @return the containerRegistry value. - */ - public Map containerRegistry() { - return this.containerRegistry; - } - - /** - * Set the containerRegistry property: Setting for diagnosing dependent container registry. - * - * @param containerRegistry the containerRegistry value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withContainerRegistry(Map containerRegistry) { - this.containerRegistry = containerRegistry; - return this; - } - - /** - * Get the applicationInsights property: Setting for diagnosing dependent application insights. - * - * @return the applicationInsights value. - */ - public Map applicationInsights() { - return this.applicationInsights; - } - - /** - * Set the applicationInsights property: Setting for diagnosing dependent application insights. - * - * @param applicationInsights the applicationInsights value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withApplicationInsights(Map applicationInsights) { - this.applicationInsights = applicationInsights; - return this; - } - - /** - * Get the others property: Setting for diagnosing unclassified category of problems. - * - * @return the others value. - */ - public Map others() { - return this.others; - } - - /** - * Set the others property: Setting for diagnosing unclassified category of problems. - * - * @param others the others value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withOthers(Map others) { - this.others = others; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("udr", this.udr, (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("nsg", this.nsg, (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("resourceLock", this.resourceLock, (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("dnsResolution", this.dnsResolution, - (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("storageAccount", this.storageAccount, - (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("keyVault", this.keyVault, (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("containerRegistry", this.containerRegistry, - (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("applicationInsights", this.applicationInsights, - (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("others", this.others, (writer, element) -> writer.writeUntyped(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnoseRequestProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnoseRequestProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiagnoseRequestProperties. - */ - public static DiagnoseRequestProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnoseRequestProperties deserializedDiagnoseRequestProperties = new DiagnoseRequestProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("udr".equals(fieldName)) { - Map udr = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.udr = udr; - } else if ("nsg".equals(fieldName)) { - Map nsg = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.nsg = nsg; - } else if ("resourceLock".equals(fieldName)) { - Map resourceLock = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.resourceLock = resourceLock; - } else if ("dnsResolution".equals(fieldName)) { - Map dnsResolution = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.dnsResolution = dnsResolution; - } else if ("storageAccount".equals(fieldName)) { - Map storageAccount = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.storageAccount = storageAccount; - } else if ("keyVault".equals(fieldName)) { - Map keyVault = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.keyVault = keyVault; - } else if ("containerRegistry".equals(fieldName)) { - Map containerRegistry = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.containerRegistry = containerRegistry; - } else if ("applicationInsights".equals(fieldName)) { - Map applicationInsights = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.applicationInsights = applicationInsights; - } else if ("others".equals(fieldName)) { - Map others = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.others = others; - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnoseRequestProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResult.java deleted file mode 100644 index 6dc007e7d30e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResult.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.DiagnoseResponseResultInner; - -/** - * An immutable client-side representation of DiagnoseResponseResult. - */ -public interface DiagnoseResponseResult { - /** - * Gets the value property: The value property. - * - * @return the value value. - */ - DiagnoseResponseResultValue value(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.DiagnoseResponseResultInner object. - * - * @return the inner object. - */ - DiagnoseResponseResultInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java deleted file mode 100644 index 2eb53c188f79..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java +++ /dev/null @@ -1,370 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The DiagnoseResponseResultValue model. - */ -@Fluent -public final class DiagnoseResponseResultValue implements JsonSerializable { - /* - * The userDefinedRouteResults property. - */ - private List userDefinedRouteResults; - - /* - * The networkSecurityRuleResults property. - */ - private List networkSecurityRuleResults; - - /* - * The resourceLockResults property. - */ - private List resourceLockResults; - - /* - * The dnsResolutionResults property. - */ - private List dnsResolutionResults; - - /* - * The storageAccountResults property. - */ - private List storageAccountResults; - - /* - * The keyVaultResults property. - */ - private List keyVaultResults; - - /* - * The containerRegistryResults property. - */ - private List containerRegistryResults; - - /* - * The applicationInsightsResults property. - */ - private List applicationInsightsResults; - - /* - * The otherResults property. - */ - private List otherResults; - - /** - * Creates an instance of DiagnoseResponseResultValue class. - */ - public DiagnoseResponseResultValue() { - } - - /** - * Get the userDefinedRouteResults property: The userDefinedRouteResults property. - * - * @return the userDefinedRouteResults value. - */ - public List userDefinedRouteResults() { - return this.userDefinedRouteResults; - } - - /** - * Set the userDefinedRouteResults property: The userDefinedRouteResults property. - * - * @param userDefinedRouteResults the userDefinedRouteResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withUserDefinedRouteResults(List userDefinedRouteResults) { - this.userDefinedRouteResults = userDefinedRouteResults; - return this; - } - - /** - * Get the networkSecurityRuleResults property: The networkSecurityRuleResults property. - * - * @return the networkSecurityRuleResults value. - */ - public List networkSecurityRuleResults() { - return this.networkSecurityRuleResults; - } - - /** - * Set the networkSecurityRuleResults property: The networkSecurityRuleResults property. - * - * @param networkSecurityRuleResults the networkSecurityRuleResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withNetworkSecurityRuleResults(List networkSecurityRuleResults) { - this.networkSecurityRuleResults = networkSecurityRuleResults; - return this; - } - - /** - * Get the resourceLockResults property: The resourceLockResults property. - * - * @return the resourceLockResults value. - */ - public List resourceLockResults() { - return this.resourceLockResults; - } - - /** - * Set the resourceLockResults property: The resourceLockResults property. - * - * @param resourceLockResults the resourceLockResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withResourceLockResults(List resourceLockResults) { - this.resourceLockResults = resourceLockResults; - return this; - } - - /** - * Get the dnsResolutionResults property: The dnsResolutionResults property. - * - * @return the dnsResolutionResults value. - */ - public List dnsResolutionResults() { - return this.dnsResolutionResults; - } - - /** - * Set the dnsResolutionResults property: The dnsResolutionResults property. - * - * @param dnsResolutionResults the dnsResolutionResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withDnsResolutionResults(List dnsResolutionResults) { - this.dnsResolutionResults = dnsResolutionResults; - return this; - } - - /** - * Get the storageAccountResults property: The storageAccountResults property. - * - * @return the storageAccountResults value. - */ - public List storageAccountResults() { - return this.storageAccountResults; - } - - /** - * Set the storageAccountResults property: The storageAccountResults property. - * - * @param storageAccountResults the storageAccountResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withStorageAccountResults(List storageAccountResults) { - this.storageAccountResults = storageAccountResults; - return this; - } - - /** - * Get the keyVaultResults property: The keyVaultResults property. - * - * @return the keyVaultResults value. - */ - public List keyVaultResults() { - return this.keyVaultResults; - } - - /** - * Set the keyVaultResults property: The keyVaultResults property. - * - * @param keyVaultResults the keyVaultResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withKeyVaultResults(List keyVaultResults) { - this.keyVaultResults = keyVaultResults; - return this; - } - - /** - * Get the containerRegistryResults property: The containerRegistryResults property. - * - * @return the containerRegistryResults value. - */ - public List containerRegistryResults() { - return this.containerRegistryResults; - } - - /** - * Set the containerRegistryResults property: The containerRegistryResults property. - * - * @param containerRegistryResults the containerRegistryResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withContainerRegistryResults(List containerRegistryResults) { - this.containerRegistryResults = containerRegistryResults; - return this; - } - - /** - * Get the applicationInsightsResults property: The applicationInsightsResults property. - * - * @return the applicationInsightsResults value. - */ - public List applicationInsightsResults() { - return this.applicationInsightsResults; - } - - /** - * Set the applicationInsightsResults property: The applicationInsightsResults property. - * - * @param applicationInsightsResults the applicationInsightsResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withApplicationInsightsResults(List applicationInsightsResults) { - this.applicationInsightsResults = applicationInsightsResults; - return this; - } - - /** - * Get the otherResults property: The otherResults property. - * - * @return the otherResults value. - */ - public List otherResults() { - return this.otherResults; - } - - /** - * Set the otherResults property: The otherResults property. - * - * @param otherResults the otherResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withOtherResults(List otherResults) { - this.otherResults = otherResults; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userDefinedRouteResults() != null) { - userDefinedRouteResults().forEach(e -> e.validate()); - } - if (networkSecurityRuleResults() != null) { - networkSecurityRuleResults().forEach(e -> e.validate()); - } - if (resourceLockResults() != null) { - resourceLockResults().forEach(e -> e.validate()); - } - if (dnsResolutionResults() != null) { - dnsResolutionResults().forEach(e -> e.validate()); - } - if (storageAccountResults() != null) { - storageAccountResults().forEach(e -> e.validate()); - } - if (keyVaultResults() != null) { - keyVaultResults().forEach(e -> e.validate()); - } - if (containerRegistryResults() != null) { - containerRegistryResults().forEach(e -> e.validate()); - } - if (applicationInsightsResults() != null) { - applicationInsightsResults().forEach(e -> e.validate()); - } - if (otherResults() != null) { - otherResults().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("userDefinedRouteResults", this.userDefinedRouteResults, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("networkSecurityRuleResults", this.networkSecurityRuleResults, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("resourceLockResults", this.resourceLockResults, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("dnsResolutionResults", this.dnsResolutionResults, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("storageAccountResults", this.storageAccountResults, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("keyVaultResults", this.keyVaultResults, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("containerRegistryResults", this.containerRegistryResults, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("applicationInsightsResults", this.applicationInsightsResults, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("otherResults", this.otherResults, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnoseResponseResultValue from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnoseResponseResultValue if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiagnoseResponseResultValue. - */ - public static DiagnoseResponseResultValue fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnoseResponseResultValue deserializedDiagnoseResponseResultValue = new DiagnoseResponseResultValue(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("userDefinedRouteResults".equals(fieldName)) { - List userDefinedRouteResults - = reader.readArray(reader1 -> DiagnoseResult.fromJson(reader1)); - deserializedDiagnoseResponseResultValue.userDefinedRouteResults = userDefinedRouteResults; - } else if ("networkSecurityRuleResults".equals(fieldName)) { - List networkSecurityRuleResults - = reader.readArray(reader1 -> DiagnoseResult.fromJson(reader1)); - deserializedDiagnoseResponseResultValue.networkSecurityRuleResults = networkSecurityRuleResults; - } else if ("resourceLockResults".equals(fieldName)) { - List resourceLockResults - = reader.readArray(reader1 -> DiagnoseResult.fromJson(reader1)); - deserializedDiagnoseResponseResultValue.resourceLockResults = resourceLockResults; - } else if ("dnsResolutionResults".equals(fieldName)) { - List dnsResolutionResults - = reader.readArray(reader1 -> DiagnoseResult.fromJson(reader1)); - deserializedDiagnoseResponseResultValue.dnsResolutionResults = dnsResolutionResults; - } else if ("storageAccountResults".equals(fieldName)) { - List storageAccountResults - = reader.readArray(reader1 -> DiagnoseResult.fromJson(reader1)); - deserializedDiagnoseResponseResultValue.storageAccountResults = storageAccountResults; - } else if ("keyVaultResults".equals(fieldName)) { - List keyVaultResults - = reader.readArray(reader1 -> DiagnoseResult.fromJson(reader1)); - deserializedDiagnoseResponseResultValue.keyVaultResults = keyVaultResults; - } else if ("containerRegistryResults".equals(fieldName)) { - List containerRegistryResults - = reader.readArray(reader1 -> DiagnoseResult.fromJson(reader1)); - deserializedDiagnoseResponseResultValue.containerRegistryResults = containerRegistryResults; - } else if ("applicationInsightsResults".equals(fieldName)) { - List applicationInsightsResults - = reader.readArray(reader1 -> DiagnoseResult.fromJson(reader1)); - deserializedDiagnoseResponseResultValue.applicationInsightsResults = applicationInsightsResults; - } else if ("otherResults".equals(fieldName)) { - List otherResults = reader.readArray(reader1 -> DiagnoseResult.fromJson(reader1)); - deserializedDiagnoseResponseResultValue.otherResults = otherResults; - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnoseResponseResultValue; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java deleted file mode 100644 index eb24aa66d628..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Result of Diagnose. - */ -@Immutable -public final class DiagnoseResult implements JsonSerializable { - /* - * Code for workspace setup error - */ - private String code; - - /* - * Level of workspace setup error - */ - private DiagnoseResultLevel level; - - /* - * Message of workspace setup error - */ - private String message; - - /** - * Creates an instance of DiagnoseResult class. - */ - public DiagnoseResult() { - } - - /** - * Get the code property: Code for workspace setup error. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Get the level property: Level of workspace setup error. - * - * @return the level value. - */ - public DiagnoseResultLevel level() { - return this.level; - } - - /** - * Get the message property: Message of workspace setup error. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnoseResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnoseResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DiagnoseResult. - */ - public static DiagnoseResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnoseResult deserializedDiagnoseResult = new DiagnoseResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("code".equals(fieldName)) { - deserializedDiagnoseResult.code = reader.getString(); - } else if ("level".equals(fieldName)) { - deserializedDiagnoseResult.level = DiagnoseResultLevel.fromString(reader.getString()); - } else if ("message".equals(fieldName)) { - deserializedDiagnoseResult.message = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnoseResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.java deleted file mode 100644 index 0e892dbb5e7e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Level of workspace setup error. - */ -public final class DiagnoseResultLevel extends ExpandableStringEnum { - /** - * Static value Warning for DiagnoseResultLevel. - */ - public static final DiagnoseResultLevel WARNING = fromString("Warning"); - - /** - * Static value Error for DiagnoseResultLevel. - */ - public static final DiagnoseResultLevel ERROR = fromString("Error"); - - /** - * Static value Information for DiagnoseResultLevel. - */ - public static final DiagnoseResultLevel INFORMATION = fromString("Information"); - - /** - * Creates a new instance of DiagnoseResultLevel value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DiagnoseResultLevel() { - } - - /** - * Creates or finds a DiagnoseResultLevel from its string representation. - * - * @param name a name to look for. - * @return the corresponding DiagnoseResultLevel. - */ - public static DiagnoseResultLevel fromString(String name) { - return fromString(name, DiagnoseResultLevel.class); - } - - /** - * Gets known DiagnoseResultLevel values. - * - * @return known DiagnoseResultLevel values. - */ - public static Collection values() { - return values(DiagnoseResultLevel.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.java deleted file mode 100644 index 338b6300f93d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Parameters to diagnose a workspace. - */ -@Fluent -public final class DiagnoseWorkspaceParameters implements JsonSerializable { - /* - * Value of Parameters - */ - private DiagnoseRequestProperties value; - - /** - * Creates an instance of DiagnoseWorkspaceParameters class. - */ - public DiagnoseWorkspaceParameters() { - } - - /** - * Get the value property: Value of Parameters. - * - * @return the value value. - */ - public DiagnoseRequestProperties value() { - return this.value; - } - - /** - * Set the value property: Value of Parameters. - * - * @param value the value value to set. - * @return the DiagnoseWorkspaceParameters object itself. - */ - public DiagnoseWorkspaceParameters withValue(DiagnoseRequestProperties value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnoseWorkspaceParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnoseWorkspaceParameters if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiagnoseWorkspaceParameters. - */ - public static DiagnoseWorkspaceParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnoseWorkspaceParameters deserializedDiagnoseWorkspaceParameters = new DiagnoseWorkspaceParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - deserializedDiagnoseWorkspaceParameters.value = DiagnoseRequestProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnoseWorkspaceParameters; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.java deleted file mode 100644 index 83d8d323b9a4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base definition for job distribution configuration. - */ -@Immutable -public class DistributionConfiguration implements JsonSerializable { - /* - * [Required] Specifies the type of distribution framework. - */ - private DistributionType distributionType = DistributionType.fromString("DistributionConfiguration"); - - /** - * Creates an instance of DistributionConfiguration class. - */ - public DistributionConfiguration() { - } - - /** - * Get the distributionType property: [Required] Specifies the type of distribution framework. - * - * @return the distributionType value. - */ - public DistributionType distributionType() { - return this.distributionType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("distributionType", - this.distributionType == null ? null : this.distributionType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DistributionConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DistributionConfiguration if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DistributionConfiguration. - */ - public static DistributionConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("distributionType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Mpi".equals(discriminatorValue)) { - return Mpi.fromJson(readerToUse.reset()); - } else if ("PyTorch".equals(discriminatorValue)) { - return PyTorch.fromJson(readerToUse.reset()); - } else if ("TensorFlow".equals(discriminatorValue)) { - return TensorFlow.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static DistributionConfiguration fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DistributionConfiguration deserializedDistributionConfiguration = new DistributionConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("distributionType".equals(fieldName)) { - deserializedDistributionConfiguration.distributionType - = DistributionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDistributionConfiguration; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.java deleted file mode 100644 index 804fcb1fec18..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine the job distribution type. - */ -public final class DistributionType extends ExpandableStringEnum { - /** - * Static value PyTorch for DistributionType. - */ - public static final DistributionType PY_TORCH = fromString("PyTorch"); - - /** - * Static value TensorFlow for DistributionType. - */ - public static final DistributionType TENSOR_FLOW = fromString("TensorFlow"); - - /** - * Static value Mpi for DistributionType. - */ - public static final DistributionType MPI = fromString("Mpi"); - - /** - * Creates a new instance of DistributionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DistributionType() { - } - - /** - * Creates or finds a DistributionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DistributionType. - */ - public static DistributionType fromString(String name) { - return fromString(name, DistributionType.class); - } - - /** - * Gets known DistributionType values. - * - * @return known DistributionType values. - */ - public static Collection values() { - return values(DistributionType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Docker.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Docker.java deleted file mode 100644 index 80e7c8df2bba..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Docker.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * Docker container configuration. - */ -@Fluent -public final class Docker implements JsonSerializable { - /* - * Indicate whether container shall run in privileged or non-privileged mode. - */ - private Boolean privileged; - - /* - * Docker container configuration - */ - private Map additionalProperties; - - /** - * Creates an instance of Docker class. - */ - public Docker() { - } - - /** - * Get the privileged property: Indicate whether container shall run in privileged or non-privileged mode. - * - * @return the privileged value. - */ - public Boolean privileged() { - return this.privileged; - } - - /** - * Set the privileged property: Indicate whether container shall run in privileged or non-privileged mode. - * - * @param privileged the privileged value to set. - * @return the Docker object itself. - */ - public Docker withPrivileged(Boolean privileged) { - this.privileged = privileged; - return this; - } - - /** - * Get the additionalProperties property: Docker container configuration. - * - * @return the additionalProperties value. - */ - public Map additionalProperties() { - return this.additionalProperties; - } - - /** - * Set the additionalProperties property: Docker container configuration. - * - * @param additionalProperties the additionalProperties value to set. - * @return the Docker object itself. - */ - public Docker withAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("privileged", this.privileged); - if (additionalProperties != null) { - for (Map.Entry additionalProperty : additionalProperties.entrySet()) { - jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); - } - } - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Docker from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Docker if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Docker. - */ - public static Docker fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Docker deserializedDocker = new Docker(); - Map additionalProperties = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("privileged".equals(fieldName)) { - deserializedDocker.privileged = reader.getNullable(JsonReader::getBoolean); - } else { - if (additionalProperties == null) { - additionalProperties = new LinkedHashMap<>(); - } - - additionalProperties.put(fieldName, reader.readUntyped()); - } - } - deserializedDocker.additionalProperties = additionalProperties; - - return deserializedDocker; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DockerCredential.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DockerCredential.java deleted file mode 100644 index 6b2c8d670586..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DockerCredential.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Credential for docker with username and password. - */ -@Fluent -public final class DockerCredential extends DataReferenceCredential { - /* - * [Required] Credential type used to authentication with storage. - */ - private DataReferenceCredentialType credentialType = DataReferenceCredentialType.DOCKER_CREDENTIALS; - - /* - * DockerCredential user name - */ - private String username; - - /* - * DockerCredential user password - */ - private String password; - - /** - * Creates an instance of DockerCredential class. - */ - public DockerCredential() { - } - - /** - * Get the credentialType property: [Required] Credential type used to authentication with storage. - * - * @return the credentialType value. - */ - @Override - public DataReferenceCredentialType credentialType() { - return this.credentialType; - } - - /** - * Get the username property: DockerCredential user name. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: DockerCredential user name. - * - * @param username the username value to set. - * @return the DockerCredential object itself. - */ - public DockerCredential withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: DockerCredential user password. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: DockerCredential user password. - * - * @param password the password value to set. - * @return the DockerCredential object itself. - */ - public DockerCredential withPassword(String password) { - this.password = password; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("credentialType", - this.credentialType == null ? null : this.credentialType.toString()); - jsonWriter.writeStringField("userName", this.username); - jsonWriter.writeStringField("password", this.password); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DockerCredential from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DockerCredential if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DockerCredential. - */ - public static DockerCredential fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DockerCredential deserializedDockerCredential = new DockerCredential(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("credentialType".equals(fieldName)) { - deserializedDockerCredential.credentialType - = DataReferenceCredentialType.fromString(reader.getString()); - } else if ("userName".equals(fieldName)) { - deserializedDockerCredential.username = reader.getString(); - } else if ("password".equals(fieldName)) { - deserializedDockerCredential.password = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDockerCredential; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.java deleted file mode 100644 index e42a13919c47..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Early termination policies enable canceling poor-performing runs before they complete. - */ -@Fluent -public class EarlyTerminationPolicy implements JsonSerializable { - /* - * [Required] Name of policy configuration - */ - private EarlyTerminationPolicyType policyType = EarlyTerminationPolicyType.fromString("EarlyTerminationPolicy"); - - /* - * Interval (number of runs) between policy evaluations. - */ - private Integer evaluationInterval; - - /* - * Number of intervals by which to delay the first evaluation. - */ - private Integer delayEvaluation; - - /** - * Creates an instance of EarlyTerminationPolicy class. - */ - public EarlyTerminationPolicy() { - } - - /** - * Get the policyType property: [Required] Name of policy configuration. - * - * @return the policyType value. - */ - public EarlyTerminationPolicyType policyType() { - return this.policyType; - } - - /** - * Get the evaluationInterval property: Interval (number of runs) between policy evaluations. - * - * @return the evaluationInterval value. - */ - public Integer evaluationInterval() { - return this.evaluationInterval; - } - - /** - * Set the evaluationInterval property: Interval (number of runs) between policy evaluations. - * - * @param evaluationInterval the evaluationInterval value to set. - * @return the EarlyTerminationPolicy object itself. - */ - public EarlyTerminationPolicy withEvaluationInterval(Integer evaluationInterval) { - this.evaluationInterval = evaluationInterval; - return this; - } - - /** - * Get the delayEvaluation property: Number of intervals by which to delay the first evaluation. - * - * @return the delayEvaluation value. - */ - public Integer delayEvaluation() { - return this.delayEvaluation; - } - - /** - * Set the delayEvaluation property: Number of intervals by which to delay the first evaluation. - * - * @param delayEvaluation the delayEvaluation value to set. - * @return the EarlyTerminationPolicy object itself. - */ - public EarlyTerminationPolicy withDelayEvaluation(Integer delayEvaluation) { - this.delayEvaluation = delayEvaluation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("policyType", this.policyType == null ? null : this.policyType.toString()); - jsonWriter.writeNumberField("evaluationInterval", this.evaluationInterval); - jsonWriter.writeNumberField("delayEvaluation", this.delayEvaluation); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EarlyTerminationPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EarlyTerminationPolicy if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the EarlyTerminationPolicy. - */ - public static EarlyTerminationPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("policyType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Bandit".equals(discriminatorValue)) { - return BanditPolicy.fromJson(readerToUse.reset()); - } else if ("MedianStopping".equals(discriminatorValue)) { - return MedianStoppingPolicy.fromJson(readerToUse.reset()); - } else if ("TruncationSelection".equals(discriminatorValue)) { - return TruncationSelectionPolicy.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static EarlyTerminationPolicy fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EarlyTerminationPolicy deserializedEarlyTerminationPolicy = new EarlyTerminationPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("policyType".equals(fieldName)) { - deserializedEarlyTerminationPolicy.policyType - = EarlyTerminationPolicyType.fromString(reader.getString()); - } else if ("evaluationInterval".equals(fieldName)) { - deserializedEarlyTerminationPolicy.evaluationInterval = reader.getNullable(JsonReader::getInt); - } else if ("delayEvaluation".equals(fieldName)) { - deserializedEarlyTerminationPolicy.delayEvaluation = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedEarlyTerminationPolicy; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicyType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicyType.java deleted file mode 100644 index d9b5ea3a9e8c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicyType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for EarlyTerminationPolicyType. - */ -public final class EarlyTerminationPolicyType extends ExpandableStringEnum { - /** - * Static value Bandit for EarlyTerminationPolicyType. - */ - public static final EarlyTerminationPolicyType BANDIT = fromString("Bandit"); - - /** - * Static value MedianStopping for EarlyTerminationPolicyType. - */ - public static final EarlyTerminationPolicyType MEDIAN_STOPPING = fromString("MedianStopping"); - - /** - * Static value TruncationSelection for EarlyTerminationPolicyType. - */ - public static final EarlyTerminationPolicyType TRUNCATION_SELECTION = fromString("TruncationSelection"); - - /** - * Creates a new instance of EarlyTerminationPolicyType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EarlyTerminationPolicyType() { - } - - /** - * Creates or finds a EarlyTerminationPolicyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EarlyTerminationPolicyType. - */ - public static EarlyTerminationPolicyType fromString(String name) { - return fromString(name, EarlyTerminationPolicyType.class); - } - - /** - * Gets known EarlyTerminationPolicyType values. - * - * @return known EarlyTerminationPolicyType values. - */ - public static Collection values() { - return values(EarlyTerminationPolicyType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EgressPublicNetworkAccessType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EgressPublicNetworkAccessType.java deleted file mode 100644 index 3080369f65fc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EgressPublicNetworkAccessType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine whether PublicNetworkAccess is Enabled or Disabled for egress of a deployment. - */ -public final class EgressPublicNetworkAccessType extends ExpandableStringEnum { - /** - * Static value Enabled for EgressPublicNetworkAccessType. - */ - public static final EgressPublicNetworkAccessType ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for EgressPublicNetworkAccessType. - */ - public static final EgressPublicNetworkAccessType DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of EgressPublicNetworkAccessType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EgressPublicNetworkAccessType() { - } - - /** - * Creates or finds a EgressPublicNetworkAccessType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EgressPublicNetworkAccessType. - */ - public static EgressPublicNetworkAccessType fromString(String name) { - return fromString(name, EgressPublicNetworkAccessType.class); - } - - /** - * Gets known EgressPublicNetworkAccessType values. - * - * @return known EgressPublicNetworkAccessType values. - */ - public static Collection values() { - return values(EgressPublicNetworkAccessType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EmailNotificationEnableType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EmailNotificationEnableType.java deleted file mode 100644 index df16415a1807..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EmailNotificationEnableType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine the email notification type. - */ -public final class EmailNotificationEnableType extends ExpandableStringEnum { - /** - * Static value JobCompleted for EmailNotificationEnableType. - */ - public static final EmailNotificationEnableType JOB_COMPLETED = fromString("JobCompleted"); - - /** - * Static value JobFailed for EmailNotificationEnableType. - */ - public static final EmailNotificationEnableType JOB_FAILED = fromString("JobFailed"); - - /** - * Static value JobCancelled for EmailNotificationEnableType. - */ - public static final EmailNotificationEnableType JOB_CANCELLED = fromString("JobCancelled"); - - /** - * Creates a new instance of EmailNotificationEnableType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EmailNotificationEnableType() { - } - - /** - * Creates or finds a EmailNotificationEnableType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EmailNotificationEnableType. - */ - public static EmailNotificationEnableType fromString(String name) { - return fromString(name, EmailNotificationEnableType.class); - } - - /** - * Gets known EmailNotificationEnableType values. - * - * @return known EmailNotificationEnableType values. - */ - public static Collection values() { - return values(EmailNotificationEnableType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultProperties.java deleted file mode 100644 index f43541ede567..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultProperties.java +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The EncryptionKeyVaultProperties model. - */ -@Fluent -public final class EncryptionKeyVaultProperties implements JsonSerializable { - /* - * The ArmId of the keyVault where the customer owned encryption key is present. - */ - private String keyVaultArmId; - - /* - * Key vault uri to access the encryption key. - */ - private String keyIdentifier; - - /* - * For future use - The client id of the identity which will be used to access key vault. - */ - private String identityClientId; - - /** - * Creates an instance of EncryptionKeyVaultProperties class. - */ - public EncryptionKeyVaultProperties() { - } - - /** - * Get the keyVaultArmId property: The ArmId of the keyVault where the customer owned encryption key is present. - * - * @return the keyVaultArmId value. - */ - public String keyVaultArmId() { - return this.keyVaultArmId; - } - - /** - * Set the keyVaultArmId property: The ArmId of the keyVault where the customer owned encryption key is present. - * - * @param keyVaultArmId the keyVaultArmId value to set. - * @return the EncryptionKeyVaultProperties object itself. - */ - public EncryptionKeyVaultProperties withKeyVaultArmId(String keyVaultArmId) { - this.keyVaultArmId = keyVaultArmId; - return this; - } - - /** - * Get the keyIdentifier property: Key vault uri to access the encryption key. - * - * @return the keyIdentifier value. - */ - public String keyIdentifier() { - return this.keyIdentifier; - } - - /** - * Set the keyIdentifier property: Key vault uri to access the encryption key. - * - * @param keyIdentifier the keyIdentifier value to set. - * @return the EncryptionKeyVaultProperties object itself. - */ - public EncryptionKeyVaultProperties withKeyIdentifier(String keyIdentifier) { - this.keyIdentifier = keyIdentifier; - return this; - } - - /** - * Get the identityClientId property: For future use - The client id of the identity which will be used to access - * key vault. - * - * @return the identityClientId value. - */ - public String identityClientId() { - return this.identityClientId; - } - - /** - * Set the identityClientId property: For future use - The client id of the identity which will be used to access - * key vault. - * - * @param identityClientId the identityClientId value to set. - * @return the EncryptionKeyVaultProperties object itself. - */ - public EncryptionKeyVaultProperties withIdentityClientId(String identityClientId) { - this.identityClientId = identityClientId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyVaultArmId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyVaultArmId in model EncryptionKeyVaultProperties")); - } - if (keyIdentifier() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyIdentifier in model EncryptionKeyVaultProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EncryptionKeyVaultProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("keyVaultArmId", this.keyVaultArmId); - jsonWriter.writeStringField("keyIdentifier", this.keyIdentifier); - jsonWriter.writeStringField("identityClientId", this.identityClientId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EncryptionKeyVaultProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EncryptionKeyVaultProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EncryptionKeyVaultProperties. - */ - public static EncryptionKeyVaultProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EncryptionKeyVaultProperties deserializedEncryptionKeyVaultProperties = new EncryptionKeyVaultProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("keyVaultArmId".equals(fieldName)) { - deserializedEncryptionKeyVaultProperties.keyVaultArmId = reader.getString(); - } else if ("keyIdentifier".equals(fieldName)) { - deserializedEncryptionKeyVaultProperties.keyIdentifier = reader.getString(); - } else if ("identityClientId".equals(fieldName)) { - deserializedEncryptionKeyVaultProperties.identityClientId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEncryptionKeyVaultProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.java deleted file mode 100644 index 72d9bdc0de9f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The EncryptionKeyVaultUpdateProperties model. - */ -@Fluent -public final class EncryptionKeyVaultUpdateProperties implements JsonSerializable { - /* - * The keyIdentifier property. - */ - private String keyIdentifier; - - /** - * Creates an instance of EncryptionKeyVaultUpdateProperties class. - */ - public EncryptionKeyVaultUpdateProperties() { - } - - /** - * Get the keyIdentifier property: The keyIdentifier property. - * - * @return the keyIdentifier value. - */ - public String keyIdentifier() { - return this.keyIdentifier; - } - - /** - * Set the keyIdentifier property: The keyIdentifier property. - * - * @param keyIdentifier the keyIdentifier value to set. - * @return the EncryptionKeyVaultUpdateProperties object itself. - */ - public EncryptionKeyVaultUpdateProperties withKeyIdentifier(String keyIdentifier) { - this.keyIdentifier = keyIdentifier; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyIdentifier() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyIdentifier in model EncryptionKeyVaultUpdateProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EncryptionKeyVaultUpdateProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("keyIdentifier", this.keyIdentifier); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EncryptionKeyVaultUpdateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EncryptionKeyVaultUpdateProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EncryptionKeyVaultUpdateProperties. - */ - public static EncryptionKeyVaultUpdateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EncryptionKeyVaultUpdateProperties deserializedEncryptionKeyVaultUpdateProperties - = new EncryptionKeyVaultUpdateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("keyIdentifier".equals(fieldName)) { - deserializedEncryptionKeyVaultUpdateProperties.keyIdentifier = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEncryptionKeyVaultUpdateProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionProperty.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionProperty.java deleted file mode 100644 index 4ccbbab3eeb7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionProperty.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The EncryptionProperty model. - */ -@Fluent -public final class EncryptionProperty implements JsonSerializable { - /* - * Indicates whether or not the encryption is enabled for the workspace. - */ - private EncryptionStatus status; - - /* - * The identity that will be used to access the key vault for encryption at rest. - */ - private IdentityForCmk identity; - - /* - * Customer Key vault properties. - */ - private EncryptionKeyVaultProperties keyVaultProperties; - - /** - * Creates an instance of EncryptionProperty class. - */ - public EncryptionProperty() { - } - - /** - * Get the status property: Indicates whether or not the encryption is enabled for the workspace. - * - * @return the status value. - */ - public EncryptionStatus status() { - return this.status; - } - - /** - * Set the status property: Indicates whether or not the encryption is enabled for the workspace. - * - * @param status the status value to set. - * @return the EncryptionProperty object itself. - */ - public EncryptionProperty withStatus(EncryptionStatus status) { - this.status = status; - return this; - } - - /** - * Get the identity property: The identity that will be used to access the key vault for encryption at rest. - * - * @return the identity value. - */ - public IdentityForCmk identity() { - return this.identity; - } - - /** - * Set the identity property: The identity that will be used to access the key vault for encryption at rest. - * - * @param identity the identity value to set. - * @return the EncryptionProperty object itself. - */ - public EncryptionProperty withIdentity(IdentityForCmk identity) { - this.identity = identity; - return this; - } - - /** - * Get the keyVaultProperties property: Customer Key vault properties. - * - * @return the keyVaultProperties value. - */ - public EncryptionKeyVaultProperties keyVaultProperties() { - return this.keyVaultProperties; - } - - /** - * Set the keyVaultProperties property: Customer Key vault properties. - * - * @param keyVaultProperties the keyVaultProperties value to set. - * @return the EncryptionProperty object itself. - */ - public EncryptionProperty withKeyVaultProperties(EncryptionKeyVaultProperties keyVaultProperties) { - this.keyVaultProperties = keyVaultProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (status() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property status in model EncryptionProperty")); - } - if (identity() != null) { - identity().validate(); - } - if (keyVaultProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyVaultProperties in model EncryptionProperty")); - } else { - keyVaultProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EncryptionProperty.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeJsonField("keyVaultProperties", this.keyVaultProperties); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EncryptionProperty from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EncryptionProperty if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EncryptionProperty. - */ - public static EncryptionProperty fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EncryptionProperty deserializedEncryptionProperty = new EncryptionProperty(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedEncryptionProperty.status = EncryptionStatus.fromString(reader.getString()); - } else if ("keyVaultProperties".equals(fieldName)) { - deserializedEncryptionProperty.keyVaultProperties = EncryptionKeyVaultProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedEncryptionProperty.identity = IdentityForCmk.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEncryptionProperty; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.java deleted file mode 100644 index 545f6cafe0e8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Indicates whether or not the encryption is enabled for the workspace. - */ -public final class EncryptionStatus extends ExpandableStringEnum { - /** - * Static value Enabled for EncryptionStatus. - */ - public static final EncryptionStatus ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for EncryptionStatus. - */ - public static final EncryptionStatus DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of EncryptionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EncryptionStatus() { - } - - /** - * Creates or finds a EncryptionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding EncryptionStatus. - */ - public static EncryptionStatus fromString(String name) { - return fromString(name, EncryptionStatus.class); - } - - /** - * Gets known EncryptionStatus values. - * - * @return known EncryptionStatus values. - */ - public static Collection values() { - return values(EncryptionStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.java deleted file mode 100644 index 851cb862af2d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The EncryptionUpdateProperties model. - */ -@Fluent -public final class EncryptionUpdateProperties implements JsonSerializable { - /* - * The keyVaultProperties property. - */ - private EncryptionKeyVaultUpdateProperties keyVaultProperties; - - /** - * Creates an instance of EncryptionUpdateProperties class. - */ - public EncryptionUpdateProperties() { - } - - /** - * Get the keyVaultProperties property: The keyVaultProperties property. - * - * @return the keyVaultProperties value. - */ - public EncryptionKeyVaultUpdateProperties keyVaultProperties() { - return this.keyVaultProperties; - } - - /** - * Set the keyVaultProperties property: The keyVaultProperties property. - * - * @param keyVaultProperties the keyVaultProperties value to set. - * @return the EncryptionUpdateProperties object itself. - */ - public EncryptionUpdateProperties withKeyVaultProperties(EncryptionKeyVaultUpdateProperties keyVaultProperties) { - this.keyVaultProperties = keyVaultProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyVaultProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyVaultProperties in model EncryptionUpdateProperties")); - } else { - keyVaultProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EncryptionUpdateProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("keyVaultProperties", this.keyVaultProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EncryptionUpdateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EncryptionUpdateProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EncryptionUpdateProperties. - */ - public static EncryptionUpdateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EncryptionUpdateProperties deserializedEncryptionUpdateProperties = new EncryptionUpdateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("keyVaultProperties".equals(fieldName)) { - deserializedEncryptionUpdateProperties.keyVaultProperties - = EncryptionKeyVaultUpdateProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEncryptionUpdateProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.java deleted file mode 100644 index 03377af95217..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes the endpoint configuration for the container. - */ -@Fluent -public final class Endpoint implements JsonSerializable { - /* - * Protocol over which communication will happen over this endpoint - */ - private Protocol protocol; - - /* - * Name of the Endpoint - */ - private String name; - - /* - * Application port inside the container. - */ - private Integer target; - - /* - * Port over which the application is exposed from container. - */ - private Integer published; - - /* - * Host IP over which the application is exposed from the container - */ - private String hostIp; - - /** - * Creates an instance of Endpoint class. - */ - public Endpoint() { - } - - /** - * Get the protocol property: Protocol over which communication will happen over this endpoint. - * - * @return the protocol value. - */ - public Protocol protocol() { - return this.protocol; - } - - /** - * Set the protocol property: Protocol over which communication will happen over this endpoint. - * - * @param protocol the protocol value to set. - * @return the Endpoint object itself. - */ - public Endpoint withProtocol(Protocol protocol) { - this.protocol = protocol; - return this; - } - - /** - * Get the name property: Name of the Endpoint. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the Endpoint. - * - * @param name the name value to set. - * @return the Endpoint object itself. - */ - public Endpoint withName(String name) { - this.name = name; - return this; - } - - /** - * Get the target property: Application port inside the container. - * - * @return the target value. - */ - public Integer target() { - return this.target; - } - - /** - * Set the target property: Application port inside the container. - * - * @param target the target value to set. - * @return the Endpoint object itself. - */ - public Endpoint withTarget(Integer target) { - this.target = target; - return this; - } - - /** - * Get the published property: Port over which the application is exposed from container. - * - * @return the published value. - */ - public Integer published() { - return this.published; - } - - /** - * Set the published property: Port over which the application is exposed from container. - * - * @param published the published value to set. - * @return the Endpoint object itself. - */ - public Endpoint withPublished(Integer published) { - this.published = published; - return this; - } - - /** - * Get the hostIp property: Host IP over which the application is exposed from the container. - * - * @return the hostIp value. - */ - public String hostIp() { - return this.hostIp; - } - - /** - * Set the hostIp property: Host IP over which the application is exposed from the container. - * - * @param hostIp the hostIp value to set. - * @return the Endpoint object itself. - */ - public Endpoint withHostIp(String hostIp) { - this.hostIp = hostIp; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("protocol", this.protocol == null ? null : this.protocol.toString()); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeNumberField("target", this.target); - jsonWriter.writeNumberField("published", this.published); - jsonWriter.writeStringField("hostIp", this.hostIp); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Endpoint from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Endpoint if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the Endpoint. - */ - public static Endpoint fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Endpoint deserializedEndpoint = new Endpoint(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("protocol".equals(fieldName)) { - deserializedEndpoint.protocol = Protocol.fromString(reader.getString()); - } else if ("name".equals(fieldName)) { - deserializedEndpoint.name = reader.getString(); - } else if ("target".equals(fieldName)) { - deserializedEndpoint.target = reader.getNullable(JsonReader::getInt); - } else if ("published".equals(fieldName)) { - deserializedEndpoint.published = reader.getNullable(JsonReader::getInt); - } else if ("hostIp".equals(fieldName)) { - deserializedEndpoint.hostIp = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEndpoint; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthKeys.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthKeys.java deleted file mode 100644 index 91480236604d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthKeys.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; - -/** - * An immutable client-side representation of EndpointAuthKeys. - */ -public interface EndpointAuthKeys { - /** - * Gets the primaryKey property: The primary key. - * - * @return the primaryKey value. - */ - String primaryKey(); - - /** - * Gets the secondaryKey property: The secondary key. - * - * @return the secondaryKey value. - */ - String secondaryKey(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner object. - * - * @return the inner object. - */ - EndpointAuthKeysInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.java deleted file mode 100644 index 342a2f2fd94e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine endpoint authentication mode. - */ -public final class EndpointAuthMode extends ExpandableStringEnum { - /** - * Static value AMLToken for EndpointAuthMode. - */ - public static final EndpointAuthMode AMLTOKEN = fromString("AMLToken"); - - /** - * Static value Key for EndpointAuthMode. - */ - public static final EndpointAuthMode KEY = fromString("Key"); - - /** - * Static value AADToken for EndpointAuthMode. - */ - public static final EndpointAuthMode AADTOKEN = fromString("AADToken"); - - /** - * Creates a new instance of EndpointAuthMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EndpointAuthMode() { - } - - /** - * Creates or finds a EndpointAuthMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding EndpointAuthMode. - */ - public static EndpointAuthMode fromString(String name) { - return fromString(name, EndpointAuthMode.class); - } - - /** - * Gets known EndpointAuthMode values. - * - * @return known EndpointAuthMode values. - */ - public static Collection values() { - return values(EndpointAuthMode.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthToken.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthToken.java deleted file mode 100644 index c6d864d48a98..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthToken.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner; - -/** - * An immutable client-side representation of EndpointAuthToken. - */ -public interface EndpointAuthToken { - /** - * Gets the accessToken property: Access token for endpoint authentication. - * - * @return the accessToken value. - */ - String accessToken(); - - /** - * Gets the tokenType property: Access token type. - * - * @return the tokenType value. - */ - String tokenType(); - - /** - * Gets the expiryTimeUtc property: Access token expiry time (UTC). - * - * @return the expiryTimeUtc value. - */ - Long expiryTimeUtc(); - - /** - * Gets the refreshAfterTimeUtc property: Refresh access token after time (UTC). - * - * @return the refreshAfterTimeUtc value. - */ - Long refreshAfterTimeUtc(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner object. - * - * @return the inner object. - */ - EndpointAuthTokenInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.java deleted file mode 100644 index f92159af135e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine endpoint compute type. - */ -public final class EndpointComputeType extends ExpandableStringEnum { - /** - * Static value Managed for EndpointComputeType. - */ - public static final EndpointComputeType MANAGED = fromString("Managed"); - - /** - * Static value Kubernetes for EndpointComputeType. - */ - public static final EndpointComputeType KUBERNETES = fromString("Kubernetes"); - - /** - * Static value AzureMLCompute for EndpointComputeType. - */ - public static final EndpointComputeType AZURE_MLCOMPUTE = fromString("AzureMLCompute"); - - /** - * Creates a new instance of EndpointComputeType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EndpointComputeType() { - } - - /** - * Creates or finds a EndpointComputeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EndpointComputeType. - */ - public static EndpointComputeType fromString(String name) { - return fromString(name, EndpointComputeType.class); - } - - /** - * Gets known EndpointComputeType values. - * - * @return known EndpointComputeType values. - */ - public static Collection values() { - return values(EndpointComputeType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentPropertiesBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentPropertiesBase.java deleted file mode 100644 index 54c74659ee49..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentPropertiesBase.java +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Base definition for endpoint deployment. - */ -@Fluent -public class EndpointDeploymentPropertiesBase implements JsonSerializable { - /* - * Description of the endpoint deployment. - */ - private String description; - - /* - * Property dictionary. Properties can be added, but not removed or altered. - */ - private Map properties; - - /* - * Code configuration for the endpoint deployment. - */ - private CodeConfiguration codeConfiguration; - - /* - * ARM resource ID or AssetId of the environment specification for the endpoint deployment. - */ - private String environmentId; - - /* - * Environment variables configuration for the deployment. - */ - private Map environmentVariables; - - /** - * Creates an instance of EndpointDeploymentPropertiesBase class. - */ - public EndpointDeploymentPropertiesBase() { - } - - /** - * Get the description property: Description of the endpoint deployment. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of the endpoint deployment. - * - * @param description the description value to set. - * @return the EndpointDeploymentPropertiesBase object itself. - */ - public EndpointDeploymentPropertiesBase withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the properties property: Property dictionary. Properties can be added, but not removed or altered. - * - * @return the properties value. - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties property: Property dictionary. Properties can be added, but not removed or altered. - * - * @param properties the properties value to set. - * @return the EndpointDeploymentPropertiesBase object itself. - */ - public EndpointDeploymentPropertiesBase withProperties(Map properties) { - this.properties = properties; - return this; - } - - /** - * Get the codeConfiguration property: Code configuration for the endpoint deployment. - * - * @return the codeConfiguration value. - */ - public CodeConfiguration codeConfiguration() { - return this.codeConfiguration; - } - - /** - * Set the codeConfiguration property: Code configuration for the endpoint deployment. - * - * @param codeConfiguration the codeConfiguration value to set. - * @return the EndpointDeploymentPropertiesBase object itself. - */ - public EndpointDeploymentPropertiesBase withCodeConfiguration(CodeConfiguration codeConfiguration) { - this.codeConfiguration = codeConfiguration; - return this; - } - - /** - * Get the environmentId property: ARM resource ID or AssetId of the environment specification for the endpoint - * deployment. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId property: ARM resource ID or AssetId of the environment specification for the endpoint - * deployment. - * - * @param environmentId the environmentId value to set. - * @return the EndpointDeploymentPropertiesBase object itself. - */ - public EndpointDeploymentPropertiesBase withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Get the environmentVariables property: Environment variables configuration for the deployment. - * - * @return the environmentVariables value. - */ - public Map environmentVariables() { - return this.environmentVariables; - } - - /** - * Set the environmentVariables property: Environment variables configuration for the deployment. - * - * @param environmentVariables the environmentVariables value to set. - * @return the EndpointDeploymentPropertiesBase object itself. - */ - public EndpointDeploymentPropertiesBase withEnvironmentVariables(Map environmentVariables) { - this.environmentVariables = environmentVariables; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (codeConfiguration() != null) { - codeConfiguration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("codeConfiguration", this.codeConfiguration); - jsonWriter.writeStringField("environmentId", this.environmentId); - jsonWriter.writeMapField("environmentVariables", this.environmentVariables, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EndpointDeploymentPropertiesBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EndpointDeploymentPropertiesBase if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EndpointDeploymentPropertiesBase. - */ - public static EndpointDeploymentPropertiesBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EndpointDeploymentPropertiesBase deserializedEndpointDeploymentPropertiesBase - = new EndpointDeploymentPropertiesBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedEndpointDeploymentPropertiesBase.description = reader.getString(); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedEndpointDeploymentPropertiesBase.properties = properties; - } else if ("codeConfiguration".equals(fieldName)) { - deserializedEndpointDeploymentPropertiesBase.codeConfiguration = CodeConfiguration.fromJson(reader); - } else if ("environmentId".equals(fieldName)) { - deserializedEndpointDeploymentPropertiesBase.environmentId = reader.getString(); - } else if ("environmentVariables".equals(fieldName)) { - Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); - deserializedEndpointDeploymentPropertiesBase.environmentVariables = environmentVariables; - } else { - reader.skipChildren(); - } - } - - return deserializedEndpointDeploymentPropertiesBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointPropertiesBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointPropertiesBase.java deleted file mode 100644 index 53b86427fa0a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointPropertiesBase.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointPropertiesBaseInner; -import java.util.Map; - -/** - * An immutable client-side representation of EndpointPropertiesBase. - */ -public interface EndpointPropertiesBase { - /** - * Gets the description property: Description of the inference endpoint. - * - * @return the description value. - */ - String description(); - - /** - * Gets the properties property: Property dictionary. Properties can be added, but not removed or altered. - * - * @return the properties value. - */ - Map properties(); - - /** - * Gets the scoringUri property: Endpoint URI. - * - * @return the scoringUri value. - */ - String scoringUri(); - - /** - * Gets the swaggerUri property: Endpoint Swagger URI. - * - * @return the swaggerUri value. - */ - String swaggerUri(); - - /** - * Gets the authMode property: [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine - * Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. - * - * @return the authMode value. - */ - EndpointAuthMode authMode(); - - /** - * Gets the keys property: EndpointAuthKeys to set initially on an Endpoint. - * This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. - * - * @return the keys value. - */ - EndpointAuthKeys keys(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EndpointPropertiesBaseInner object. - * - * @return the inner object. - */ - EndpointPropertiesBaseInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.java deleted file mode 100644 index e3b206d2cca1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * State of endpoint provisioning. - */ -public final class EndpointProvisioningState extends ExpandableStringEnum { - /** - * Static value Creating for EndpointProvisioningState. - */ - public static final EndpointProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Deleting for EndpointProvisioningState. - */ - public static final EndpointProvisioningState DELETING = fromString("Deleting"); - - /** - * Static value Succeeded for EndpointProvisioningState. - */ - public static final EndpointProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for EndpointProvisioningState. - */ - public static final EndpointProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Updating for EndpointProvisioningState. - */ - public static final EndpointProvisioningState UPDATING = fromString("Updating"); - - /** - * Static value Canceled for EndpointProvisioningState. - */ - public static final EndpointProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of EndpointProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EndpointProvisioningState() { - } - - /** - * Creates or finds a EndpointProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding EndpointProvisioningState. - */ - public static EndpointProvisioningState fromString(String name) { - return fromString(name, EndpointProvisioningState.class); - } - - /** - * Gets known EndpointProvisioningState values. - * - * @return known EndpointProvisioningState values. - */ - public static Collection values() { - return values(EndpointProvisioningState.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointScheduleAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointScheduleAction.java deleted file mode 100644 index 719f8fc0f2e9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointScheduleAction.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The EndpointScheduleAction model. - */ -@Fluent -public final class EndpointScheduleAction extends ScheduleActionBase { - /* - * [Required] Specifies the action type of the schedule - */ - private ScheduleActionType actionType = ScheduleActionType.INVOKE_BATCH_ENDPOINT; - - /* - * [Required] Defines Schedule action definition details. - * - */ - private Object endpointInvocationDefinition; - - /** - * Creates an instance of EndpointScheduleAction class. - */ - public EndpointScheduleAction() { - } - - /** - * Get the actionType property: [Required] Specifies the action type of the schedule. - * - * @return the actionType value. - */ - @Override - public ScheduleActionType actionType() { - return this.actionType; - } - - /** - * Get the endpointInvocationDefinition property: [Required] Defines Schedule action definition details. - * <see href="TBD" />. - * - * @return the endpointInvocationDefinition value. - */ - public Object endpointInvocationDefinition() { - return this.endpointInvocationDefinition; - } - - /** - * Set the endpointInvocationDefinition property: [Required] Defines Schedule action definition details. - * <see href="TBD" />. - * - * @param endpointInvocationDefinition the endpointInvocationDefinition value to set. - * @return the EndpointScheduleAction object itself. - */ - public EndpointScheduleAction withEndpointInvocationDefinition(Object endpointInvocationDefinition) { - this.endpointInvocationDefinition = endpointInvocationDefinition; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (endpointInvocationDefinition() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property endpointInvocationDefinition in model EndpointScheduleAction")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EndpointScheduleAction.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeUntypedField("endpointInvocationDefinition", this.endpointInvocationDefinition); - jsonWriter.writeStringField("actionType", this.actionType == null ? null : this.actionType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EndpointScheduleAction from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EndpointScheduleAction if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EndpointScheduleAction. - */ - public static EndpointScheduleAction fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EndpointScheduleAction deserializedEndpointScheduleAction = new EndpointScheduleAction(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("endpointInvocationDefinition".equals(fieldName)) { - deserializedEndpointScheduleAction.endpointInvocationDefinition = reader.readUntyped(); - } else if ("actionType".equals(fieldName)) { - deserializedEndpointScheduleAction.actionType = ScheduleActionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedEndpointScheduleAction; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointServiceConnectionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointServiceConnectionStatus.java deleted file mode 100644 index fd1926ec9f01..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointServiceConnectionStatus.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Connection status of the service consumer with the service provider. - */ -public final class EndpointServiceConnectionStatus extends ExpandableStringEnum { - /** - * Static value Approved for EndpointServiceConnectionStatus. - */ - public static final EndpointServiceConnectionStatus APPROVED = fromString("Approved"); - - /** - * Static value Pending for EndpointServiceConnectionStatus. - */ - public static final EndpointServiceConnectionStatus PENDING = fromString("Pending"); - - /** - * Static value Rejected for EndpointServiceConnectionStatus. - */ - public static final EndpointServiceConnectionStatus REJECTED = fromString("Rejected"); - - /** - * Static value Disconnected for EndpointServiceConnectionStatus. - */ - public static final EndpointServiceConnectionStatus DISCONNECTED = fromString("Disconnected"); - - /** - * Creates a new instance of EndpointServiceConnectionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EndpointServiceConnectionStatus() { - } - - /** - * Creates or finds a EndpointServiceConnectionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding EndpointServiceConnectionStatus. - */ - public static EndpointServiceConnectionStatus fromString(String name) { - return fromString(name, EndpointServiceConnectionStatus.class); - } - - /** - * Gets known EndpointServiceConnectionStatus values. - * - * @return known EndpointServiceConnectionStatus values. - */ - public static Collection values() { - return values(EndpointServiceConnectionStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java deleted file mode 100644 index d39f9aa8fae8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.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.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; - -/** - * An immutable client-side representation of EnvironmentContainer. - */ -public interface EnvironmentContainer { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - EnvironmentContainerProperties 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.machinelearning.fluent.models.EnvironmentContainerInner object. - * - * @return the inner object. - */ - EnvironmentContainerInner innerModel(); - - /** - * The entirety of the EnvironmentContainer definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The EnvironmentContainer definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the EnvironmentContainer definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the EnvironmentContainer definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the EnvironmentContainer definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(EnvironmentContainerProperties properties); - } - - /** - * The stage of the EnvironmentContainer 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - EnvironmentContainer create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - EnvironmentContainer create(Context context); - } - } - - /** - * Begins update for the EnvironmentContainer resource. - * - * @return the stage of resource update. - */ - EnvironmentContainer.Update update(); - - /** - * The template for EnvironmentContainer update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - EnvironmentContainer apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - EnvironmentContainer apply(Context context); - } - - /** - * The EnvironmentContainer update stages. - */ - interface UpdateStages { - /** - * The stage of the EnvironmentContainer update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(EnvironmentContainerProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - EnvironmentContainer refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - EnvironmentContainer refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java deleted file mode 100644 index 9ad476e4ed18..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Container for environment specification versions. - */ -@Fluent -public final class EnvironmentContainerProperties extends AssetContainer { - /* - * Provisioning state for the environment container. - */ - private AssetProvisioningState provisioningState; - - /* - * The latest version inside this container. - */ - private String latestVersion; - - /* - * The next auto incremental version - */ - private String nextVersion; - - /** - * Creates an instance of EnvironmentContainerProperties class. - */ - public EnvironmentContainerProperties() { - } - - /** - * Get the provisioningState property: Provisioning state for the environment container. - * - * @return the provisioningState value. - */ - public AssetProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the latestVersion property: The latest version inside this container. - * - * @return the latestVersion value. - */ - @Override - public String latestVersion() { - return this.latestVersion; - } - - /** - * Get the nextVersion property: The next auto incremental version. - * - * @return the nextVersion value. - */ - @Override - public String nextVersion() { - return this.nextVersion; - } - - /** - * {@inheritDoc} - */ - @Override - public EnvironmentContainerProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public EnvironmentContainerProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public EnvironmentContainerProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public EnvironmentContainerProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnvironmentContainerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnvironmentContainerProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EnvironmentContainerProperties. - */ - public static EnvironmentContainerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnvironmentContainerProperties deserializedEnvironmentContainerProperties - = new EnvironmentContainerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedEnvironmentContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedEnvironmentContainerProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedEnvironmentContainerProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedEnvironmentContainerProperties - .withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("latestVersion".equals(fieldName)) { - deserializedEnvironmentContainerProperties.latestVersion = reader.getString(); - } else if ("nextVersion".equals(fieldName)) { - deserializedEnvironmentContainerProperties.nextVersion = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedEnvironmentContainerProperties.provisioningState - = AssetProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedEnvironmentContainerProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerResourceArmPaginatedResult.java deleted file mode 100644 index f3edb6b3f7cf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerResourceArmPaginatedResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of EnvironmentContainer entities. - */ -@Fluent -public final class EnvironmentContainerResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type EnvironmentContainer. - */ - private List value; - - /* - * The link to the next page of EnvironmentContainer objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of EnvironmentContainerResourceArmPaginatedResult class. - */ - public EnvironmentContainerResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type EnvironmentContainer. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type EnvironmentContainer. - * - * @param value the value value to set. - * @return the EnvironmentContainerResourceArmPaginatedResult object itself. - */ - public EnvironmentContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of EnvironmentContainer objects. If null, there are no - * additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of EnvironmentContainer objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the EnvironmentContainerResourceArmPaginatedResult object itself. - */ - public EnvironmentContainerResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnvironmentContainerResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnvironmentContainerResourceArmPaginatedResult if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EnvironmentContainerResourceArmPaginatedResult. - */ - public static EnvironmentContainerResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnvironmentContainerResourceArmPaginatedResult deserializedEnvironmentContainerResourceArmPaginatedResult - = new EnvironmentContainerResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> EnvironmentContainerInner.fromJson(reader1)); - deserializedEnvironmentContainerResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedEnvironmentContainerResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEnvironmentContainerResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainers.java deleted file mode 100644 index 029f8f4af446..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainers.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 EnvironmentContainers. - */ -public interface EnvironmentContainers { - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container. - */ - EnvironmentContainer get(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @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 container along with {@link Response}. - */ - EnvironmentContainer getById(String id); - - /** - * Get container. - * - * @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 container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete container. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EnvironmentContainer resource. - * - * @param name resource name. - * @return the first stage of the new EnvironmentContainer definition. - */ - EnvironmentContainer.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.java deleted file mode 100644 index efd0efdcc68e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Environment type is either user created or curated by Azure ML service. - */ -public final class EnvironmentType extends ExpandableStringEnum { - /** - * Static value Curated for EnvironmentType. - */ - public static final EnvironmentType CURATED = fromString("Curated"); - - /** - * Static value UserCreated for EnvironmentType. - */ - public static final EnvironmentType USER_CREATED = fromString("UserCreated"); - - /** - * Creates a new instance of EnvironmentType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EnvironmentType() { - } - - /** - * Creates or finds a EnvironmentType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EnvironmentType. - */ - public static EnvironmentType fromString(String name) { - return fromString(name, EnvironmentType.class); - } - - /** - * Gets known EnvironmentType values. - * - * @return known EnvironmentType values. - */ - public static Collection values() { - return values(EnvironmentType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java deleted file mode 100644 index cae88ac393c3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * Environment Variables for the container. - */ -@Fluent -public final class EnvironmentVariable implements JsonSerializable { - /* - * Type of the Environment Variable. Possible values are: local - For local variable - */ - private EnvironmentVariableType type; - - /* - * Value of the Environment variable - */ - private String value; - - /* - * Environment Variables for the container - */ - private Map additionalProperties; - - /** - * Creates an instance of EnvironmentVariable class. - */ - public EnvironmentVariable() { - } - - /** - * Get the type property: Type of the Environment Variable. Possible values are: local - For local variable. - * - * @return the type value. - */ - public EnvironmentVariableType type() { - return this.type; - } - - /** - * Set the type property: Type of the Environment Variable. Possible values are: local - For local variable. - * - * @param type the type value to set. - * @return the EnvironmentVariable object itself. - */ - public EnvironmentVariable withType(EnvironmentVariableType type) { - this.type = type; - return this; - } - - /** - * Get the value property: Value of the Environment variable. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Value of the Environment variable. - * - * @param value the value value to set. - * @return the EnvironmentVariable object itself. - */ - public EnvironmentVariable withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the additionalProperties property: Environment Variables for the container. - * - * @return the additionalProperties value. - */ - public Map additionalProperties() { - return this.additionalProperties; - } - - /** - * Set the additionalProperties property: Environment Variables for the container. - * - * @param additionalProperties the additionalProperties value to set. - * @return the EnvironmentVariable object itself. - */ - public EnvironmentVariable withAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("value", this.value); - if (additionalProperties != null) { - for (Map.Entry additionalProperty : additionalProperties.entrySet()) { - jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); - } - } - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnvironmentVariable from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnvironmentVariable if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the EnvironmentVariable. - */ - public static EnvironmentVariable fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnvironmentVariable deserializedEnvironmentVariable = new EnvironmentVariable(); - Map additionalProperties = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedEnvironmentVariable.type = EnvironmentVariableType.fromString(reader.getString()); - } else if ("value".equals(fieldName)) { - deserializedEnvironmentVariable.value = reader.getString(); - } else { - if (additionalProperties == null) { - additionalProperties = new LinkedHashMap<>(); - } - - additionalProperties.put(fieldName, reader.readUntyped()); - } - } - deserializedEnvironmentVariable.additionalProperties = additionalProperties; - - return deserializedEnvironmentVariable; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.java deleted file mode 100644 index 011c36d2c2b4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of Environment Variable - * - * Type of the Environment Variable. Possible values are: local - For local variable. - */ -public final class EnvironmentVariableType extends ExpandableStringEnum { - /** - * Static value local for EnvironmentVariableType. - */ - public static final EnvironmentVariableType LOCAL = fromString("local"); - - /** - * Creates a new instance of EnvironmentVariableType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EnvironmentVariableType() { - } - - /** - * Creates or finds a EnvironmentVariableType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EnvironmentVariableType. - */ - public static EnvironmentVariableType fromString(String name) { - return fromString(name, EnvironmentVariableType.class); - } - - /** - * Gets known EnvironmentVariableType values. - * - * @return known EnvironmentVariableType values. - */ - public static Collection values() { - return values(EnvironmentVariableType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java deleted file mode 100644 index 2e53ec8a821f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; - -/** - * An immutable client-side representation of EnvironmentVersion. - */ -public interface EnvironmentVersion { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - EnvironmentVersionProperties 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.machinelearning.fluent.models.EnvironmentVersionInner object. - * - * @return the inner object. - */ - EnvironmentVersionInner innerModel(); - - /** - * The entirety of the EnvironmentVersion definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The EnvironmentVersion definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the EnvironmentVersion definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the EnvironmentVersion definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @return the next definition stage. - */ - WithProperties withExistingEnvironment(String resourceGroupName, String workspaceName, String name); - } - - /** - * The stage of the EnvironmentVersion definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(EnvironmentVersionProperties properties); - } - - /** - * The stage of the EnvironmentVersion 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - EnvironmentVersion create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - EnvironmentVersion create(Context context); - } - } - - /** - * Begins update for the EnvironmentVersion resource. - * - * @return the stage of resource update. - */ - EnvironmentVersion.Update update(); - - /** - * The template for EnvironmentVersion update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - EnvironmentVersion apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - EnvironmentVersion apply(Context context); - } - - /** - * The EnvironmentVersion update stages. - */ - interface UpdateStages { - /** - * The stage of the EnvironmentVersion update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(EnvironmentVersionProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - EnvironmentVersion refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - EnvironmentVersion refresh(Context context); - - /** - * Publish version asset into registry. - * - * @param body Destination registry info. - * @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. - */ - void publish(DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param body Destination registry info. - * @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. - */ - void publish(DestinationAsset body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java deleted file mode 100644 index 7995f620ea76..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Environment version details. - */ -@Fluent -public final class EnvironmentVersionProperties extends AssetBase { - /* - * Environment type is either user managed or curated by the Azure ML service - * - */ - private EnvironmentType environmentType; - - /* - * Name of the image that will be used for the environment. - * - */ - private String image; - - /* - * Standard configuration file used by Conda that lets you install any kind of package, including Python, R, and - * C/C++ packages. - * - */ - private String condaFile; - - /* - * Configuration settings for Docker build context. - */ - private BuildContext build; - - /* - * The OS type of the environment. - */ - private OperatingSystemType osType; - - /* - * Defines configuration specific to inference. - */ - private InferenceContainerProperties inferenceConfig; - - /* - * Defines if image needs to be rebuilt based on base image changes. - */ - private AutoRebuildSetting autoRebuild; - - /* - * Provisioning state for the environment version. - */ - private AssetProvisioningState provisioningState; - - /* - * Stage in the environment lifecycle assigned to this environment - */ - private String stage; - - /** - * Creates an instance of EnvironmentVersionProperties class. - */ - public EnvironmentVersionProperties() { - } - - /** - * Get the environmentType property: Environment type is either user managed or curated by the Azure ML service - * <see href="https://docs.microsoft.com/en-us/azure/machine-learning/resource-curated-environments" />. - * - * @return the environmentType value. - */ - public EnvironmentType environmentType() { - return this.environmentType; - } - - /** - * Get the image property: Name of the image that will be used for the environment. - * <seealso - * href="https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" - * />. - * - * @return the image value. - */ - public String image() { - return this.image; - } - - /** - * Set the image property: Name of the image that will be used for the environment. - * <seealso - * href="https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" - * />. - * - * @param image the image value to set. - * @return the EnvironmentVersionProperties object itself. - */ - public EnvironmentVersionProperties withImage(String image) { - this.image = image; - return this; - } - - /** - * Get the condaFile property: Standard configuration file used by Conda that lets you install any kind of package, - * including Python, R, and C/C++ packages. - * <see - * href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" - * />. - * - * @return the condaFile value. - */ - public String condaFile() { - return this.condaFile; - } - - /** - * Set the condaFile property: Standard configuration file used by Conda that lets you install any kind of package, - * including Python, R, and C/C++ packages. - * <see - * href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" - * />. - * - * @param condaFile the condaFile value to set. - * @return the EnvironmentVersionProperties object itself. - */ - public EnvironmentVersionProperties withCondaFile(String condaFile) { - this.condaFile = condaFile; - return this; - } - - /** - * Get the build property: Configuration settings for Docker build context. - * - * @return the build value. - */ - public BuildContext build() { - return this.build; - } - - /** - * Set the build property: Configuration settings for Docker build context. - * - * @param build the build value to set. - * @return the EnvironmentVersionProperties object itself. - */ - public EnvironmentVersionProperties withBuild(BuildContext build) { - this.build = build; - return this; - } - - /** - * Get the osType property: The OS type of the environment. - * - * @return the osType value. - */ - public OperatingSystemType osType() { - return this.osType; - } - - /** - * Set the osType property: The OS type of the environment. - * - * @param osType the osType value to set. - * @return the EnvironmentVersionProperties object itself. - */ - public EnvironmentVersionProperties withOsType(OperatingSystemType osType) { - this.osType = osType; - return this; - } - - /** - * Get the inferenceConfig property: Defines configuration specific to inference. - * - * @return the inferenceConfig value. - */ - public InferenceContainerProperties inferenceConfig() { - return this.inferenceConfig; - } - - /** - * Set the inferenceConfig property: Defines configuration specific to inference. - * - * @param inferenceConfig the inferenceConfig value to set. - * @return the EnvironmentVersionProperties object itself. - */ - public EnvironmentVersionProperties withInferenceConfig(InferenceContainerProperties inferenceConfig) { - this.inferenceConfig = inferenceConfig; - return this; - } - - /** - * Get the autoRebuild property: Defines if image needs to be rebuilt based on base image changes. - * - * @return the autoRebuild value. - */ - public AutoRebuildSetting autoRebuild() { - return this.autoRebuild; - } - - /** - * Set the autoRebuild property: Defines if image needs to be rebuilt based on base image changes. - * - * @param autoRebuild the autoRebuild value to set. - * @return the EnvironmentVersionProperties object itself. - */ - public EnvironmentVersionProperties withAutoRebuild(AutoRebuildSetting autoRebuild) { - this.autoRebuild = autoRebuild; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the environment version. - * - * @return the provisioningState value. - */ - public AssetProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the stage property: Stage in the environment lifecycle assigned to this environment. - * - * @return the stage value. - */ - public String stage() { - return this.stage; - } - - /** - * Set the stage property: Stage in the environment lifecycle assigned to this environment. - * - * @param stage the stage value to set. - * @return the EnvironmentVersionProperties object itself. - */ - public EnvironmentVersionProperties withStage(String stage) { - this.stage = stage; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public EnvironmentVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public EnvironmentVersionProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public EnvironmentVersionProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public EnvironmentVersionProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public EnvironmentVersionProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (build() != null) { - build().validate(); - } - if (inferenceConfig() != null) { - inferenceConfig().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); - jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); - jsonWriter.writeStringField("image", this.image); - jsonWriter.writeStringField("condaFile", this.condaFile); - jsonWriter.writeJsonField("build", this.build); - jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); - jsonWriter.writeJsonField("inferenceConfig", this.inferenceConfig); - jsonWriter.writeStringField("autoRebuild", this.autoRebuild == null ? null : this.autoRebuild.toString()); - jsonWriter.writeStringField("stage", this.stage); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnvironmentVersionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnvironmentVersionProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EnvironmentVersionProperties. - */ - public static EnvironmentVersionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnvironmentVersionProperties deserializedEnvironmentVersionProperties = new EnvironmentVersionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedEnvironmentVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedEnvironmentVersionProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedEnvironmentVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedEnvironmentVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("isAnonymous".equals(fieldName)) { - deserializedEnvironmentVersionProperties - .withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); - } else if ("environmentType".equals(fieldName)) { - deserializedEnvironmentVersionProperties.environmentType - = EnvironmentType.fromString(reader.getString()); - } else if ("image".equals(fieldName)) { - deserializedEnvironmentVersionProperties.image = reader.getString(); - } else if ("condaFile".equals(fieldName)) { - deserializedEnvironmentVersionProperties.condaFile = reader.getString(); - } else if ("build".equals(fieldName)) { - deserializedEnvironmentVersionProperties.build = BuildContext.fromJson(reader); - } else if ("osType".equals(fieldName)) { - deserializedEnvironmentVersionProperties.osType - = OperatingSystemType.fromString(reader.getString()); - } else if ("inferenceConfig".equals(fieldName)) { - deserializedEnvironmentVersionProperties.inferenceConfig - = InferenceContainerProperties.fromJson(reader); - } else if ("autoRebuild".equals(fieldName)) { - deserializedEnvironmentVersionProperties.autoRebuild - = AutoRebuildSetting.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedEnvironmentVersionProperties.provisioningState - = AssetProvisioningState.fromString(reader.getString()); - } else if ("stage".equals(fieldName)) { - deserializedEnvironmentVersionProperties.stage = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEnvironmentVersionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionResourceArmPaginatedResult.java deleted file mode 100644 index 560a95e0df20..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionResourceArmPaginatedResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of EnvironmentVersion entities. - */ -@Fluent -public final class EnvironmentVersionResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type EnvironmentVersion. - */ - private List value; - - /* - * The link to the next page of EnvironmentVersion objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of EnvironmentVersionResourceArmPaginatedResult class. - */ - public EnvironmentVersionResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type EnvironmentVersion. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type EnvironmentVersion. - * - * @param value the value value to set. - * @return the EnvironmentVersionResourceArmPaginatedResult object itself. - */ - public EnvironmentVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of EnvironmentVersion objects. If null, there are no - * additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of EnvironmentVersion objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the EnvironmentVersionResourceArmPaginatedResult object itself. - */ - public EnvironmentVersionResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnvironmentVersionResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnvironmentVersionResourceArmPaginatedResult if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EnvironmentVersionResourceArmPaginatedResult. - */ - public static EnvironmentVersionResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnvironmentVersionResourceArmPaginatedResult deserializedEnvironmentVersionResourceArmPaginatedResult - = new EnvironmentVersionResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> EnvironmentVersionInner.fromJson(reader1)); - deserializedEnvironmentVersionResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedEnvironmentVersionResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEnvironmentVersionResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersions.java deleted file mode 100644 index 10592fa81226..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersions.java +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 EnvironmentVersions. - */ -public interface EnvironmentVersions { - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, - Integer top, String skip, ListViewType listViewType, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - EnvironmentVersion get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, - Context context); - - /** - * Get version. - * - * @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 version along with {@link Response}. - */ - EnvironmentVersion getById(String id); - - /** - * Get version. - * - * @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 version along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete version. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete version. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EnvironmentVersion resource. - * - * @param name resource name. - * @return the first stage of the new EnvironmentVersion definition. - */ - EnvironmentVersion.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java deleted file mode 100644 index b1ff0fbc101a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The estimated price info for using a VM of a particular OS type, tier, etc. - */ -@Fluent -public final class EstimatedVMPrice implements JsonSerializable { - /* - * The price charged for using the VM. - */ - private double retailPrice; - - /* - * Operating system type used by the VM. - */ - private VMPriceOSType osType; - - /* - * The type of the VM. - */ - private VMTier vmTier; - - /** - * Creates an instance of EstimatedVMPrice class. - */ - public EstimatedVMPrice() { - } - - /** - * Get the retailPrice property: The price charged for using the VM. - * - * @return the retailPrice value. - */ - public double retailPrice() { - return this.retailPrice; - } - - /** - * Set the retailPrice property: The price charged for using the VM. - * - * @param retailPrice the retailPrice value to set. - * @return the EstimatedVMPrice object itself. - */ - public EstimatedVMPrice withRetailPrice(double retailPrice) { - this.retailPrice = retailPrice; - return this; - } - - /** - * Get the osType property: Operating system type used by the VM. - * - * @return the osType value. - */ - public VMPriceOSType osType() { - return this.osType; - } - - /** - * Set the osType property: Operating system type used by the VM. - * - * @param osType the osType value to set. - * @return the EstimatedVMPrice object itself. - */ - public EstimatedVMPrice withOsType(VMPriceOSType osType) { - this.osType = osType; - return this; - } - - /** - * Get the vmTier property: The type of the VM. - * - * @return the vmTier value. - */ - public VMTier vmTier() { - return this.vmTier; - } - - /** - * Set the vmTier property: The type of the VM. - * - * @param vmTier the vmTier value to set. - * @return the EstimatedVMPrice object itself. - */ - public EstimatedVMPrice withVmTier(VMTier vmTier) { - this.vmTier = vmTier; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (osType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property osType in model EstimatedVMPrice")); - } - if (vmTier() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property vmTier in model EstimatedVMPrice")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EstimatedVMPrice.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeDoubleField("retailPrice", this.retailPrice); - jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); - jsonWriter.writeStringField("vmTier", this.vmTier == null ? null : this.vmTier.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EstimatedVMPrice from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EstimatedVMPrice if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EstimatedVMPrice. - */ - public static EstimatedVMPrice fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EstimatedVMPrice deserializedEstimatedVMPrice = new EstimatedVMPrice(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("retailPrice".equals(fieldName)) { - deserializedEstimatedVMPrice.retailPrice = reader.getDouble(); - } else if ("osType".equals(fieldName)) { - deserializedEstimatedVMPrice.osType = VMPriceOSType.fromString(reader.getString()); - } else if ("vmTier".equals(fieldName)) { - deserializedEstimatedVMPrice.vmTier = VMTier.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedEstimatedVMPrice; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrices.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrices.java deleted file mode 100644 index ed40a8ca13c1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrices.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The estimated price info for using a VM. - */ -@Fluent -public final class EstimatedVMPrices implements JsonSerializable { - /* - * Three lettered code specifying the currency of the VM price. Example: USD - */ - private BillingCurrency billingCurrency; - - /* - * The unit of time measurement for the specified VM price. Example: OneHour - */ - private UnitOfMeasure unitOfMeasure; - - /* - * The list of estimated prices for using a VM of a particular OS type, tier, etc. - */ - private List values; - - /** - * Creates an instance of EstimatedVMPrices class. - */ - public EstimatedVMPrices() { - } - - /** - * Get the billingCurrency property: Three lettered code specifying the currency of the VM price. Example: USD. - * - * @return the billingCurrency value. - */ - public BillingCurrency billingCurrency() { - return this.billingCurrency; - } - - /** - * Set the billingCurrency property: Three lettered code specifying the currency of the VM price. Example: USD. - * - * @param billingCurrency the billingCurrency value to set. - * @return the EstimatedVMPrices object itself. - */ - public EstimatedVMPrices withBillingCurrency(BillingCurrency billingCurrency) { - this.billingCurrency = billingCurrency; - return this; - } - - /** - * Get the unitOfMeasure property: The unit of time measurement for the specified VM price. Example: OneHour. - * - * @return the unitOfMeasure value. - */ - public UnitOfMeasure unitOfMeasure() { - return this.unitOfMeasure; - } - - /** - * Set the unitOfMeasure property: The unit of time measurement for the specified VM price. Example: OneHour. - * - * @param unitOfMeasure the unitOfMeasure value to set. - * @return the EstimatedVMPrices object itself. - */ - public EstimatedVMPrices withUnitOfMeasure(UnitOfMeasure unitOfMeasure) { - this.unitOfMeasure = unitOfMeasure; - return this; - } - - /** - * Get the values property: The list of estimated prices for using a VM of a particular OS type, tier, etc. - * - * @return the values value. - */ - public List values() { - return this.values; - } - - /** - * Set the values property: The list of estimated prices for using a VM of a particular OS type, tier, etc. - * - * @param values the values value to set. - * @return the EstimatedVMPrices object itself. - */ - public EstimatedVMPrices withValues(List values) { - this.values = values; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (billingCurrency() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property billingCurrency in model EstimatedVMPrices")); - } - if (unitOfMeasure() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property unitOfMeasure in model EstimatedVMPrices")); - } - if (values() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property values in model EstimatedVMPrices")); - } else { - values().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EstimatedVMPrices.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("billingCurrency", - this.billingCurrency == null ? null : this.billingCurrency.toString()); - jsonWriter.writeStringField("unitOfMeasure", this.unitOfMeasure == null ? null : this.unitOfMeasure.toString()); - jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EstimatedVMPrices from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EstimatedVMPrices if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EstimatedVMPrices. - */ - public static EstimatedVMPrices fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EstimatedVMPrices deserializedEstimatedVMPrices = new EstimatedVMPrices(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("billingCurrency".equals(fieldName)) { - deserializedEstimatedVMPrices.billingCurrency = BillingCurrency.fromString(reader.getString()); - } else if ("unitOfMeasure".equals(fieldName)) { - deserializedEstimatedVMPrices.unitOfMeasure = UnitOfMeasure.fromString(reader.getString()); - } else if ("values".equals(fieldName)) { - List values = reader.readArray(reader1 -> EstimatedVMPrice.fromJson(reader1)); - deserializedEstimatedVMPrices.values = values; - } else { - reader.skipChildren(); - } - } - - return deserializedEstimatedVMPrices; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExternalFqdnResponse.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExternalFqdnResponse.java deleted file mode 100644 index e1b65bc65d34..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExternalFqdnResponse.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner; -import java.util.List; - -/** - * An immutable client-side representation of ExternalFqdnResponse. - */ -public interface ExternalFqdnResponse { - /** - * Gets the value property: The value property. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner object. - * - * @return the inner object. - */ - ExternalFqdnResponseInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Feature.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Feature.java deleted file mode 100644 index 74378e4c955d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Feature.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.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner; - -/** - * An immutable client-side representation of Feature. - */ -public interface Feature { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - FeatureProperties 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.machinelearning.fluent.models.FeatureInner object. - * - * @return the inner object. - */ - FeatureInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionDriftMonitoringSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionDriftMonitoringSignal.java deleted file mode 100644 index 79b881728221..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionDriftMonitoringSignal.java +++ /dev/null @@ -1,302 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * The FeatureAttributionDriftMonitoringSignal model. - */ -@Fluent -public final class FeatureAttributionDriftMonitoringSignal extends MonitoringSignalBase { - /* - * [Required] Specifies the type of signal to monitor. - */ - private MonitoringSignalType signalType = MonitoringSignalType.FEATURE_ATTRIBUTION_DRIFT; - - /* - * [Required] A list of metrics to calculate and their associated thresholds. - */ - private FeatureAttributionMetricThreshold metricThreshold; - - /* - * [Required] The settings for computing feature importance. - */ - private FeatureImportanceSettings featureImportanceSettings; - - /* - * [Required] The data which drift will be calculated for. - */ - private List productionData; - - /* - * [Required] The data to calculate drift against. - */ - private MonitoringInputDataBase referenceData; - - /* - * A dictionary that maps feature names to their respective data types. - */ - private Map featureDataTypeOverride; - - /** - * Creates an instance of FeatureAttributionDriftMonitoringSignal class. - */ - public FeatureAttributionDriftMonitoringSignal() { - } - - /** - * Get the signalType property: [Required] Specifies the type of signal to monitor. - * - * @return the signalType value. - */ - @Override - public MonitoringSignalType signalType() { - return this.signalType; - } - - /** - * Get the metricThreshold property: [Required] A list of metrics to calculate and their associated thresholds. - * - * @return the metricThreshold value. - */ - public FeatureAttributionMetricThreshold metricThreshold() { - return this.metricThreshold; - } - - /** - * Set the metricThreshold property: [Required] A list of metrics to calculate and their associated thresholds. - * - * @param metricThreshold the metricThreshold value to set. - * @return the FeatureAttributionDriftMonitoringSignal object itself. - */ - public FeatureAttributionDriftMonitoringSignal - withMetricThreshold(FeatureAttributionMetricThreshold metricThreshold) { - this.metricThreshold = metricThreshold; - return this; - } - - /** - * Get the featureImportanceSettings property: [Required] The settings for computing feature importance. - * - * @return the featureImportanceSettings value. - */ - public FeatureImportanceSettings featureImportanceSettings() { - return this.featureImportanceSettings; - } - - /** - * Set the featureImportanceSettings property: [Required] The settings for computing feature importance. - * - * @param featureImportanceSettings the featureImportanceSettings value to set. - * @return the FeatureAttributionDriftMonitoringSignal object itself. - */ - public FeatureAttributionDriftMonitoringSignal - withFeatureImportanceSettings(FeatureImportanceSettings featureImportanceSettings) { - this.featureImportanceSettings = featureImportanceSettings; - return this; - } - - /** - * Get the productionData property: [Required] The data which drift will be calculated for. - * - * @return the productionData value. - */ - public List productionData() { - return this.productionData; - } - - /** - * Set the productionData property: [Required] The data which drift will be calculated for. - * - * @param productionData the productionData value to set. - * @return the FeatureAttributionDriftMonitoringSignal object itself. - */ - public FeatureAttributionDriftMonitoringSignal withProductionData(List productionData) { - this.productionData = productionData; - return this; - } - - /** - * Get the referenceData property: [Required] The data to calculate drift against. - * - * @return the referenceData value. - */ - public MonitoringInputDataBase referenceData() { - return this.referenceData; - } - - /** - * Set the referenceData property: [Required] The data to calculate drift against. - * - * @param referenceData the referenceData value to set. - * @return the FeatureAttributionDriftMonitoringSignal object itself. - */ - public FeatureAttributionDriftMonitoringSignal withReferenceData(MonitoringInputDataBase referenceData) { - this.referenceData = referenceData; - return this; - } - - /** - * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. - * - * @return the featureDataTypeOverride value. - */ - public Map featureDataTypeOverride() { - return this.featureDataTypeOverride; - } - - /** - * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. - * - * @param featureDataTypeOverride the featureDataTypeOverride value to set. - * @return the FeatureAttributionDriftMonitoringSignal object itself. - */ - public FeatureAttributionDriftMonitoringSignal - withFeatureDataTypeOverride(Map featureDataTypeOverride) { - this.featureDataTypeOverride = featureDataTypeOverride; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeatureAttributionDriftMonitoringSignal - withNotificationTypes(List notificationTypes) { - super.withNotificationTypes(notificationTypes); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeatureAttributionDriftMonitoringSignal withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (metricThreshold() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metricThreshold in model FeatureAttributionDriftMonitoringSignal")); - } else { - metricThreshold().validate(); - } - if (featureImportanceSettings() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property featureImportanceSettings in model FeatureAttributionDriftMonitoringSignal")); - } else { - featureImportanceSettings().validate(); - } - if (productionData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property productionData in model FeatureAttributionDriftMonitoringSignal")); - } else { - productionData().forEach(e -> e.validate()); - } - if (referenceData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property referenceData in model FeatureAttributionDriftMonitoringSignal")); - } else { - referenceData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FeatureAttributionDriftMonitoringSignal.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("notificationTypes", notificationTypes(), - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("metricThreshold", this.metricThreshold); - jsonWriter.writeJsonField("featureImportanceSettings", this.featureImportanceSettings); - jsonWriter.writeArrayField("productionData", this.productionData, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("referenceData", this.referenceData); - jsonWriter.writeStringField("signalType", this.signalType == null ? null : this.signalType.toString()); - jsonWriter.writeMapField("featureDataTypeOverride", this.featureDataTypeOverride, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeatureAttributionDriftMonitoringSignal from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeatureAttributionDriftMonitoringSignal if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the FeatureAttributionDriftMonitoringSignal. - */ - public static FeatureAttributionDriftMonitoringSignal fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeatureAttributionDriftMonitoringSignal deserializedFeatureAttributionDriftMonitoringSignal - = new FeatureAttributionDriftMonitoringSignal(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("notificationTypes".equals(fieldName)) { - List notificationTypes - = reader.readArray(reader1 -> MonitoringNotificationType.fromString(reader1.getString())); - deserializedFeatureAttributionDriftMonitoringSignal.withNotificationTypes(notificationTypes); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedFeatureAttributionDriftMonitoringSignal.withProperties(properties); - } else if ("metricThreshold".equals(fieldName)) { - deserializedFeatureAttributionDriftMonitoringSignal.metricThreshold - = FeatureAttributionMetricThreshold.fromJson(reader); - } else if ("featureImportanceSettings".equals(fieldName)) { - deserializedFeatureAttributionDriftMonitoringSignal.featureImportanceSettings - = FeatureImportanceSettings.fromJson(reader); - } else if ("productionData".equals(fieldName)) { - List productionData - = reader.readArray(reader1 -> MonitoringInputDataBase.fromJson(reader1)); - deserializedFeatureAttributionDriftMonitoringSignal.productionData = productionData; - } else if ("referenceData".equals(fieldName)) { - deserializedFeatureAttributionDriftMonitoringSignal.referenceData - = MonitoringInputDataBase.fromJson(reader); - } else if ("signalType".equals(fieldName)) { - deserializedFeatureAttributionDriftMonitoringSignal.signalType - = MonitoringSignalType.fromString(reader.getString()); - } else if ("featureDataTypeOverride".equals(fieldName)) { - Map featureDataTypeOverride - = reader.readMap(reader1 -> MonitoringFeatureDataType.fromString(reader1.getString())); - deserializedFeatureAttributionDriftMonitoringSignal.featureDataTypeOverride - = featureDataTypeOverride; - } else { - reader.skipChildren(); - } - } - - return deserializedFeatureAttributionDriftMonitoringSignal; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetric.java deleted file mode 100644 index 9dd83c77e755..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetric.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for FeatureAttributionMetric. - */ -public final class FeatureAttributionMetric extends ExpandableStringEnum { - /** - * Static value NormalizedDiscountedCumulativeGain for FeatureAttributionMetric. - */ - public static final FeatureAttributionMetric NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN - = fromString("NormalizedDiscountedCumulativeGain"); - - /** - * Creates a new instance of FeatureAttributionMetric value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public FeatureAttributionMetric() { - } - - /** - * Creates or finds a FeatureAttributionMetric from its string representation. - * - * @param name a name to look for. - * @return the corresponding FeatureAttributionMetric. - */ - public static FeatureAttributionMetric fromString(String name) { - return fromString(name, FeatureAttributionMetric.class); - } - - /** - * Gets known FeatureAttributionMetric values. - * - * @return known FeatureAttributionMetric values. - */ - public static Collection values() { - return values(FeatureAttributionMetric.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetricThreshold.java deleted file mode 100644 index 8df5864f051d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetricThreshold.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The FeatureAttributionMetricThreshold model. - */ -@Fluent -public final class FeatureAttributionMetricThreshold implements JsonSerializable { - /* - * The threshold value. If null, a default value will be set depending on the selected metric. - */ - private MonitoringThreshold threshold; - - /* - * [Required] The feature attribution metric to calculate. - */ - private FeatureAttributionMetric metric; - - /** - * Creates an instance of FeatureAttributionMetricThreshold class. - */ - public FeatureAttributionMetricThreshold() { - } - - /** - * Get the threshold property: The threshold value. If null, a default value will be set depending on the selected - * metric. - * - * @return the threshold value. - */ - public MonitoringThreshold threshold() { - return this.threshold; - } - - /** - * Set the threshold property: The threshold value. If null, a default value will be set depending on the selected - * metric. - * - * @param threshold the threshold value to set. - * @return the FeatureAttributionMetricThreshold object itself. - */ - public FeatureAttributionMetricThreshold withThreshold(MonitoringThreshold threshold) { - this.threshold = threshold; - return this; - } - - /** - * Get the metric property: [Required] The feature attribution metric to calculate. - * - * @return the metric value. - */ - public FeatureAttributionMetric metric() { - return this.metric; - } - - /** - * Set the metric property: [Required] The feature attribution metric to calculate. - * - * @param metric the metric value to set. - * @return the FeatureAttributionMetricThreshold object itself. - */ - public FeatureAttributionMetricThreshold withMetric(FeatureAttributionMetric metric) { - this.metric = metric; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (threshold() != null) { - threshold().validate(); - } - if (metric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metric in model FeatureAttributionMetricThreshold")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FeatureAttributionMetricThreshold.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("metric", this.metric == null ? null : this.metric.toString()); - jsonWriter.writeJsonField("threshold", this.threshold); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeatureAttributionMetricThreshold from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeatureAttributionMetricThreshold if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the FeatureAttributionMetricThreshold. - */ - public static FeatureAttributionMetricThreshold fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeatureAttributionMetricThreshold deserializedFeatureAttributionMetricThreshold - = new FeatureAttributionMetricThreshold(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("metric".equals(fieldName)) { - deserializedFeatureAttributionMetricThreshold.metric - = FeatureAttributionMetric.fromString(reader.getString()); - } else if ("threshold".equals(fieldName)) { - deserializedFeatureAttributionMetricThreshold.threshold = MonitoringThreshold.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedFeatureAttributionMetricThreshold; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureDataType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureDataType.java deleted file mode 100644 index 4cc26cd06ce4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureDataType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for FeatureDataType. - */ -public final class FeatureDataType extends ExpandableStringEnum { - /** - * Static value String for FeatureDataType. - */ - public static final FeatureDataType STRING = fromString("String"); - - /** - * Static value Integer for FeatureDataType. - */ - public static final FeatureDataType INTEGER = fromString("Integer"); - - /** - * Static value Long for FeatureDataType. - */ - public static final FeatureDataType LONG = fromString("Long"); - - /** - * Static value Float for FeatureDataType. - */ - public static final FeatureDataType FLOAT = fromString("Float"); - - /** - * Static value Double for FeatureDataType. - */ - public static final FeatureDataType DOUBLE = fromString("Double"); - - /** - * Static value Binary for FeatureDataType. - */ - public static final FeatureDataType BINARY = fromString("Binary"); - - /** - * Static value Datetime for FeatureDataType. - */ - public static final FeatureDataType DATETIME = fromString("Datetime"); - - /** - * Static value Boolean for FeatureDataType. - */ - public static final FeatureDataType BOOLEAN = fromString("Boolean"); - - /** - * Creates a new instance of FeatureDataType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public FeatureDataType() { - } - - /** - * Creates or finds a FeatureDataType from its string representation. - * - * @param name a name to look for. - * @return the corresponding FeatureDataType. - */ - public static FeatureDataType fromString(String name) { - return fromString(name, FeatureDataType.class); - } - - /** - * Gets known FeatureDataType values. - * - * @return known FeatureDataType values. - */ - public static Collection values() { - return values(FeatureDataType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceMode.java deleted file mode 100644 index 59bc744d69e8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceMode.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The mode of operation for computing feature importance. - */ -public final class FeatureImportanceMode extends ExpandableStringEnum { - /** - * Static value Disabled for FeatureImportanceMode. - */ - public static final FeatureImportanceMode DISABLED = fromString("Disabled"); - - /** - * Static value Enabled for FeatureImportanceMode. - */ - public static final FeatureImportanceMode ENABLED = fromString("Enabled"); - - /** - * Creates a new instance of FeatureImportanceMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public FeatureImportanceMode() { - } - - /** - * Creates or finds a FeatureImportanceMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding FeatureImportanceMode. - */ - public static FeatureImportanceMode fromString(String name) { - return fromString(name, FeatureImportanceMode.class); - } - - /** - * Gets known FeatureImportanceMode values. - * - * @return known FeatureImportanceMode values. - */ - public static Collection values() { - return values(FeatureImportanceMode.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceSettings.java deleted file mode 100644 index 750f7d629b94..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceSettings.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The FeatureImportanceSettings model. - */ -@Fluent -public final class FeatureImportanceSettings implements JsonSerializable { - /* - * The mode of operation for computing feature importance. - */ - private FeatureImportanceMode mode; - - /* - * The name of the target column within the input data asset. - */ - private String targetColumn; - - /** - * Creates an instance of FeatureImportanceSettings class. - */ - public FeatureImportanceSettings() { - } - - /** - * Get the mode property: The mode of operation for computing feature importance. - * - * @return the mode value. - */ - public FeatureImportanceMode mode() { - return this.mode; - } - - /** - * Set the mode property: The mode of operation for computing feature importance. - * - * @param mode the mode value to set. - * @return the FeatureImportanceSettings object itself. - */ - public FeatureImportanceSettings withMode(FeatureImportanceMode mode) { - this.mode = mode; - return this; - } - - /** - * Get the targetColumn property: The name of the target column within the input data asset. - * - * @return the targetColumn value. - */ - public String targetColumn() { - return this.targetColumn; - } - - /** - * Set the targetColumn property: The name of the target column within the input data asset. - * - * @param targetColumn the targetColumn value to set. - * @return the FeatureImportanceSettings object itself. - */ - public FeatureImportanceSettings withTargetColumn(String targetColumn) { - this.targetColumn = targetColumn; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - jsonWriter.writeStringField("targetColumn", this.targetColumn); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeatureImportanceSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeatureImportanceSettings if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FeatureImportanceSettings. - */ - public static FeatureImportanceSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeatureImportanceSettings deserializedFeatureImportanceSettings = new FeatureImportanceSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedFeatureImportanceSettings.mode = FeatureImportanceMode.fromString(reader.getString()); - } else if ("targetColumn".equals(fieldName)) { - deserializedFeatureImportanceSettings.targetColumn = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFeatureImportanceSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.java deleted file mode 100644 index 34cf1b1ee7bf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Flag for generating lags for the numeric features. - */ -public final class FeatureLags extends ExpandableStringEnum { - /** - * Static value None for FeatureLags. - */ - public static final FeatureLags NONE = fromString("None"); - - /** - * Static value Auto for FeatureLags. - */ - public static final FeatureLags AUTO = fromString("Auto"); - - /** - * Creates a new instance of FeatureLags value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public FeatureLags() { - } - - /** - * Creates or finds a FeatureLags from its string representation. - * - * @param name a name to look for. - * @return the corresponding FeatureLags. - */ - public static FeatureLags fromString(String name) { - return fromString(name, FeatureLags.class); - } - - /** - * Gets known FeatureLags values. - * - * @return known FeatureLags values. - */ - public static Collection values() { - return values(FeatureLags.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureProperties.java deleted file mode 100644 index c89e04c6d4c3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureProperties.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * DTO object representing feature. - */ -@Fluent -public final class FeatureProperties extends ResourceBase { - /* - * Specifies name - */ - private String featureName; - - /* - * Specifies type - */ - private FeatureDataType dataType; - - /** - * Creates an instance of FeatureProperties class. - */ - public FeatureProperties() { - } - - /** - * Get the featureName property: Specifies name. - * - * @return the featureName value. - */ - public String featureName() { - return this.featureName; - } - - /** - * Set the featureName property: Specifies name. - * - * @param featureName the featureName value to set. - * @return the FeatureProperties object itself. - */ - public FeatureProperties withFeatureName(String featureName) { - this.featureName = featureName; - return this; - } - - /** - * Get the dataType property: Specifies type. - * - * @return the dataType value. - */ - public FeatureDataType dataType() { - return this.dataType; - } - - /** - * Set the dataType property: Specifies type. - * - * @param dataType the dataType value to set. - * @return the FeatureProperties object itself. - */ - public FeatureProperties withDataType(FeatureDataType dataType) { - this.dataType = dataType; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeatureProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeatureProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeatureProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("featureName", this.featureName); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeatureProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeatureProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the FeatureProperties. - */ - public static FeatureProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeatureProperties deserializedFeatureProperties = new FeatureProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedFeatureProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeatureProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedFeatureProperties.withProperties(properties); - } else if ("featureName".equals(fieldName)) { - deserializedFeatureProperties.featureName = reader.getString(); - } else if ("dataType".equals(fieldName)) { - deserializedFeatureProperties.dataType = FeatureDataType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedFeatureProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureResourceArmPaginatedResult.java deleted file mode 100644 index bc14838a569b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureResourceArmPaginatedResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of Feature entities. - */ -@Fluent -public final class FeatureResourceArmPaginatedResult implements JsonSerializable { - /* - * An array of objects of type Feature. - */ - private List value; - - /* - * The link to the next page of Feature objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of FeatureResourceArmPaginatedResult class. - */ - public FeatureResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type Feature. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type Feature. - * - * @param value the value value to set. - * @return the FeatureResourceArmPaginatedResult object itself. - */ - public FeatureResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of Feature objects. If null, there are no additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of Feature objects. If null, there are no additional pages. - * - * @param nextLink the nextLink value to set. - * @return the FeatureResourceArmPaginatedResult object itself. - */ - public FeatureResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeatureResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeatureResourceArmPaginatedResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FeatureResourceArmPaginatedResult. - */ - public static FeatureResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeatureResourceArmPaginatedResult deserializedFeatureResourceArmPaginatedResult - = new FeatureResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> FeatureInner.fromJson(reader1)); - deserializedFeatureResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedFeatureResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFeatureResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureStoreSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureStoreSettings.java deleted file mode 100644 index 4b8130103035..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureStoreSettings.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Settings for feature store type workspace. - */ -@Fluent -public final class FeatureStoreSettings implements JsonSerializable { - /* - * Compute runtime config for feature store type workspace. - */ - private ComputeRuntimeDto computeRuntime; - - /* - * The offlineStoreConnectionName property. - */ - private String offlineStoreConnectionName; - - /* - * The onlineStoreConnectionName property. - */ - private String onlineStoreConnectionName; - - /** - * Creates an instance of FeatureStoreSettings class. - */ - public FeatureStoreSettings() { - } - - /** - * Get the computeRuntime property: Compute runtime config for feature store type workspace. - * - * @return the computeRuntime value. - */ - public ComputeRuntimeDto computeRuntime() { - return this.computeRuntime; - } - - /** - * Set the computeRuntime property: Compute runtime config for feature store type workspace. - * - * @param computeRuntime the computeRuntime value to set. - * @return the FeatureStoreSettings object itself. - */ - public FeatureStoreSettings withComputeRuntime(ComputeRuntimeDto computeRuntime) { - this.computeRuntime = computeRuntime; - return this; - } - - /** - * Get the offlineStoreConnectionName property: The offlineStoreConnectionName property. - * - * @return the offlineStoreConnectionName value. - */ - public String offlineStoreConnectionName() { - return this.offlineStoreConnectionName; - } - - /** - * Set the offlineStoreConnectionName property: The offlineStoreConnectionName property. - * - * @param offlineStoreConnectionName the offlineStoreConnectionName value to set. - * @return the FeatureStoreSettings object itself. - */ - public FeatureStoreSettings withOfflineStoreConnectionName(String offlineStoreConnectionName) { - this.offlineStoreConnectionName = offlineStoreConnectionName; - return this; - } - - /** - * Get the onlineStoreConnectionName property: The onlineStoreConnectionName property. - * - * @return the onlineStoreConnectionName value. - */ - public String onlineStoreConnectionName() { - return this.onlineStoreConnectionName; - } - - /** - * Set the onlineStoreConnectionName property: The onlineStoreConnectionName property. - * - * @param onlineStoreConnectionName the onlineStoreConnectionName value to set. - * @return the FeatureStoreSettings object itself. - */ - public FeatureStoreSettings withOnlineStoreConnectionName(String onlineStoreConnectionName) { - this.onlineStoreConnectionName = onlineStoreConnectionName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (computeRuntime() != null) { - computeRuntime().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("computeRuntime", this.computeRuntime); - jsonWriter.writeStringField("offlineStoreConnectionName", this.offlineStoreConnectionName); - jsonWriter.writeStringField("onlineStoreConnectionName", this.onlineStoreConnectionName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeatureStoreSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeatureStoreSettings if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the FeatureStoreSettings. - */ - public static FeatureStoreSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeatureStoreSettings deserializedFeatureStoreSettings = new FeatureStoreSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeRuntime".equals(fieldName)) { - deserializedFeatureStoreSettings.computeRuntime = ComputeRuntimeDto.fromJson(reader); - } else if ("offlineStoreConnectionName".equals(fieldName)) { - deserializedFeatureStoreSettings.offlineStoreConnectionName = reader.getString(); - } else if ("onlineStoreConnectionName".equals(fieldName)) { - deserializedFeatureStoreSettings.onlineStoreConnectionName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFeatureStoreSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureSubset.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureSubset.java deleted file mode 100644 index 4e6c594b8828..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureSubset.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The FeatureSubset model. - */ -@Fluent -public final class FeatureSubset extends MonitoringFeatureFilterBase { - /* - * [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. - */ - private MonitoringFeatureFilterType filterType = MonitoringFeatureFilterType.FEATURE_SUBSET; - - /* - * [Required] The list of features to include. - */ - private List features; - - /** - * Creates an instance of FeatureSubset class. - */ - public FeatureSubset() { - } - - /** - * Get the filterType property: [Required] Specifies the feature filter to leverage when selecting features to - * calculate metrics over. - * - * @return the filterType value. - */ - @Override - public MonitoringFeatureFilterType filterType() { - return this.filterType; - } - - /** - * Get the features property: [Required] The list of features to include. - * - * @return the features value. - */ - public List features() { - return this.features; - } - - /** - * Set the features property: [Required] The list of features to include. - * - * @param features the features value to set. - * @return the FeatureSubset object itself. - */ - public FeatureSubset withFeatures(List features) { - this.features = features; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (features() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property features in model FeatureSubset")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FeatureSubset.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("features", this.features, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("filterType", this.filterType == null ? null : this.filterType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeatureSubset from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeatureSubset if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the FeatureSubset. - */ - public static FeatureSubset fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeatureSubset deserializedFeatureSubset = new FeatureSubset(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("features".equals(fieldName)) { - List features = reader.readArray(reader1 -> reader1.getString()); - deserializedFeatureSubset.features = features; - } else if ("filterType".equals(fieldName)) { - deserializedFeatureSubset.filterType = MonitoringFeatureFilterType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedFeatureSubset; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureWindow.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureWindow.java deleted file mode 100644 index ef1902fa46fa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureWindow.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * Specifies the feature window. - */ -@Fluent -public final class FeatureWindow implements JsonSerializable { - /* - * Specifies the feature window start time - */ - private OffsetDateTime featureWindowStart; - - /* - * Specifies the feature window end time - */ - private OffsetDateTime featureWindowEnd; - - /** - * Creates an instance of FeatureWindow class. - */ - public FeatureWindow() { - } - - /** - * Get the featureWindowStart property: Specifies the feature window start time. - * - * @return the featureWindowStart value. - */ - public OffsetDateTime featureWindowStart() { - return this.featureWindowStart; - } - - /** - * Set the featureWindowStart property: Specifies the feature window start time. - * - * @param featureWindowStart the featureWindowStart value to set. - * @return the FeatureWindow object itself. - */ - public FeatureWindow withFeatureWindowStart(OffsetDateTime featureWindowStart) { - this.featureWindowStart = featureWindowStart; - return this; - } - - /** - * Get the featureWindowEnd property: Specifies the feature window end time. - * - * @return the featureWindowEnd value. - */ - public OffsetDateTime featureWindowEnd() { - return this.featureWindowEnd; - } - - /** - * Set the featureWindowEnd property: Specifies the feature window end time. - * - * @param featureWindowEnd the featureWindowEnd value to set. - * @return the FeatureWindow object itself. - */ - public FeatureWindow withFeatureWindowEnd(OffsetDateTime featureWindowEnd) { - this.featureWindowEnd = featureWindowEnd; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("featureWindowStart", - this.featureWindowStart == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.featureWindowStart)); - jsonWriter.writeStringField("featureWindowEnd", - this.featureWindowEnd == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.featureWindowEnd)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeatureWindow from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeatureWindow if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the FeatureWindow. - */ - public static FeatureWindow fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeatureWindow deserializedFeatureWindow = new FeatureWindow(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("featureWindowStart".equals(fieldName)) { - deserializedFeatureWindow.featureWindowStart = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("featureWindowEnd".equals(fieldName)) { - deserializedFeatureWindow.featureWindowEnd = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedFeatureWindow; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Features.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Features.java deleted file mode 100644 index 1269d823bacf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Features.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.machinelearning.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 Features. - */ -public interface Features { - /** - * List Features. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. - * @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 a paginated list of Feature entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion); - - /** - * List Features. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param featureName feature name. - * @param description Description of the featureset. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize Page size. - * @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 a paginated list of Feature entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String skip, String tags, String featureName, String description, - ListViewType listViewType, Integer pageSize, Context context); - - /** - * Get feature. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. - * @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 feature along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String featureName, Context context); - - /** - * Get feature. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. - * @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 feature. - */ - Feature get(String resourceGroupName, String workspaceName, String featuresetName, String featuresetVersion, - String featureName); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainer.java deleted file mode 100644 index 0ca4d3b601f3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainer.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.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner; - -/** - * An immutable client-side representation of FeaturesetContainer. - */ -public interface FeaturesetContainer { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - FeaturesetContainerProperties 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.machinelearning.fluent.models.FeaturesetContainerInner object. - * - * @return the inner object. - */ - FeaturesetContainerInner innerModel(); - - /** - * The entirety of the FeaturesetContainer definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The FeaturesetContainer definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the FeaturesetContainer definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the FeaturesetContainer definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the FeaturesetContainer definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(FeaturesetContainerProperties properties); - } - - /** - * The stage of the FeaturesetContainer 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - FeaturesetContainer create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - FeaturesetContainer create(Context context); - } - } - - /** - * Begins update for the FeaturesetContainer resource. - * - * @return the stage of resource update. - */ - FeaturesetContainer.Update update(); - - /** - * The template for FeaturesetContainer update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - FeaturesetContainer apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - FeaturesetContainer apply(Context context); - } - - /** - * The FeaturesetContainer update stages. - */ - interface UpdateStages { - /** - * The stage of the FeaturesetContainer update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(FeaturesetContainerProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - FeaturesetContainer refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - FeaturesetContainer refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerProperties.java deleted file mode 100644 index 6ab8fbd3a8b7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * DTO object representing feature set. - */ -@Fluent -public final class FeaturesetContainerProperties extends AssetContainer { - /* - * Provisioning state for the featureset container. - */ - private AssetProvisioningState provisioningState; - - /* - * The latest version inside this container. - */ - private String latestVersion; - - /* - * The next auto incremental version - */ - private String nextVersion; - - /** - * Creates an instance of FeaturesetContainerProperties class. - */ - public FeaturesetContainerProperties() { - } - - /** - * Get the provisioningState property: Provisioning state for the featureset container. - * - * @return the provisioningState value. - */ - public AssetProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the latestVersion property: The latest version inside this container. - * - * @return the latestVersion value. - */ - @Override - public String latestVersion() { - return this.latestVersion; - } - - /** - * Get the nextVersion property: The next auto incremental version. - * - * @return the nextVersion value. - */ - @Override - public String nextVersion() { - return this.nextVersion; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturesetContainerProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturesetContainerProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturesetContainerProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturesetContainerProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeaturesetContainerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeaturesetContainerProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FeaturesetContainerProperties. - */ - public static FeaturesetContainerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeaturesetContainerProperties deserializedFeaturesetContainerProperties - = new FeaturesetContainerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedFeaturesetContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturesetContainerProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturesetContainerProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedFeaturesetContainerProperties - .withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("latestVersion".equals(fieldName)) { - deserializedFeaturesetContainerProperties.latestVersion = reader.getString(); - } else if ("nextVersion".equals(fieldName)) { - deserializedFeaturesetContainerProperties.nextVersion = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedFeaturesetContainerProperties.provisioningState - = AssetProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedFeaturesetContainerProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerResourceArmPaginatedResult.java deleted file mode 100644 index 22d59a12caa1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerResourceArmPaginatedResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of FeaturesetContainer entities. - */ -@Fluent -public final class FeaturesetContainerResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type FeaturesetContainer. - */ - private List value; - - /* - * The link to the next page of FeaturesetContainer objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of FeaturesetContainerResourceArmPaginatedResult class. - */ - public FeaturesetContainerResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type FeaturesetContainer. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type FeaturesetContainer. - * - * @param value the value value to set. - * @return the FeaturesetContainerResourceArmPaginatedResult object itself. - */ - public FeaturesetContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of FeaturesetContainer objects. If null, there are no - * additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of FeaturesetContainer objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the FeaturesetContainerResourceArmPaginatedResult object itself. - */ - public FeaturesetContainerResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeaturesetContainerResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeaturesetContainerResourceArmPaginatedResult if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FeaturesetContainerResourceArmPaginatedResult. - */ - public static FeaturesetContainerResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeaturesetContainerResourceArmPaginatedResult deserializedFeaturesetContainerResourceArmPaginatedResult - = new FeaturesetContainerResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> FeaturesetContainerInner.fromJson(reader1)); - deserializedFeaturesetContainerResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedFeaturesetContainerResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFeaturesetContainerResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainers.java deleted file mode 100644 index 7b22836acf16..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainers.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.machinelearning.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 FeaturesetContainers. - */ -public interface FeaturesetContainers { - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featureset. - * @param description description for the feature set. - * @param createdBy createdBy user name. - * @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 a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, String tags, - ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, - Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - Response getEntityWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container. - */ - FeaturesetContainer getEntity(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @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 container along with {@link Response}. - */ - FeaturesetContainer getEntityById(String id); - - /** - * Get container. - * - * @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 container along with {@link Response}. - */ - Response getEntityByIdWithResponse(String id, Context context); - - /** - * Delete container. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete container. - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new FeaturesetContainer resource. - * - * @param name resource name. - * @return the first stage of the new FeaturesetContainer definition. - */ - FeaturesetContainer.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetSpecification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetSpecification.java deleted file mode 100644 index f4d195f4b2d5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetSpecification.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * DTO object representing specification. - */ -@Fluent -public final class FeaturesetSpecification implements JsonSerializable { - /* - * Specifies the spec path - */ - private String path; - - /** - * Creates an instance of FeaturesetSpecification class. - */ - public FeaturesetSpecification() { - } - - /** - * Get the path property: Specifies the spec path. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: Specifies the spec path. - * - * @param path the path value to set. - * @return the FeaturesetSpecification object itself. - */ - public FeaturesetSpecification withPath(String path) { - this.path = path; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("path", this.path); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeaturesetSpecification from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeaturesetSpecification if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the FeaturesetSpecification. - */ - public static FeaturesetSpecification fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeaturesetSpecification deserializedFeaturesetSpecification = new FeaturesetSpecification(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("path".equals(fieldName)) { - deserializedFeaturesetSpecification.path = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFeaturesetSpecification; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersion.java deleted file mode 100644 index 5ee17b1b2555..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersion.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.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner; - -/** - * An immutable client-side representation of FeaturesetVersion. - */ -public interface FeaturesetVersion { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - FeaturesetVersionProperties 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.machinelearning.fluent.models.FeaturesetVersionInner object. - * - * @return the inner object. - */ - FeaturesetVersionInner innerModel(); - - /** - * The entirety of the FeaturesetVersion definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The FeaturesetVersion definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the FeaturesetVersion definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the FeaturesetVersion definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @return the next definition stage. - */ - WithProperties withExistingFeatureset(String resourceGroupName, String workspaceName, String name); - } - - /** - * The stage of the FeaturesetVersion definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(FeaturesetVersionProperties properties); - } - - /** - * The stage of the FeaturesetVersion 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - FeaturesetVersion create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - FeaturesetVersion create(Context context); - } - } - - /** - * Begins update for the FeaturesetVersion resource. - * - * @return the stage of resource update. - */ - FeaturesetVersion.Update update(); - - /** - * The template for FeaturesetVersion update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - FeaturesetVersion apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - FeaturesetVersion apply(Context context); - } - - /** - * The FeaturesetVersion update stages. - */ - interface UpdateStages { - /** - * The stage of the FeaturesetVersion update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(FeaturesetVersionProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - FeaturesetVersion refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - FeaturesetVersion refresh(Context context); - - /** - * Backfill. - * - * @param body Feature set version backfill request entity. - * @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 response payload for creating a backfill request for a given feature set version. - */ - FeaturesetVersionBackfillResponse backfill(FeaturesetVersionBackfillRequest body); - - /** - * Backfill. - * - * @param body Feature set version backfill request entity. - * @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 response payload for creating a backfill request for a given feature set version. - */ - FeaturesetVersionBackfillResponse backfill(FeaturesetVersionBackfillRequest body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillRequest.java deleted file mode 100644 index f8991e62d788..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillRequest.java +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Request payload for creating a backfill request for a given feature set version. - */ -@Fluent -public final class FeaturesetVersionBackfillRequest implements JsonSerializable { - /* - * Specifies description - */ - private String displayName; - - /* - * Specifies description - */ - private String description; - - /* - * Specifies the backfill feature window to be materialized - */ - private FeatureWindow featureWindow; - - /* - * Specified the data availability status that you want to backfill - */ - private List dataAvailabilityStatus; - - /* - * Specify the jobId to retry the failed materialization - */ - private String jobId; - - /* - * Specifies the tags - */ - private Map tags; - - /* - * Specifies the compute resource settings - */ - private MaterializationComputeResource resource; - - /* - * Specifies the spark compute settings - */ - private Map sparkConfiguration; - - /* - * Specifies the properties - */ - private Map properties; - - /** - * Creates an instance of FeaturesetVersionBackfillRequest class. - */ - public FeaturesetVersionBackfillRequest() { - } - - /** - * Get the displayName property: Specifies description. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Specifies description. - * - * @param displayName the displayName value to set. - * @return the FeaturesetVersionBackfillRequest object itself. - */ - public FeaturesetVersionBackfillRequest withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description property: Specifies description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Specifies description. - * - * @param description the description value to set. - * @return the FeaturesetVersionBackfillRequest object itself. - */ - public FeaturesetVersionBackfillRequest withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the featureWindow property: Specifies the backfill feature window to be materialized. - * - * @return the featureWindow value. - */ - public FeatureWindow featureWindow() { - return this.featureWindow; - } - - /** - * Set the featureWindow property: Specifies the backfill feature window to be materialized. - * - * @param featureWindow the featureWindow value to set. - * @return the FeaturesetVersionBackfillRequest object itself. - */ - public FeaturesetVersionBackfillRequest withFeatureWindow(FeatureWindow featureWindow) { - this.featureWindow = featureWindow; - return this; - } - - /** - * Get the dataAvailabilityStatus property: Specified the data availability status that you want to backfill. - * - * @return the dataAvailabilityStatus value. - */ - public List dataAvailabilityStatus() { - return this.dataAvailabilityStatus; - } - - /** - * Set the dataAvailabilityStatus property: Specified the data availability status that you want to backfill. - * - * @param dataAvailabilityStatus the dataAvailabilityStatus value to set. - * @return the FeaturesetVersionBackfillRequest object itself. - */ - public FeaturesetVersionBackfillRequest - withDataAvailabilityStatus(List dataAvailabilityStatus) { - this.dataAvailabilityStatus = dataAvailabilityStatus; - return this; - } - - /** - * Get the jobId property: Specify the jobId to retry the failed materialization. - * - * @return the jobId value. - */ - public String jobId() { - return this.jobId; - } - - /** - * Set the jobId property: Specify the jobId to retry the failed materialization. - * - * @param jobId the jobId value to set. - * @return the FeaturesetVersionBackfillRequest object itself. - */ - public FeaturesetVersionBackfillRequest withJobId(String jobId) { - this.jobId = jobId; - return this; - } - - /** - * Get the tags property: Specifies the tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Specifies the tags. - * - * @param tags the tags value to set. - * @return the FeaturesetVersionBackfillRequest object itself. - */ - public FeaturesetVersionBackfillRequest withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the resource property: Specifies the compute resource settings. - * - * @return the resource value. - */ - public MaterializationComputeResource resource() { - return this.resource; - } - - /** - * Set the resource property: Specifies the compute resource settings. - * - * @param resource the resource value to set. - * @return the FeaturesetVersionBackfillRequest object itself. - */ - public FeaturesetVersionBackfillRequest withResource(MaterializationComputeResource resource) { - this.resource = resource; - return this; - } - - /** - * Get the sparkConfiguration property: Specifies the spark compute settings. - * - * @return the sparkConfiguration value. - */ - public Map sparkConfiguration() { - return this.sparkConfiguration; - } - - /** - * Set the sparkConfiguration property: Specifies the spark compute settings. - * - * @param sparkConfiguration the sparkConfiguration value to set. - * @return the FeaturesetVersionBackfillRequest object itself. - */ - public FeaturesetVersionBackfillRequest withSparkConfiguration(Map sparkConfiguration) { - this.sparkConfiguration = sparkConfiguration; - return this; - } - - /** - * Get the properties property: Specifies the properties. - * - * @return the properties value. - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties property: Specifies the properties. - * - * @param properties the properties value to set. - * @return the FeaturesetVersionBackfillRequest object itself. - */ - public FeaturesetVersionBackfillRequest withProperties(Map properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (featureWindow() != null) { - featureWindow().validate(); - } - if (resource() != null) { - resource().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("displayName", this.displayName); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeJsonField("featureWindow", this.featureWindow); - jsonWriter.writeArrayField("dataAvailabilityStatus", this.dataAvailabilityStatus, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeStringField("jobId", this.jobId); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("resource", this.resource); - jsonWriter.writeMapField("sparkConfiguration", this.sparkConfiguration, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeaturesetVersionBackfillRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeaturesetVersionBackfillRequest if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FeaturesetVersionBackfillRequest. - */ - public static FeaturesetVersionBackfillRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeaturesetVersionBackfillRequest deserializedFeaturesetVersionBackfillRequest - = new FeaturesetVersionBackfillRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("displayName".equals(fieldName)) { - deserializedFeaturesetVersionBackfillRequest.displayName = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedFeaturesetVersionBackfillRequest.description = reader.getString(); - } else if ("featureWindow".equals(fieldName)) { - deserializedFeaturesetVersionBackfillRequest.featureWindow = FeatureWindow.fromJson(reader); - } else if ("dataAvailabilityStatus".equals(fieldName)) { - List dataAvailabilityStatus - = reader.readArray(reader1 -> DataAvailabilityStatus.fromString(reader1.getString())); - deserializedFeaturesetVersionBackfillRequest.dataAvailabilityStatus = dataAvailabilityStatus; - } else if ("jobId".equals(fieldName)) { - deserializedFeaturesetVersionBackfillRequest.jobId = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturesetVersionBackfillRequest.tags = tags; - } else if ("resource".equals(fieldName)) { - deserializedFeaturesetVersionBackfillRequest.resource - = MaterializationComputeResource.fromJson(reader); - } else if ("sparkConfiguration".equals(fieldName)) { - Map sparkConfiguration = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturesetVersionBackfillRequest.sparkConfiguration = sparkConfiguration; - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturesetVersionBackfillRequest.properties = properties; - } else { - reader.skipChildren(); - } - } - - return deserializedFeaturesetVersionBackfillRequest; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillResponse.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillResponse.java deleted file mode 100644 index 87510c5b9768..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillResponse.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner; -import java.util.List; - -/** - * An immutable client-side representation of FeaturesetVersionBackfillResponse. - */ -public interface FeaturesetVersionBackfillResponse { - /** - * Gets the jobIds property: List of jobs submitted as part of the backfill request. - * - * @return the jobIds value. - */ - List jobIds(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner - * object. - * - * @return the inner object. - */ - FeaturesetVersionBackfillResponseInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionProperties.java deleted file mode 100644 index 9925055344c7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionProperties.java +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * DTO object representing feature set version. - */ -@Fluent -public final class FeaturesetVersionProperties extends AssetBase { - /* - * Specifies the feature spec details - */ - private FeaturesetSpecification specification; - - /* - * Specifies the materialization settings - */ - private MaterializationSettings materializationSettings; - - /* - * Specifies the asset stage - */ - private String stage; - - /* - * Specifies list of entities - */ - private List entities; - - /* - * Provisioning state for the featureset version container. - */ - private AssetProvisioningState provisioningState; - - /** - * Creates an instance of FeaturesetVersionProperties class. - */ - public FeaturesetVersionProperties() { - } - - /** - * Get the specification property: Specifies the feature spec details. - * - * @return the specification value. - */ - public FeaturesetSpecification specification() { - return this.specification; - } - - /** - * Set the specification property: Specifies the feature spec details. - * - * @param specification the specification value to set. - * @return the FeaturesetVersionProperties object itself. - */ - public FeaturesetVersionProperties withSpecification(FeaturesetSpecification specification) { - this.specification = specification; - return this; - } - - /** - * Get the materializationSettings property: Specifies the materialization settings. - * - * @return the materializationSettings value. - */ - public MaterializationSettings materializationSettings() { - return this.materializationSettings; - } - - /** - * Set the materializationSettings property: Specifies the materialization settings. - * - * @param materializationSettings the materializationSettings value to set. - * @return the FeaturesetVersionProperties object itself. - */ - public FeaturesetVersionProperties withMaterializationSettings(MaterializationSettings materializationSettings) { - this.materializationSettings = materializationSettings; - return this; - } - - /** - * Get the stage property: Specifies the asset stage. - * - * @return the stage value. - */ - public String stage() { - return this.stage; - } - - /** - * Set the stage property: Specifies the asset stage. - * - * @param stage the stage value to set. - * @return the FeaturesetVersionProperties object itself. - */ - public FeaturesetVersionProperties withStage(String stage) { - this.stage = stage; - return this; - } - - /** - * Get the entities property: Specifies list of entities. - * - * @return the entities value. - */ - public List entities() { - return this.entities; - } - - /** - * Set the entities property: Specifies list of entities. - * - * @param entities the entities value to set. - * @return the FeaturesetVersionProperties object itself. - */ - public FeaturesetVersionProperties withEntities(List entities) { - this.entities = entities; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the featureset version container. - * - * @return the provisioningState value. - */ - public AssetProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturesetVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturesetVersionProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturesetVersionProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturesetVersionProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturesetVersionProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (specification() != null) { - specification().validate(); - } - if (materializationSettings() != null) { - materializationSettings().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); - jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); - jsonWriter.writeJsonField("specification", this.specification); - jsonWriter.writeJsonField("materializationSettings", this.materializationSettings); - jsonWriter.writeStringField("stage", this.stage); - jsonWriter.writeArrayField("entities", this.entities, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeaturesetVersionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeaturesetVersionProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FeaturesetVersionProperties. - */ - public static FeaturesetVersionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeaturesetVersionProperties deserializedFeaturesetVersionProperties = new FeaturesetVersionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedFeaturesetVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturesetVersionProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturesetVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedFeaturesetVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("isAnonymous".equals(fieldName)) { - deserializedFeaturesetVersionProperties.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); - } else if ("specification".equals(fieldName)) { - deserializedFeaturesetVersionProperties.specification = FeaturesetSpecification.fromJson(reader); - } else if ("materializationSettings".equals(fieldName)) { - deserializedFeaturesetVersionProperties.materializationSettings - = MaterializationSettings.fromJson(reader); - } else if ("stage".equals(fieldName)) { - deserializedFeaturesetVersionProperties.stage = reader.getString(); - } else if ("entities".equals(fieldName)) { - List entities = reader.readArray(reader1 -> reader1.getString()); - deserializedFeaturesetVersionProperties.entities = entities; - } else if ("provisioningState".equals(fieldName)) { - deserializedFeaturesetVersionProperties.provisioningState - = AssetProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedFeaturesetVersionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionResourceArmPaginatedResult.java deleted file mode 100644 index bdbaf9605332..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionResourceArmPaginatedResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of FeaturesetVersion entities. - */ -@Fluent -public final class FeaturesetVersionResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type FeaturesetVersion. - */ - private List value; - - /* - * The link to the next page of FeaturesetVersion objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of FeaturesetVersionResourceArmPaginatedResult class. - */ - public FeaturesetVersionResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type FeaturesetVersion. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type FeaturesetVersion. - * - * @param value the value value to set. - * @return the FeaturesetVersionResourceArmPaginatedResult object itself. - */ - public FeaturesetVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of FeaturesetVersion objects. If null, there are no - * additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of FeaturesetVersion objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the FeaturesetVersionResourceArmPaginatedResult object itself. - */ - public FeaturesetVersionResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeaturesetVersionResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeaturesetVersionResourceArmPaginatedResult if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FeaturesetVersionResourceArmPaginatedResult. - */ - public static FeaturesetVersionResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeaturesetVersionResourceArmPaginatedResult deserializedFeaturesetVersionResourceArmPaginatedResult - = new FeaturesetVersionResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> FeaturesetVersionInner.fromJson(reader1)); - deserializedFeaturesetVersionResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedFeaturesetVersionResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFeaturesetVersionResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersions.java deleted file mode 100644 index 6cd4b95f7a0c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersions.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.machinelearning.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 FeaturesetVersions. - */ -public interface FeaturesetVersions { - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @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 a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featureset version. - * @param version featureset version. - * @param description description for the feature set version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @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 a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, - String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - FeaturesetVersion get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Backfill. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Feature set version backfill request entity. - * @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 response payload for creating a backfill request for a given feature set version. - */ - FeaturesetVersionBackfillResponse backfill(String resourceGroupName, String workspaceName, String name, - String version, FeaturesetVersionBackfillRequest body); - - /** - * Backfill. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Feature set version backfill request entity. - * @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 response payload for creating a backfill request for a given feature set version. - */ - FeaturesetVersionBackfillResponse backfill(String resourceGroupName, String workspaceName, String name, - String version, FeaturesetVersionBackfillRequest body, Context context); - - /** - * Get version. - * - * @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 version along with {@link Response}. - */ - FeaturesetVersion getById(String id); - - /** - * Get version. - * - * @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 version along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete version. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete version. - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new FeaturesetVersion resource. - * - * @param name resource name. - * @return the first stage of the new FeaturesetVersion definition. - */ - FeaturesetVersion.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainer.java deleted file mode 100644 index 4dfbe2c9ee57..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainer.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.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner; - -/** - * An immutable client-side representation of FeaturestoreEntityContainer. - */ -public interface FeaturestoreEntityContainer { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - FeaturestoreEntityContainerProperties 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.machinelearning.fluent.models.FeaturestoreEntityContainerInner object. - * - * @return the inner object. - */ - FeaturestoreEntityContainerInner innerModel(); - - /** - * The entirety of the FeaturestoreEntityContainer definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The FeaturestoreEntityContainer definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the FeaturestoreEntityContainer definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the FeaturestoreEntityContainer definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the FeaturestoreEntityContainer definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(FeaturestoreEntityContainerProperties properties); - } - - /** - * The stage of the FeaturestoreEntityContainer 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - FeaturestoreEntityContainer create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - FeaturestoreEntityContainer create(Context context); - } - } - - /** - * Begins update for the FeaturestoreEntityContainer resource. - * - * @return the stage of resource update. - */ - FeaturestoreEntityContainer.Update update(); - - /** - * The template for FeaturestoreEntityContainer update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - FeaturestoreEntityContainer apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - FeaturestoreEntityContainer apply(Context context); - } - - /** - * The FeaturestoreEntityContainer update stages. - */ - interface UpdateStages { - /** - * The stage of the FeaturestoreEntityContainer update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(FeaturestoreEntityContainerProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - FeaturestoreEntityContainer refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - FeaturestoreEntityContainer refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerProperties.java deleted file mode 100644 index b4a3af6e1dfc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * DTO object representing feature entity. - */ -@Fluent -public final class FeaturestoreEntityContainerProperties extends AssetContainer { - /* - * Provisioning state for the featurestore entity container. - */ - private AssetProvisioningState provisioningState; - - /* - * The latest version inside this container. - */ - private String latestVersion; - - /* - * The next auto incremental version - */ - private String nextVersion; - - /** - * Creates an instance of FeaturestoreEntityContainerProperties class. - */ - public FeaturestoreEntityContainerProperties() { - } - - /** - * Get the provisioningState property: Provisioning state for the featurestore entity container. - * - * @return the provisioningState value. - */ - public AssetProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the latestVersion property: The latest version inside this container. - * - * @return the latestVersion value. - */ - @Override - public String latestVersion() { - return this.latestVersion; - } - - /** - * Get the nextVersion property: The next auto incremental version. - * - * @return the nextVersion value. - */ - @Override - public String nextVersion() { - return this.nextVersion; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturestoreEntityContainerProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturestoreEntityContainerProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturestoreEntityContainerProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturestoreEntityContainerProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeaturestoreEntityContainerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeaturestoreEntityContainerProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FeaturestoreEntityContainerProperties. - */ - public static FeaturestoreEntityContainerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeaturestoreEntityContainerProperties deserializedFeaturestoreEntityContainerProperties - = new FeaturestoreEntityContainerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedFeaturestoreEntityContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturestoreEntityContainerProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturestoreEntityContainerProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedFeaturestoreEntityContainerProperties - .withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("latestVersion".equals(fieldName)) { - deserializedFeaturestoreEntityContainerProperties.latestVersion = reader.getString(); - } else if ("nextVersion".equals(fieldName)) { - deserializedFeaturestoreEntityContainerProperties.nextVersion = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedFeaturestoreEntityContainerProperties.provisioningState - = AssetProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedFeaturestoreEntityContainerProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java deleted file mode 100644 index 8f121b32e6b6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of FeaturestoreEntityContainer entities. - */ -@Fluent -public final class FeaturestoreEntityContainerResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type FeaturestoreEntityContainer. - */ - private List value; - - /* - * The link to the next page of FeaturestoreEntityContainer objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of FeaturestoreEntityContainerResourceArmPaginatedResult class. - */ - public FeaturestoreEntityContainerResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type FeaturestoreEntityContainer. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type FeaturestoreEntityContainer. - * - * @param value the value value to set. - * @return the FeaturestoreEntityContainerResourceArmPaginatedResult object itself. - */ - public FeaturestoreEntityContainerResourceArmPaginatedResult - withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of FeaturestoreEntityContainer objects. If null, there are - * no additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of FeaturestoreEntityContainer objects. If null, there are - * no additional pages. - * - * @param nextLink the nextLink value to set. - * @return the FeaturestoreEntityContainerResourceArmPaginatedResult object itself. - */ - public FeaturestoreEntityContainerResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeaturestoreEntityContainerResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeaturestoreEntityContainerResourceArmPaginatedResult if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FeaturestoreEntityContainerResourceArmPaginatedResult. - */ - public static FeaturestoreEntityContainerResourceArmPaginatedResult fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - FeaturestoreEntityContainerResourceArmPaginatedResult deserializedFeaturestoreEntityContainerResourceArmPaginatedResult - = new FeaturestoreEntityContainerResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> FeaturestoreEntityContainerInner.fromJson(reader1)); - deserializedFeaturestoreEntityContainerResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedFeaturestoreEntityContainerResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFeaturestoreEntityContainerResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainers.java deleted file mode 100644 index a25dc10b4434..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainers.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.machinelearning.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 FeaturestoreEntityContainers. - */ -public interface FeaturestoreEntityContainers { - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of FeaturestoreEntityContainer entities as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featurestore entity. - * @param description description for the featurestore entity. - * @param createdBy createdBy user name. - * @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 a paginated list of FeaturestoreEntityContainer entities as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, - Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - Response getEntityWithResponse(String resourceGroupName, String workspaceName, - String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container. - */ - FeaturestoreEntityContainer getEntity(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @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 container along with {@link Response}. - */ - FeaturestoreEntityContainer getEntityById(String id); - - /** - * Get container. - * - * @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 container along with {@link Response}. - */ - Response getEntityByIdWithResponse(String id, Context context); - - /** - * Delete container. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete container. - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new FeaturestoreEntityContainer resource. - * - * @param name resource name. - * @return the first stage of the new FeaturestoreEntityContainer definition. - */ - FeaturestoreEntityContainer.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersion.java deleted file mode 100644 index 43e8e959e830..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersion.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.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner; - -/** - * An immutable client-side representation of FeaturestoreEntityVersion. - */ -public interface FeaturestoreEntityVersion { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - FeaturestoreEntityVersionProperties 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.machinelearning.fluent.models.FeaturestoreEntityVersionInner object. - * - * @return the inner object. - */ - FeaturestoreEntityVersionInner innerModel(); - - /** - * The entirety of the FeaturestoreEntityVersion definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The FeaturestoreEntityVersion definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the FeaturestoreEntityVersion definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the FeaturestoreEntityVersion definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @return the next definition stage. - */ - WithProperties withExistingFeaturestoreEntity(String resourceGroupName, String workspaceName, String name); - } - - /** - * The stage of the FeaturestoreEntityVersion definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(FeaturestoreEntityVersionProperties properties); - } - - /** - * The stage of the FeaturestoreEntityVersion 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - FeaturestoreEntityVersion create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - FeaturestoreEntityVersion create(Context context); - } - } - - /** - * Begins update for the FeaturestoreEntityVersion resource. - * - * @return the stage of resource update. - */ - FeaturestoreEntityVersion.Update update(); - - /** - * The template for FeaturestoreEntityVersion update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - FeaturestoreEntityVersion apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - FeaturestoreEntityVersion apply(Context context); - } - - /** - * The FeaturestoreEntityVersion update stages. - */ - interface UpdateStages { - /** - * The stage of the FeaturestoreEntityVersion update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(FeaturestoreEntityVersionProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - FeaturestoreEntityVersion refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - FeaturestoreEntityVersion refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionProperties.java deleted file mode 100644 index 95ca53688b24..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionProperties.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * DTO object representing feature entity version. - */ -@Fluent -public final class FeaturestoreEntityVersionProperties extends AssetBase { - /* - * Specifies index columns - */ - private List indexColumns; - - /* - * Specifies the asset stage - */ - private String stage; - - /* - * Provisioning state for the featurestore entity version. - */ - private AssetProvisioningState provisioningState; - - /** - * Creates an instance of FeaturestoreEntityVersionProperties class. - */ - public FeaturestoreEntityVersionProperties() { - } - - /** - * Get the indexColumns property: Specifies index columns. - * - * @return the indexColumns value. - */ - public List indexColumns() { - return this.indexColumns; - } - - /** - * Set the indexColumns property: Specifies index columns. - * - * @param indexColumns the indexColumns value to set. - * @return the FeaturestoreEntityVersionProperties object itself. - */ - public FeaturestoreEntityVersionProperties withIndexColumns(List indexColumns) { - this.indexColumns = indexColumns; - return this; - } - - /** - * Get the stage property: Specifies the asset stage. - * - * @return the stage value. - */ - public String stage() { - return this.stage; - } - - /** - * Set the stage property: Specifies the asset stage. - * - * @param stage the stage value to set. - * @return the FeaturestoreEntityVersionProperties object itself. - */ - public FeaturestoreEntityVersionProperties withStage(String stage) { - this.stage = stage; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the featurestore entity version. - * - * @return the provisioningState value. - */ - public AssetProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturestoreEntityVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturestoreEntityVersionProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturestoreEntityVersionProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturestoreEntityVersionProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturestoreEntityVersionProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (indexColumns() != null) { - indexColumns().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); - jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); - jsonWriter.writeArrayField("indexColumns", this.indexColumns, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("stage", this.stage); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeaturestoreEntityVersionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeaturestoreEntityVersionProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FeaturestoreEntityVersionProperties. - */ - public static FeaturestoreEntityVersionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeaturestoreEntityVersionProperties deserializedFeaturestoreEntityVersionProperties - = new FeaturestoreEntityVersionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedFeaturestoreEntityVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturestoreEntityVersionProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturestoreEntityVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedFeaturestoreEntityVersionProperties - .withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("isAnonymous".equals(fieldName)) { - deserializedFeaturestoreEntityVersionProperties - .withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); - } else if ("indexColumns".equals(fieldName)) { - List indexColumns = reader.readArray(reader1 -> IndexColumn.fromJson(reader1)); - deserializedFeaturestoreEntityVersionProperties.indexColumns = indexColumns; - } else if ("stage".equals(fieldName)) { - deserializedFeaturestoreEntityVersionProperties.stage = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedFeaturestoreEntityVersionProperties.provisioningState - = AssetProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedFeaturestoreEntityVersionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionResourceArmPaginatedResult.java deleted file mode 100644 index 4508e8c424b2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionResourceArmPaginatedResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of FeaturestoreEntityVersion entities. - */ -@Fluent -public final class FeaturestoreEntityVersionResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type FeaturestoreEntityVersion. - */ - private List value; - - /* - * The link to the next page of FeaturestoreEntityVersion objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of FeaturestoreEntityVersionResourceArmPaginatedResult class. - */ - public FeaturestoreEntityVersionResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type FeaturestoreEntityVersion. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type FeaturestoreEntityVersion. - * - * @param value the value value to set. - * @return the FeaturestoreEntityVersionResourceArmPaginatedResult object itself. - */ - public FeaturestoreEntityVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of FeaturestoreEntityVersion objects. If null, there are no - * additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of FeaturestoreEntityVersion objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the FeaturestoreEntityVersionResourceArmPaginatedResult object itself. - */ - public FeaturestoreEntityVersionResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeaturestoreEntityVersionResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeaturestoreEntityVersionResourceArmPaginatedResult if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FeaturestoreEntityVersionResourceArmPaginatedResult. - */ - public static FeaturestoreEntityVersionResourceArmPaginatedResult fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - FeaturestoreEntityVersionResourceArmPaginatedResult deserializedFeaturestoreEntityVersionResourceArmPaginatedResult - = new FeaturestoreEntityVersionResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> FeaturestoreEntityVersionInner.fromJson(reader1)); - deserializedFeaturestoreEntityVersionResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedFeaturestoreEntityVersionResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFeaturestoreEntityVersionResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersions.java deleted file mode 100644 index 66b3383d2c86..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersions.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 FeaturestoreEntityVersions. - */ -public interface FeaturestoreEntityVersions { - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @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 a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featurestore entity version. - * @param version featurestore entity version. - * @param description description for the feature entity version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @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 a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String name, - String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - FeaturestoreEntityVersion get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @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 version along with {@link Response}. - */ - FeaturestoreEntityVersion getById(String id); - - /** - * Get version. - * - * @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 version along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete version. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete version. - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new FeaturestoreEntityVersion resource. - * - * @param name resource name. - * @return the first stage of the new FeaturestoreEntityVersion definition. - */ - FeaturestoreEntityVersion.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.java deleted file mode 100644 index d5638921fc09..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Featurization mode - determines data featurization mode. - */ -public final class FeaturizationMode extends ExpandableStringEnum { - /** - * Static value Auto for FeaturizationMode. - */ - public static final FeaturizationMode AUTO = fromString("Auto"); - - /** - * Static value Custom for FeaturizationMode. - */ - public static final FeaturizationMode CUSTOM = fromString("Custom"); - - /** - * Static value Off for FeaturizationMode. - */ - public static final FeaturizationMode OFF = fromString("Off"); - - /** - * Creates a new instance of FeaturizationMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public FeaturizationMode() { - } - - /** - * Creates or finds a FeaturizationMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding FeaturizationMode. - */ - public static FeaturizationMode fromString(String name) { - return fromString(name, FeaturizationMode.class); - } - - /** - * Gets known FeaturizationMode values. - * - * @return known FeaturizationMode values. - */ - public static Collection values() { - return values(FeaturizationMode.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.java deleted file mode 100644 index 9e561ceaaf18..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Featurization Configuration. - */ -@Fluent -public class FeaturizationSettings implements JsonSerializable { - /* - * Dataset language, useful for the text data. - */ - private String datasetLanguage; - - /** - * Creates an instance of FeaturizationSettings class. - */ - public FeaturizationSettings() { - } - - /** - * Get the datasetLanguage property: Dataset language, useful for the text data. - * - * @return the datasetLanguage value. - */ - public String datasetLanguage() { - return this.datasetLanguage; - } - - /** - * Set the datasetLanguage property: Dataset language, useful for the text data. - * - * @param datasetLanguage the datasetLanguage value to set. - * @return the FeaturizationSettings object itself. - */ - public FeaturizationSettings withDatasetLanguage(String datasetLanguage) { - this.datasetLanguage = datasetLanguage; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("datasetLanguage", this.datasetLanguage); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FeaturizationSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FeaturizationSettings if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the FeaturizationSettings. - */ - public static FeaturizationSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FeaturizationSettings deserializedFeaturizationSettings = new FeaturizationSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("datasetLanguage".equals(fieldName)) { - deserializedFeaturizationSettings.datasetLanguage = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFeaturizationSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FixedInputData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FixedInputData.java deleted file mode 100644 index a15fec20a97e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FixedInputData.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Fixed input data definition. - */ -@Fluent -public final class FixedInputData extends MonitoringInputDataBase { - /* - * [Required] Specifies the type of signal to monitor. - */ - private MonitoringInputDataType inputDataType = MonitoringInputDataType.FIXED; - - /** - * Creates an instance of FixedInputData class. - */ - public FixedInputData() { - } - - /** - * Get the inputDataType property: [Required] Specifies the type of signal to monitor. - * - * @return the inputDataType value. - */ - @Override - public MonitoringInputDataType inputDataType() { - return this.inputDataType; - } - - /** - * {@inheritDoc} - */ - @Override - public FixedInputData withDataContext(String dataContext) { - super.withDataContext(dataContext); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FixedInputData withJobInputType(JobInputType jobInputType) { - super.withJobInputType(jobInputType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FixedInputData withUri(String uri) { - super.withUri(uri); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FixedInputData withColumns(Map columns) { - super.withColumns(columns); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("jobInputType", jobInputType() == null ? null : jobInputType().toString()); - jsonWriter.writeStringField("uri", uri()); - jsonWriter.writeStringField("dataContext", dataContext()); - jsonWriter.writeMapField("columns", columns(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("inputDataType", this.inputDataType == null ? null : this.inputDataType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FixedInputData from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FixedInputData if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the FixedInputData. - */ - public static FixedInputData fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FixedInputData deserializedFixedInputData = new FixedInputData(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobInputType".equals(fieldName)) { - deserializedFixedInputData.withJobInputType(JobInputType.fromString(reader.getString())); - } else if ("uri".equals(fieldName)) { - deserializedFixedInputData.withUri(reader.getString()); - } else if ("dataContext".equals(fieldName)) { - deserializedFixedInputData.withDataContext(reader.getString()); - } else if ("columns".equals(fieldName)) { - Map columns = reader.readMap(reader1 -> reader1.getString()); - deserializedFixedInputData.withColumns(columns); - } else if ("inputDataType".equals(fieldName)) { - deserializedFixedInputData.inputDataType = MonitoringInputDataType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedFixedInputData; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.java deleted file mode 100644 index 1da887f6d253..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The FlavorData model. - */ -@Fluent -public final class FlavorData implements JsonSerializable { - /* - * Model flavor-specific data. - */ - private Map data; - - /** - * Creates an instance of FlavorData class. - */ - public FlavorData() { - } - - /** - * Get the data property: Model flavor-specific data. - * - * @return the data value. - */ - public Map data() { - return this.data; - } - - /** - * Set the data property: Model flavor-specific data. - * - * @param data the data value to set. - * @return the FlavorData object itself. - */ - public FlavorData withData(Map data) { - this.data = data; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("data", this.data, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FlavorData from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FlavorData if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the FlavorData. - */ - public static FlavorData fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FlavorData deserializedFlavorData = new FlavorData(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("data".equals(fieldName)) { - Map data = reader.readMap(reader1 -> reader1.getString()); - deserializedFlavorData.data = data; - } else { - reader.skipChildren(); - } - } - - return deserializedFlavorData; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.java deleted file mode 100644 index d648c8be3c2e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The desired maximum forecast horizon in units of time-series frequency. - */ -@Immutable -public class ForecastHorizon implements JsonSerializable { - /* - * [Required] Set forecast horizon value selection mode. - */ - private ForecastHorizonMode mode = ForecastHorizonMode.fromString("ForecastHorizon"); - - /** - * Creates an instance of ForecastHorizon class. - */ - public ForecastHorizon() { - } - - /** - * Get the mode property: [Required] Set forecast horizon value selection mode. - * - * @return the mode value. - */ - public ForecastHorizonMode mode() { - return this.mode; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ForecastHorizon from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ForecastHorizon if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ForecastHorizon. - */ - public static ForecastHorizon fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("mode".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Auto".equals(discriminatorValue)) { - return AutoForecastHorizon.fromJson(readerToUse.reset()); - } else if ("Custom".equals(discriminatorValue)) { - return CustomForecastHorizon.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ForecastHorizon fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ForecastHorizon deserializedForecastHorizon = new ForecastHorizon(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedForecastHorizon.mode = ForecastHorizonMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedForecastHorizon; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.java deleted file mode 100644 index 593850044112..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine forecast horizon selection mode. - */ -public final class ForecastHorizonMode extends ExpandableStringEnum { - /** - * Static value Auto for ForecastHorizonMode. - */ - public static final ForecastHorizonMode AUTO = fromString("Auto"); - - /** - * Static value Custom for ForecastHorizonMode. - */ - public static final ForecastHorizonMode CUSTOM = fromString("Custom"); - - /** - * Creates a new instance of ForecastHorizonMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ForecastHorizonMode() { - } - - /** - * Creates or finds a ForecastHorizonMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding ForecastHorizonMode. - */ - public static ForecastHorizonMode fromString(String name) { - return fromString(name, ForecastHorizonMode.class); - } - - /** - * Gets known ForecastHorizonMode values. - * - * @return known ForecastHorizonMode values. - */ - public static Collection values() { - return values(ForecastHorizonMode.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Forecasting.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Forecasting.java deleted file mode 100644 index df9177f37632..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Forecasting.java +++ /dev/null @@ -1,501 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Forecasting task in AutoML Table vertical. - */ -@Fluent -public final class Forecasting extends AutoMLVertical { - /* - * [Required] Task type for AutoMLJob. - */ - private TaskType taskType = TaskType.FORECASTING; - - /* - * Primary metric for forecasting task. - */ - private ForecastingPrimaryMetrics primaryMetric; - - /* - * Forecasting task specific inputs. - */ - private ForecastingSettings forecastingSettings; - - /* - * Inputs for training phase for an AutoML Job. - */ - private ForecastingTrainingSettings trainingSettings; - - /* - * Execution constraints for AutoMLJob. - */ - private TableVerticalLimitSettings limitSettings; - - /* - * Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - */ - private NCrossValidations nCrossValidations; - - /* - * Columns to use for CVSplit data. - */ - private List cvSplitColumnNames; - - /* - * The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the - * data to be weighted up or down. - */ - private String weightColumnName; - - /* - * Validation data inputs. - */ - private MLTableJobInput validationData; - - /* - * Test data input. - */ - private MLTableJobInput testData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - private Double validationDataSize; - - /* - * The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - private Double testDataSize; - - /* - * Featurization inputs needed for AutoML job. - */ - private TableVerticalFeaturizationSettings featurizationSettings; - - /** - * Creates an instance of Forecasting class. - */ - public Forecasting() { - } - - /** - * Get the taskType property: [Required] Task type for AutoMLJob. - * - * @return the taskType value. - */ - @Override - public TaskType taskType() { - return this.taskType; - } - - /** - * Get the primaryMetric property: Primary metric for forecasting task. - * - * @return the primaryMetric value. - */ - public ForecastingPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric for forecasting task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the Forecasting object itself. - */ - public Forecasting withPrimaryMetric(ForecastingPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - - /** - * Get the forecastingSettings property: Forecasting task specific inputs. - * - * @return the forecastingSettings value. - */ - public ForecastingSettings forecastingSettings() { - return this.forecastingSettings; - } - - /** - * Set the forecastingSettings property: Forecasting task specific inputs. - * - * @param forecastingSettings the forecastingSettings value to set. - * @return the Forecasting object itself. - */ - public Forecasting withForecastingSettings(ForecastingSettings forecastingSettings) { - this.forecastingSettings = forecastingSettings; - return this; - } - - /** - * Get the trainingSettings property: Inputs for training phase for an AutoML Job. - * - * @return the trainingSettings value. - */ - public ForecastingTrainingSettings trainingSettings() { - return this.trainingSettings; - } - - /** - * Set the trainingSettings property: Inputs for training phase for an AutoML Job. - * - * @param trainingSettings the trainingSettings value to set. - * @return the Forecasting object itself. - */ - public Forecasting withTrainingSettings(ForecastingTrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; - return this; - } - - /** - * Get the limitSettings property: Execution constraints for AutoMLJob. - * - * @return the limitSettings value. - */ - public TableVerticalLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: Execution constraints for AutoMLJob. - * - * @param limitSettings the limitSettings value to set. - * @return the Forecasting object itself. - */ - public Forecasting withLimitSettings(TableVerticalLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - * - * @return the nCrossValidations value. - */ - public NCrossValidations nCrossValidations() { - return this.nCrossValidations; - } - - /** - * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - * - * @param nCrossValidations the nCrossValidations value to set. - * @return the Forecasting object itself. - */ - public Forecasting withNCrossValidations(NCrossValidations nCrossValidations) { - this.nCrossValidations = nCrossValidations; - return this; - } - - /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @return the cvSplitColumnNames value. - */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; - } - - /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. - * @return the Forecasting object itself. - */ - public Forecasting withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; - return this; - } - - /** - * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @return the weightColumnName value. - */ - public String weightColumnName() { - return this.weightColumnName; - } - - /** - * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @param weightColumnName the weightColumnName value to set. - * @return the Forecasting object itself. - */ - public Forecasting withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the Forecasting object itself. - */ - public Forecasting withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public MLTableJobInput testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the Forecasting object itself. - */ - public Forecasting withTestData(MLTableJobInput testData) { - this.testData = testData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the Forecasting object itself. - */ - public Forecasting withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @return the testDataSize value. - */ - public Double testDataSize() { - return this.testDataSize; - } - - /** - * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @param testDataSize the testDataSize value to set. - * @return the Forecasting object itself. - */ - public Forecasting withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; - return this; - } - - /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @return the featurizationSettings value. - */ - public TableVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; - } - - /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @param featurizationSettings the featurizationSettings value to set. - * @return the Forecasting object itself. - */ - public Forecasting withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Forecasting withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Forecasting withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Forecasting withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (forecastingSettings() != null) { - forecastingSettings().validate(); - } - if (trainingSettings() != null) { - trainingSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - if (nCrossValidations() != null) { - nCrossValidations().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - if (testData() != null) { - testData().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("trainingData", trainingData()); - jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); - jsonWriter.writeStringField("targetColumnName", targetColumnName()); - jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); - jsonWriter.writeJsonField("forecastingSettings", this.forecastingSettings); - jsonWriter.writeJsonField("trainingSettings", this.trainingSettings); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); - jsonWriter.writeArrayField("cvSplitColumnNames", this.cvSplitColumnNames, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("weightColumnName", this.weightColumnName); - jsonWriter.writeJsonField("validationData", this.validationData); - jsonWriter.writeJsonField("testData", this.testData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); - jsonWriter.writeNumberField("testDataSize", this.testDataSize); - jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Forecasting from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Forecasting if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the Forecasting. - */ - public static Forecasting fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Forecasting deserializedForecasting = new Forecasting(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("trainingData".equals(fieldName)) { - deserializedForecasting.withTrainingData(MLTableJobInput.fromJson(reader)); - } else if ("logVerbosity".equals(fieldName)) { - deserializedForecasting.withLogVerbosity(LogVerbosity.fromString(reader.getString())); - } else if ("targetColumnName".equals(fieldName)) { - deserializedForecasting.withTargetColumnName(reader.getString()); - } else if ("taskType".equals(fieldName)) { - deserializedForecasting.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedForecasting.primaryMetric = ForecastingPrimaryMetrics.fromString(reader.getString()); - } else if ("forecastingSettings".equals(fieldName)) { - deserializedForecasting.forecastingSettings = ForecastingSettings.fromJson(reader); - } else if ("trainingSettings".equals(fieldName)) { - deserializedForecasting.trainingSettings = ForecastingTrainingSettings.fromJson(reader); - } else if ("limitSettings".equals(fieldName)) { - deserializedForecasting.limitSettings = TableVerticalLimitSettings.fromJson(reader); - } else if ("nCrossValidations".equals(fieldName)) { - deserializedForecasting.nCrossValidations = NCrossValidations.fromJson(reader); - } else if ("cvSplitColumnNames".equals(fieldName)) { - List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); - deserializedForecasting.cvSplitColumnNames = cvSplitColumnNames; - } else if ("weightColumnName".equals(fieldName)) { - deserializedForecasting.weightColumnName = reader.getString(); - } else if ("validationData".equals(fieldName)) { - deserializedForecasting.validationData = MLTableJobInput.fromJson(reader); - } else if ("testData".equals(fieldName)) { - deserializedForecasting.testData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedForecasting.validationDataSize = reader.getNullable(JsonReader::getDouble); - } else if ("testDataSize".equals(fieldName)) { - deserializedForecasting.testDataSize = reader.getNullable(JsonReader::getDouble); - } else if ("featurizationSettings".equals(fieldName)) { - deserializedForecasting.featurizationSettings = TableVerticalFeaturizationSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedForecasting; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java deleted file mode 100644 index 35d93cbc2f82..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum for all forecasting models supported by AutoML. - */ -public final class ForecastingModels extends ExpandableStringEnum { - /** - * Static value AutoArima for ForecastingModels. - */ - public static final ForecastingModels AUTO_ARIMA = fromString("AutoArima"); - - /** - * Static value Prophet for ForecastingModels. - */ - public static final ForecastingModels PROPHET = fromString("Prophet"); - - /** - * Static value Naive for ForecastingModels. - */ - public static final ForecastingModels NAIVE = fromString("Naive"); - - /** - * Static value SeasonalNaive for ForecastingModels. - */ - public static final ForecastingModels SEASONAL_NAIVE = fromString("SeasonalNaive"); - - /** - * Static value Average for ForecastingModels. - */ - public static final ForecastingModels AVERAGE = fromString("Average"); - - /** - * Static value SeasonalAverage for ForecastingModels. - */ - public static final ForecastingModels SEASONAL_AVERAGE = fromString("SeasonalAverage"); - - /** - * Static value ExponentialSmoothing for ForecastingModels. - */ - public static final ForecastingModels EXPONENTIAL_SMOOTHING = fromString("ExponentialSmoothing"); - - /** - * Static value Arimax for ForecastingModels. - */ - public static final ForecastingModels ARIMAX = fromString("Arimax"); - - /** - * Static value TCNForecaster for ForecastingModels. - */ - public static final ForecastingModels TCNFORECASTER = fromString("TCNForecaster"); - - /** - * Static value ElasticNet for ForecastingModels. - */ - public static final ForecastingModels ELASTIC_NET = fromString("ElasticNet"); - - /** - * Static value GradientBoosting for ForecastingModels. - */ - public static final ForecastingModels GRADIENT_BOOSTING = fromString("GradientBoosting"); - - /** - * Static value DecisionTree for ForecastingModels. - */ - public static final ForecastingModels DECISION_TREE = fromString("DecisionTree"); - - /** - * Static value KNN for ForecastingModels. - */ - public static final ForecastingModels KNN = fromString("KNN"); - - /** - * Static value LassoLars for ForecastingModels. - */ - public static final ForecastingModels LASSO_LARS = fromString("LassoLars"); - - /** - * Static value SGD for ForecastingModels. - */ - public static final ForecastingModels SGD = fromString("SGD"); - - /** - * Static value RandomForest for ForecastingModels. - */ - public static final ForecastingModels RANDOM_FOREST = fromString("RandomForest"); - - /** - * Static value ExtremeRandomTrees for ForecastingModels. - */ - public static final ForecastingModels EXTREME_RANDOM_TREES = fromString("ExtremeRandomTrees"); - - /** - * Static value LightGBM for ForecastingModels. - */ - public static final ForecastingModels LIGHT_GBM = fromString("LightGBM"); - - /** - * Static value XGBoostRegressor for ForecastingModels. - */ - public static final ForecastingModels XGBOOST_REGRESSOR = fromString("XGBoostRegressor"); - - /** - * Creates a new instance of ForecastingModels value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ForecastingModels() { - } - - /** - * Creates or finds a ForecastingModels from its string representation. - * - * @param name a name to look for. - * @return the corresponding ForecastingModels. - */ - public static ForecastingModels fromString(String name) { - return fromString(name, ForecastingModels.class); - } - - /** - * Gets known ForecastingModels values. - * - * @return known ForecastingModels values. - */ - public static Collection values() { - return values(ForecastingModels.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java deleted file mode 100644 index 97883cd1a561..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Primary metrics for Forecasting task. - */ -public final class ForecastingPrimaryMetrics extends ExpandableStringEnum { - /** - * Static value SpearmanCorrelation for ForecastingPrimaryMetrics. - */ - public static final ForecastingPrimaryMetrics SPEARMAN_CORRELATION = fromString("SpearmanCorrelation"); - - /** - * Static value NormalizedRootMeanSquaredError for ForecastingPrimaryMetrics. - */ - public static final ForecastingPrimaryMetrics NORMALIZED_ROOT_MEAN_SQUARED_ERROR - = fromString("NormalizedRootMeanSquaredError"); - - /** - * Static value R2Score for ForecastingPrimaryMetrics. - */ - public static final ForecastingPrimaryMetrics R2SCORE = fromString("R2Score"); - - /** - * Static value NormalizedMeanAbsoluteError for ForecastingPrimaryMetrics. - */ - public static final ForecastingPrimaryMetrics NORMALIZED_MEAN_ABSOLUTE_ERROR - = fromString("NormalizedMeanAbsoluteError"); - - /** - * Creates a new instance of ForecastingPrimaryMetrics value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ForecastingPrimaryMetrics() { - } - - /** - * Creates or finds a ForecastingPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding ForecastingPrimaryMetrics. - */ - public static ForecastingPrimaryMetrics fromString(String name) { - return fromString(name, ForecastingPrimaryMetrics.class); - } - - /** - * Gets known ForecastingPrimaryMetrics values. - * - * @return known ForecastingPrimaryMetrics values. - */ - public static Collection values() { - return values(ForecastingPrimaryMetrics.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingSettings.java deleted file mode 100644 index f074478e59fc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingSettings.java +++ /dev/null @@ -1,485 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Forecasting specific parameters. - */ -@Fluent -public final class ForecastingSettings implements JsonSerializable { - /* - * Country or region for holidays for forecasting tasks. - * These should be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. - */ - private String countryOrRegionForHolidays; - - /* - * The name of the time column. This parameter is required when forecasting to specify the datetime column in the - * input data used for building the time series and inferring its frequency. - */ - private String timeColumnName; - - /* - * The number of past periods to lag from the target column. - */ - private TargetLags targetLags; - - /* - * The number of past periods used to create a rolling window average of the target column. - */ - private TargetRollingWindowSize targetRollingWindowSize; - - /* - * The desired maximum forecast horizon in units of time-series frequency. - */ - private ForecastHorizon forecastHorizon; - - /* - * The names of columns used to group a timeseries. It can be used to create multiple series. - * If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type - * forecasting. - */ - private List timeSeriesIdColumnNames; - - /* - * When forecasting, this parameter represents the period with which the forecast is desired, for example daily, - * weekly, yearly, etc. The forecast frequency is dataset frequency by default. - */ - private String frequency; - - /* - * Flag for generating lags for the numeric features with 'auto' or null. - */ - private FeatureLags featureLags; - - /* - * Set time series seasonality as an integer multiple of the series frequency. - * If seasonality is set to 'auto', it will be inferred. - */ - private Seasonality seasonality; - - /* - * The parameter defining how if AutoML should handle short time series. - */ - private ShortSeriesHandlingConfiguration shortSeriesHandlingConfig; - - /* - * Configure STL Decomposition of the time-series target column. - */ - private UseStl useStl; - - /* - * The function to be used to aggregate the time series target column to conform to a user specified frequency. - * If the TargetAggregateFunction is set i.e. not 'None', but the freq parameter is not set, the error is raised. - * The possible target aggregation functions are: "sum", "max", "min" and "mean". - */ - private TargetAggregationFunction targetAggregateFunction; - - /* - * Number of periods between the origin time of one CV fold and the next fold. For - * example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be - * three days apart. - */ - private Integer cvStepSize; - - /** - * Creates an instance of ForecastingSettings class. - */ - public ForecastingSettings() { - } - - /** - * Get the countryOrRegionForHolidays property: Country or region for holidays for forecasting tasks. - * These should be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. - * - * @return the countryOrRegionForHolidays value. - */ - public String countryOrRegionForHolidays() { - return this.countryOrRegionForHolidays; - } - - /** - * Set the countryOrRegionForHolidays property: Country or region for holidays for forecasting tasks. - * These should be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. - * - * @param countryOrRegionForHolidays the countryOrRegionForHolidays value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings withCountryOrRegionForHolidays(String countryOrRegionForHolidays) { - this.countryOrRegionForHolidays = countryOrRegionForHolidays; - return this; - } - - /** - * Get the timeColumnName property: The name of the time column. This parameter is required when forecasting to - * specify the datetime column in the input data used for building the time series and inferring its frequency. - * - * @return the timeColumnName value. - */ - public String timeColumnName() { - return this.timeColumnName; - } - - /** - * Set the timeColumnName property: The name of the time column. This parameter is required when forecasting to - * specify the datetime column in the input data used for building the time series and inferring its frequency. - * - * @param timeColumnName the timeColumnName value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings withTimeColumnName(String timeColumnName) { - this.timeColumnName = timeColumnName; - return this; - } - - /** - * Get the targetLags property: The number of past periods to lag from the target column. - * - * @return the targetLags value. - */ - public TargetLags targetLags() { - return this.targetLags; - } - - /** - * Set the targetLags property: The number of past periods to lag from the target column. - * - * @param targetLags the targetLags value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings withTargetLags(TargetLags targetLags) { - this.targetLags = targetLags; - return this; - } - - /** - * Get the targetRollingWindowSize property: The number of past periods used to create a rolling window average of - * the target column. - * - * @return the targetRollingWindowSize value. - */ - public TargetRollingWindowSize targetRollingWindowSize() { - return this.targetRollingWindowSize; - } - - /** - * Set the targetRollingWindowSize property: The number of past periods used to create a rolling window average of - * the target column. - * - * @param targetRollingWindowSize the targetRollingWindowSize value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings withTargetRollingWindowSize(TargetRollingWindowSize targetRollingWindowSize) { - this.targetRollingWindowSize = targetRollingWindowSize; - return this; - } - - /** - * Get the forecastHorizon property: The desired maximum forecast horizon in units of time-series frequency. - * - * @return the forecastHorizon value. - */ - public ForecastHorizon forecastHorizon() { - return this.forecastHorizon; - } - - /** - * Set the forecastHorizon property: The desired maximum forecast horizon in units of time-series frequency. - * - * @param forecastHorizon the forecastHorizon value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings withForecastHorizon(ForecastHorizon forecastHorizon) { - this.forecastHorizon = forecastHorizon; - return this; - } - - /** - * Get the timeSeriesIdColumnNames property: The names of columns used to group a timeseries. It can be used to - * create multiple series. - * If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type - * forecasting. - * - * @return the timeSeriesIdColumnNames value. - */ - public List timeSeriesIdColumnNames() { - return this.timeSeriesIdColumnNames; - } - - /** - * Set the timeSeriesIdColumnNames property: The names of columns used to group a timeseries. It can be used to - * create multiple series. - * If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type - * forecasting. - * - * @param timeSeriesIdColumnNames the timeSeriesIdColumnNames value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings withTimeSeriesIdColumnNames(List timeSeriesIdColumnNames) { - this.timeSeriesIdColumnNames = timeSeriesIdColumnNames; - return this; - } - - /** - * Get the frequency property: When forecasting, this parameter represents the period with which the forecast is - * desired, for example daily, weekly, yearly, etc. The forecast frequency is dataset frequency by default. - * - * @return the frequency value. - */ - public String frequency() { - return this.frequency; - } - - /** - * Set the frequency property: When forecasting, this parameter represents the period with which the forecast is - * desired, for example daily, weekly, yearly, etc. The forecast frequency is dataset frequency by default. - * - * @param frequency the frequency value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings withFrequency(String frequency) { - this.frequency = frequency; - return this; - } - - /** - * Get the featureLags property: Flag for generating lags for the numeric features with 'auto' or null. - * - * @return the featureLags value. - */ - public FeatureLags featureLags() { - return this.featureLags; - } - - /** - * Set the featureLags property: Flag for generating lags for the numeric features with 'auto' or null. - * - * @param featureLags the featureLags value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings withFeatureLags(FeatureLags featureLags) { - this.featureLags = featureLags; - return this; - } - - /** - * Get the seasonality property: Set time series seasonality as an integer multiple of the series frequency. - * If seasonality is set to 'auto', it will be inferred. - * - * @return the seasonality value. - */ - public Seasonality seasonality() { - return this.seasonality; - } - - /** - * Set the seasonality property: Set time series seasonality as an integer multiple of the series frequency. - * If seasonality is set to 'auto', it will be inferred. - * - * @param seasonality the seasonality value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings withSeasonality(Seasonality seasonality) { - this.seasonality = seasonality; - return this; - } - - /** - * Get the shortSeriesHandlingConfig property: The parameter defining how if AutoML should handle short time series. - * - * @return the shortSeriesHandlingConfig value. - */ - public ShortSeriesHandlingConfiguration shortSeriesHandlingConfig() { - return this.shortSeriesHandlingConfig; - } - - /** - * Set the shortSeriesHandlingConfig property: The parameter defining how if AutoML should handle short time series. - * - * @param shortSeriesHandlingConfig the shortSeriesHandlingConfig value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings - withShortSeriesHandlingConfig(ShortSeriesHandlingConfiguration shortSeriesHandlingConfig) { - this.shortSeriesHandlingConfig = shortSeriesHandlingConfig; - return this; - } - - /** - * Get the useStl property: Configure STL Decomposition of the time-series target column. - * - * @return the useStl value. - */ - public UseStl useStl() { - return this.useStl; - } - - /** - * Set the useStl property: Configure STL Decomposition of the time-series target column. - * - * @param useStl the useStl value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings withUseStl(UseStl useStl) { - this.useStl = useStl; - return this; - } - - /** - * Get the targetAggregateFunction property: The function to be used to aggregate the time series target column to - * conform to a user specified frequency. - * If the TargetAggregateFunction is set i.e. not 'None', but the freq parameter is not set, the error is raised. - * The possible target aggregation functions are: "sum", "max", "min" and "mean". - * - * @return the targetAggregateFunction value. - */ - public TargetAggregationFunction targetAggregateFunction() { - return this.targetAggregateFunction; - } - - /** - * Set the targetAggregateFunction property: The function to be used to aggregate the time series target column to - * conform to a user specified frequency. - * If the TargetAggregateFunction is set i.e. not 'None', but the freq parameter is not set, the error is raised. - * The possible target aggregation functions are: "sum", "max", "min" and "mean". - * - * @param targetAggregateFunction the targetAggregateFunction value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings withTargetAggregateFunction(TargetAggregationFunction targetAggregateFunction) { - this.targetAggregateFunction = targetAggregateFunction; - return this; - } - - /** - * Get the cvStepSize property: Number of periods between the origin time of one CV fold and the next fold. For - * example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be - * three days apart. - * - * @return the cvStepSize value. - */ - public Integer cvStepSize() { - return this.cvStepSize; - } - - /** - * Set the cvStepSize property: Number of periods between the origin time of one CV fold and the next fold. For - * example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be - * three days apart. - * - * @param cvStepSize the cvStepSize value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings withCvStepSize(Integer cvStepSize) { - this.cvStepSize = cvStepSize; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (targetLags() != null) { - targetLags().validate(); - } - if (targetRollingWindowSize() != null) { - targetRollingWindowSize().validate(); - } - if (forecastHorizon() != null) { - forecastHorizon().validate(); - } - if (seasonality() != null) { - seasonality().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("countryOrRegionForHolidays", this.countryOrRegionForHolidays); - jsonWriter.writeStringField("timeColumnName", this.timeColumnName); - jsonWriter.writeJsonField("targetLags", this.targetLags); - jsonWriter.writeJsonField("targetRollingWindowSize", this.targetRollingWindowSize); - jsonWriter.writeJsonField("forecastHorizon", this.forecastHorizon); - jsonWriter.writeArrayField("timeSeriesIdColumnNames", this.timeSeriesIdColumnNames, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("frequency", this.frequency); - jsonWriter.writeStringField("featureLags", this.featureLags == null ? null : this.featureLags.toString()); - jsonWriter.writeJsonField("seasonality", this.seasonality); - jsonWriter.writeStringField("shortSeriesHandlingConfig", - this.shortSeriesHandlingConfig == null ? null : this.shortSeriesHandlingConfig.toString()); - jsonWriter.writeStringField("useStl", this.useStl == null ? null : this.useStl.toString()); - jsonWriter.writeStringField("targetAggregateFunction", - this.targetAggregateFunction == null ? null : this.targetAggregateFunction.toString()); - jsonWriter.writeNumberField("cvStepSize", this.cvStepSize); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ForecastingSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ForecastingSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ForecastingSettings. - */ - public static ForecastingSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ForecastingSettings deserializedForecastingSettings = new ForecastingSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("countryOrRegionForHolidays".equals(fieldName)) { - deserializedForecastingSettings.countryOrRegionForHolidays = reader.getString(); - } else if ("timeColumnName".equals(fieldName)) { - deserializedForecastingSettings.timeColumnName = reader.getString(); - } else if ("targetLags".equals(fieldName)) { - deserializedForecastingSettings.targetLags = TargetLags.fromJson(reader); - } else if ("targetRollingWindowSize".equals(fieldName)) { - deserializedForecastingSettings.targetRollingWindowSize = TargetRollingWindowSize.fromJson(reader); - } else if ("forecastHorizon".equals(fieldName)) { - deserializedForecastingSettings.forecastHorizon = ForecastHorizon.fromJson(reader); - } else if ("timeSeriesIdColumnNames".equals(fieldName)) { - List timeSeriesIdColumnNames = reader.readArray(reader1 -> reader1.getString()); - deserializedForecastingSettings.timeSeriesIdColumnNames = timeSeriesIdColumnNames; - } else if ("frequency".equals(fieldName)) { - deserializedForecastingSettings.frequency = reader.getString(); - } else if ("featureLags".equals(fieldName)) { - deserializedForecastingSettings.featureLags = FeatureLags.fromString(reader.getString()); - } else if ("seasonality".equals(fieldName)) { - deserializedForecastingSettings.seasonality = Seasonality.fromJson(reader); - } else if ("shortSeriesHandlingConfig".equals(fieldName)) { - deserializedForecastingSettings.shortSeriesHandlingConfig - = ShortSeriesHandlingConfiguration.fromString(reader.getString()); - } else if ("useStl".equals(fieldName)) { - deserializedForecastingSettings.useStl = UseStl.fromString(reader.getString()); - } else if ("targetAggregateFunction".equals(fieldName)) { - deserializedForecastingSettings.targetAggregateFunction - = TargetAggregationFunction.fromString(reader.getString()); - } else if ("cvStepSize".equals(fieldName)) { - deserializedForecastingSettings.cvStepSize = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedForecastingSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingTrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingTrainingSettings.java deleted file mode 100644 index a554a0386243..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingTrainingSettings.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; -import java.util.List; - -/** - * Forecasting Training related configuration. - */ -@Fluent -public final class ForecastingTrainingSettings extends TrainingSettings { - /* - * Allowed models for forecasting task. - */ - private List allowedTrainingAlgorithms; - - /* - * Blocked models for forecasting task. - */ - private List blockedTrainingAlgorithms; - - /** - * Creates an instance of ForecastingTrainingSettings class. - */ - public ForecastingTrainingSettings() { - } - - /** - * Get the allowedTrainingAlgorithms property: Allowed models for forecasting task. - * - * @return the allowedTrainingAlgorithms value. - */ - public List allowedTrainingAlgorithms() { - return this.allowedTrainingAlgorithms; - } - - /** - * Set the allowedTrainingAlgorithms property: Allowed models for forecasting task. - * - * @param allowedTrainingAlgorithms the allowedTrainingAlgorithms value to set. - * @return the ForecastingTrainingSettings object itself. - */ - public ForecastingTrainingSettings - withAllowedTrainingAlgorithms(List allowedTrainingAlgorithms) { - this.allowedTrainingAlgorithms = allowedTrainingAlgorithms; - return this; - } - - /** - * Get the blockedTrainingAlgorithms property: Blocked models for forecasting task. - * - * @return the blockedTrainingAlgorithms value. - */ - public List blockedTrainingAlgorithms() { - return this.blockedTrainingAlgorithms; - } - - /** - * Set the blockedTrainingAlgorithms property: Blocked models for forecasting task. - * - * @param blockedTrainingAlgorithms the blockedTrainingAlgorithms value to set. - * @return the ForecastingTrainingSettings object itself. - */ - public ForecastingTrainingSettings - withBlockedTrainingAlgorithms(List blockedTrainingAlgorithms) { - this.blockedTrainingAlgorithms = blockedTrainingAlgorithms; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ForecastingTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { - super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ForecastingTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { - super.withStackEnsembleSettings(stackEnsembleSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ForecastingTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { - super.withEnableStackEnsemble(enableStackEnsemble); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ForecastingTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { - super.withEnableVoteEnsemble(enableVoteEnsemble); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ForecastingTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { - super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ForecastingTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { - super.withEnableModelExplainability(enableModelExplainability); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ForecastingTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { - super.withEnableDnnTraining(enableDnnTraining); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enableOnnxCompatibleModels", enableOnnxCompatibleModels()); - jsonWriter.writeJsonField("stackEnsembleSettings", stackEnsembleSettings()); - jsonWriter.writeBooleanField("enableStackEnsemble", enableStackEnsemble()); - jsonWriter.writeBooleanField("enableVoteEnsemble", enableVoteEnsemble()); - jsonWriter.writeStringField("ensembleModelDownloadTimeout", - CoreUtils.durationToStringWithDays(ensembleModelDownloadTimeout())); - jsonWriter.writeBooleanField("enableModelExplainability", enableModelExplainability()); - jsonWriter.writeBooleanField("enableDnnTraining", enableDnnTraining()); - jsonWriter.writeArrayField("allowedTrainingAlgorithms", this.allowedTrainingAlgorithms, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeArrayField("blockedTrainingAlgorithms", this.blockedTrainingAlgorithms, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ForecastingTrainingSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ForecastingTrainingSettings if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ForecastingTrainingSettings. - */ - public static ForecastingTrainingSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ForecastingTrainingSettings deserializedForecastingTrainingSettings = new ForecastingTrainingSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enableOnnxCompatibleModels".equals(fieldName)) { - deserializedForecastingTrainingSettings - .withEnableOnnxCompatibleModels(reader.getNullable(JsonReader::getBoolean)); - } else if ("stackEnsembleSettings".equals(fieldName)) { - deserializedForecastingTrainingSettings - .withStackEnsembleSettings(StackEnsembleSettings.fromJson(reader)); - } else if ("enableStackEnsemble".equals(fieldName)) { - deserializedForecastingTrainingSettings - .withEnableStackEnsemble(reader.getNullable(JsonReader::getBoolean)); - } else if ("enableVoteEnsemble".equals(fieldName)) { - deserializedForecastingTrainingSettings - .withEnableVoteEnsemble(reader.getNullable(JsonReader::getBoolean)); - } else if ("ensembleModelDownloadTimeout".equals(fieldName)) { - deserializedForecastingTrainingSettings.withEnsembleModelDownloadTimeout( - reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()))); - } else if ("enableModelExplainability".equals(fieldName)) { - deserializedForecastingTrainingSettings - .withEnableModelExplainability(reader.getNullable(JsonReader::getBoolean)); - } else if ("enableDnnTraining".equals(fieldName)) { - deserializedForecastingTrainingSettings - .withEnableDnnTraining(reader.getNullable(JsonReader::getBoolean)); - } else if ("allowedTrainingAlgorithms".equals(fieldName)) { - List allowedTrainingAlgorithms - = reader.readArray(reader1 -> ForecastingModels.fromString(reader1.getString())); - deserializedForecastingTrainingSettings.allowedTrainingAlgorithms = allowedTrainingAlgorithms; - } else if ("blockedTrainingAlgorithms".equals(fieldName)) { - List blockedTrainingAlgorithms - = reader.readArray(reader1 -> ForecastingModels.fromString(reader1.getString())); - deserializedForecastingTrainingSettings.blockedTrainingAlgorithms = blockedTrainingAlgorithms; - } else { - reader.skipChildren(); - } - } - - return deserializedForecastingTrainingSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java deleted file mode 100644 index 317381821842..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The FqdnEndpoint model. - */ -@Fluent -public final class FqdnEndpoint implements JsonSerializable { - /* - * The domainName property. - */ - private String domainName; - - /* - * The endpointDetails property. - */ - private List endpointDetails; - - /** - * Creates an instance of FqdnEndpoint class. - */ - public FqdnEndpoint() { - } - - /** - * Get the domainName property: The domainName property. - * - * @return the domainName value. - */ - public String domainName() { - return this.domainName; - } - - /** - * Set the domainName property: The domainName property. - * - * @param domainName the domainName value to set. - * @return the FqdnEndpoint object itself. - */ - public FqdnEndpoint withDomainName(String domainName) { - this.domainName = domainName; - return this; - } - - /** - * Get the endpointDetails property: The endpointDetails property. - * - * @return the endpointDetails value. - */ - public List endpointDetails() { - return this.endpointDetails; - } - - /** - * Set the endpointDetails property: The endpointDetails property. - * - * @param endpointDetails the endpointDetails value to set. - * @return the FqdnEndpoint object itself. - */ - public FqdnEndpoint withEndpointDetails(List endpointDetails) { - this.endpointDetails = endpointDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (endpointDetails() != null) { - endpointDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("domainName", this.domainName); - jsonWriter.writeArrayField("endpointDetails", this.endpointDetails, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FqdnEndpoint from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FqdnEndpoint if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the FqdnEndpoint. - */ - public static FqdnEndpoint fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FqdnEndpoint deserializedFqdnEndpoint = new FqdnEndpoint(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("domainName".equals(fieldName)) { - deserializedFqdnEndpoint.domainName = reader.getString(); - } else if ("endpointDetails".equals(fieldName)) { - List endpointDetails - = reader.readArray(reader1 -> FqdnEndpointDetail.fromJson(reader1)); - deserializedFqdnEndpoint.endpointDetails = endpointDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedFqdnEndpoint; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.java deleted file mode 100644 index 34a7e4e60ee7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The FqdnEndpointDetail model. - */ -@Fluent -public final class FqdnEndpointDetail implements JsonSerializable { - /* - * The port property. - */ - private Integer port; - - /** - * Creates an instance of FqdnEndpointDetail class. - */ - public FqdnEndpointDetail() { - } - - /** - * Get the port property: The port property. - * - * @return the port value. - */ - public Integer port() { - return this.port; - } - - /** - * Set the port property: The port property. - * - * @param port the port value to set. - * @return the FqdnEndpointDetail object itself. - */ - public FqdnEndpointDetail withPort(Integer port) { - this.port = port; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("port", this.port); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FqdnEndpointDetail from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FqdnEndpointDetail if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the FqdnEndpointDetail. - */ - public static FqdnEndpointDetail fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FqdnEndpointDetail deserializedFqdnEndpointDetail = new FqdnEndpointDetail(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("port".equals(fieldName)) { - deserializedFqdnEndpointDetail.port = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedFqdnEndpointDetail; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoints.java deleted file mode 100644 index a7fb5758a764..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoints.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The FqdnEndpoints model. - */ -@Fluent -public final class FqdnEndpoints implements JsonSerializable { - /* - * The properties property. - */ - private FqdnEndpointsProperties properties; - - /** - * Creates an instance of FqdnEndpoints class. - */ - public FqdnEndpoints() { - } - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public FqdnEndpointsProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the FqdnEndpoints object itself. - */ - public FqdnEndpoints withProperties(FqdnEndpointsProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FqdnEndpoints from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FqdnEndpoints if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the FqdnEndpoints. - */ - public static FqdnEndpoints fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FqdnEndpoints deserializedFqdnEndpoints = new FqdnEndpoints(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedFqdnEndpoints.properties = FqdnEndpointsProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedFqdnEndpoints; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.java deleted file mode 100644 index 481775542a4c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The FqdnEndpointsProperties model. - */ -@Fluent -public final class FqdnEndpointsProperties implements JsonSerializable { - /* - * The category property. - */ - private String category; - - /* - * The endpoints property. - */ - private List endpoints; - - /** - * Creates an instance of FqdnEndpointsProperties class. - */ - public FqdnEndpointsProperties() { - } - - /** - * Get the category property: The category property. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: The category property. - * - * @param category the category value to set. - * @return the FqdnEndpointsProperties object itself. - */ - public FqdnEndpointsProperties withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the endpoints property: The endpoints property. - * - * @return the endpoints value. - */ - public List endpoints() { - return this.endpoints; - } - - /** - * Set the endpoints property: The endpoints property. - * - * @param endpoints the endpoints value to set. - * @return the FqdnEndpointsProperties object itself. - */ - public FqdnEndpointsProperties withEndpoints(List endpoints) { - this.endpoints = endpoints; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (endpoints() != null) { - endpoints().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", this.category); - jsonWriter.writeArrayField("endpoints", this.endpoints, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FqdnEndpointsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FqdnEndpointsProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the FqdnEndpointsProperties. - */ - public static FqdnEndpointsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FqdnEndpointsProperties deserializedFqdnEndpointsProperties = new FqdnEndpointsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedFqdnEndpointsProperties.category = reader.getString(); - } else if ("endpoints".equals(fieldName)) { - List endpoints = reader.readArray(reader1 -> FqdnEndpoint.fromJson(reader1)); - deserializedFqdnEndpointsProperties.endpoints = endpoints; - } else { - reader.skipChildren(); - } - } - - return deserializedFqdnEndpointsProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnOutboundRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnOutboundRule.java deleted file mode 100644 index ab1445fcb8dc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnOutboundRule.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * FQDN Outbound Rule for the managed network of a machine learning workspace. - */ -@Fluent -public final class FqdnOutboundRule extends OutboundRule { - /* - * Type of a managed network Outbound Rule of a machine learning workspace. - */ - private RuleType type = RuleType.FQDN; - - /* - * The destination property. - */ - private String destination; - - /** - * Creates an instance of FqdnOutboundRule class. - */ - public FqdnOutboundRule() { - } - - /** - * Get the type property: Type of a managed network Outbound Rule of a machine learning workspace. - * - * @return the type value. - */ - @Override - public RuleType type() { - return this.type; - } - - /** - * Get the destination property: The destination property. - * - * @return the destination value. - */ - public String destination() { - return this.destination; - } - - /** - * Set the destination property: The destination property. - * - * @param destination the destination value to set. - * @return the FqdnOutboundRule object itself. - */ - public FqdnOutboundRule withDestination(String destination) { - this.destination = destination; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FqdnOutboundRule withCategory(RuleCategory category) { - super.withCategory(category); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FqdnOutboundRule withStatus(RuleStatus status) { - super.withStatus(status); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", category() == null ? null : category().toString()); - jsonWriter.writeStringField("status", status() == null ? null : status().toString()); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("destination", this.destination); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FqdnOutboundRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FqdnOutboundRule if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the FqdnOutboundRule. - */ - public static FqdnOutboundRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FqdnOutboundRule deserializedFqdnOutboundRule = new FqdnOutboundRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedFqdnOutboundRule.withCategory(RuleCategory.fromString(reader.getString())); - } else if ("status".equals(fieldName)) { - deserializedFqdnOutboundRule.withStatus(RuleStatus.fromString(reader.getString())); - } else if ("type".equals(fieldName)) { - deserializedFqdnOutboundRule.type = RuleType.fromString(reader.getString()); - } else if ("destination".equals(fieldName)) { - deserializedFqdnOutboundRule.destination = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFqdnOutboundRule; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceForConsumptionDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceForConsumptionDto.java deleted file mode 100644 index 5d2ffe5cb7ef..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceForConsumptionDto.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The GetBlobReferenceForConsumptionDto model. - */ -@Fluent -public final class GetBlobReferenceForConsumptionDto implements JsonSerializable { - /* - * Blob uri, example: https://blob.windows.core.net/Container/Path - */ - private String blobUri; - - /* - * The ARM id of the storage account - */ - private String storageAccountArmId; - - /* - * Credential info to access storage account - */ - private DataReferenceCredential credential; - - /** - * Creates an instance of GetBlobReferenceForConsumptionDto class. - */ - public GetBlobReferenceForConsumptionDto() { - } - - /** - * Get the blobUri property: Blob uri, example: https://blob.windows.core.net/Container/Path. - * - * @return the blobUri value. - */ - public String blobUri() { - return this.blobUri; - } - - /** - * Set the blobUri property: Blob uri, example: https://blob.windows.core.net/Container/Path. - * - * @param blobUri the blobUri value to set. - * @return the GetBlobReferenceForConsumptionDto object itself. - */ - public GetBlobReferenceForConsumptionDto withBlobUri(String blobUri) { - this.blobUri = blobUri; - return this; - } - - /** - * Get the storageAccountArmId property: The ARM id of the storage account. - * - * @return the storageAccountArmId value. - */ - public String storageAccountArmId() { - return this.storageAccountArmId; - } - - /** - * Set the storageAccountArmId property: The ARM id of the storage account. - * - * @param storageAccountArmId the storageAccountArmId value to set. - * @return the GetBlobReferenceForConsumptionDto object itself. - */ - public GetBlobReferenceForConsumptionDto withStorageAccountArmId(String storageAccountArmId) { - this.storageAccountArmId = storageAccountArmId; - return this; - } - - /** - * Get the credential property: Credential info to access storage account. - * - * @return the credential value. - */ - public DataReferenceCredential credential() { - return this.credential; - } - - /** - * Set the credential property: Credential info to access storage account. - * - * @param credential the credential value to set. - * @return the GetBlobReferenceForConsumptionDto object itself. - */ - public GetBlobReferenceForConsumptionDto withCredential(DataReferenceCredential credential) { - this.credential = credential; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (credential() != null) { - credential().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("blobUri", this.blobUri); - jsonWriter.writeStringField("storageAccountArmId", this.storageAccountArmId); - jsonWriter.writeJsonField("credential", this.credential); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GetBlobReferenceForConsumptionDto from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GetBlobReferenceForConsumptionDto if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the GetBlobReferenceForConsumptionDto. - */ - public static GetBlobReferenceForConsumptionDto fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GetBlobReferenceForConsumptionDto deserializedGetBlobReferenceForConsumptionDto - = new GetBlobReferenceForConsumptionDto(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("blobUri".equals(fieldName)) { - deserializedGetBlobReferenceForConsumptionDto.blobUri = reader.getString(); - } else if ("storageAccountArmId".equals(fieldName)) { - deserializedGetBlobReferenceForConsumptionDto.storageAccountArmId = reader.getString(); - } else if ("credential".equals(fieldName)) { - deserializedGetBlobReferenceForConsumptionDto.credential = DataReferenceCredential.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedGetBlobReferenceForConsumptionDto; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasRequestDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasRequestDto.java deleted file mode 100644 index 7733de40102a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasRequestDto.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * BlobReferenceSASRequest for getBlobReferenceSAS API. - */ -@Fluent -public final class GetBlobReferenceSasRequestDto implements JsonSerializable { - /* - * Id of the asset to be accessed - */ - private String assetId; - - /* - * Blob uri of the asset to be accessed - */ - private String blobUri; - - /** - * Creates an instance of GetBlobReferenceSasRequestDto class. - */ - public GetBlobReferenceSasRequestDto() { - } - - /** - * Get the assetId property: Id of the asset to be accessed. - * - * @return the assetId value. - */ - public String assetId() { - return this.assetId; - } - - /** - * Set the assetId property: Id of the asset to be accessed. - * - * @param assetId the assetId value to set. - * @return the GetBlobReferenceSasRequestDto object itself. - */ - public GetBlobReferenceSasRequestDto withAssetId(String assetId) { - this.assetId = assetId; - return this; - } - - /** - * Get the blobUri property: Blob uri of the asset to be accessed. - * - * @return the blobUri value. - */ - public String blobUri() { - return this.blobUri; - } - - /** - * Set the blobUri property: Blob uri of the asset to be accessed. - * - * @param blobUri the blobUri value to set. - * @return the GetBlobReferenceSasRequestDto object itself. - */ - public GetBlobReferenceSasRequestDto withBlobUri(String blobUri) { - this.blobUri = blobUri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("assetId", this.assetId); - jsonWriter.writeStringField("blobUri", this.blobUri); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GetBlobReferenceSasRequestDto from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GetBlobReferenceSasRequestDto if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the GetBlobReferenceSasRequestDto. - */ - public static GetBlobReferenceSasRequestDto fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GetBlobReferenceSasRequestDto deserializedGetBlobReferenceSasRequestDto - = new GetBlobReferenceSasRequestDto(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("assetId".equals(fieldName)) { - deserializedGetBlobReferenceSasRequestDto.assetId = reader.getString(); - } else if ("blobUri".equals(fieldName)) { - deserializedGetBlobReferenceSasRequestDto.blobUri = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedGetBlobReferenceSasRequestDto; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasResponseDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasResponseDto.java deleted file mode 100644 index 5f490f3cec94..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasResponseDto.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.GetBlobReferenceSasResponseDtoInner; - -/** - * An immutable client-side representation of GetBlobReferenceSasResponseDto. - */ -public interface GetBlobReferenceSasResponseDto { - /** - * Gets the blobReferenceForConsumption property: Blob reference for consumption details. - * - * @return the blobReferenceForConsumption value. - */ - GetBlobReferenceForConsumptionDto blobReferenceForConsumption(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.GetBlobReferenceSasResponseDtoInner - * object. - * - * @return the inner object. - */ - GetBlobReferenceSasResponseDtoInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.java deleted file mode 100644 index 91b2ac925a4e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines supported metric goals for hyperparameter tuning. - */ -public final class Goal extends ExpandableStringEnum { - /** - * Static value Minimize for Goal. - */ - public static final Goal MINIMIZE = fromString("Minimize"); - - /** - * Static value Maximize for Goal. - */ - public static final Goal MAXIMIZE = fromString("Maximize"); - - /** - * Creates a new instance of Goal value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Goal() { - } - - /** - * Creates or finds a Goal from its string representation. - * - * @param name a name to look for. - * @return the corresponding Goal. - */ - public static Goal fromString(String name) { - return fromString(name, Goal.class); - } - - /** - * Gets known Goal values. - * - * @return known Goal values. - */ - public static Collection values() { - return values(Goal.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.java deleted file mode 100644 index 16f0f5beaf4c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines a Sampling Algorithm that exhaustively generates every value combination in the space. - */ -@Immutable -public final class GridSamplingAlgorithm extends SamplingAlgorithm { - /* - * [Required] The algorithm used for generating hyperparameter values, along with configuration properties - */ - private SamplingAlgorithmType samplingAlgorithmType = SamplingAlgorithmType.GRID; - - /** - * Creates an instance of GridSamplingAlgorithm class. - */ - public GridSamplingAlgorithm() { - } - - /** - * Get the samplingAlgorithmType property: [Required] The algorithm used for generating hyperparameter values, along - * with configuration properties. - * - * @return the samplingAlgorithmType value. - */ - @Override - public SamplingAlgorithmType samplingAlgorithmType() { - return this.samplingAlgorithmType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("samplingAlgorithmType", - this.samplingAlgorithmType == null ? null : this.samplingAlgorithmType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GridSamplingAlgorithm from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GridSamplingAlgorithm if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the GridSamplingAlgorithm. - */ - public static GridSamplingAlgorithm fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GridSamplingAlgorithm deserializedGridSamplingAlgorithm = new GridSamplingAlgorithm(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("samplingAlgorithmType".equals(fieldName)) { - deserializedGridSamplingAlgorithm.samplingAlgorithmType - = SamplingAlgorithmType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedGridSamplingAlgorithm; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java deleted file mode 100644 index e757fd131a47..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * A HDInsight compute. - */ -@Fluent -public final class HDInsight extends Compute { - /* - * The type of compute - */ - private ComputeType computeType = ComputeType.HDINSIGHT; - - /* - * HDInsight compute properties - */ - private HDInsightProperties properties; - - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - - /** - * Creates an instance of HDInsight class. - */ - public HDInsight() { - } - - /** - * Get the computeType property: The type of compute. - * - * @return the computeType value. - */ - @Override - public ComputeType computeType() { - return this.computeType; - } - - /** - * Get the properties property: HDInsight compute properties. - * - * @return the properties value. - */ - public HDInsightProperties properties() { - return this.properties; - } - - /** - * Set the properties property: HDInsight compute properties. - * - * @param properties the properties value to set. - * @return the HDInsight object itself. - */ - public HDInsight withProperties(HDInsightProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - - /** - * {@inheritDoc} - */ - @Override - public HDInsight withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public HDInsight withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public HDInsight withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public HDInsight withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeLocation", computeLocation()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("resourceId", resourceId()); - jsonWriter.writeBooleanField("disableLocalAuth", disableLocalAuth()); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HDInsight from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HDInsight if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the HDInsight. - */ - public static HDInsight fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HDInsight deserializedHDInsight = new HDInsight(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeLocation".equals(fieldName)) { - deserializedHDInsight.withComputeLocation(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedHDInsight.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedHDInsight.withDescription(reader.getString()); - } else if ("createdOn".equals(fieldName)) { - deserializedHDInsight.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("modifiedOn".equals(fieldName)) { - deserializedHDInsight.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("resourceId".equals(fieldName)) { - deserializedHDInsight.withResourceId(reader.getString()); - } else if ("provisioningErrors".equals(fieldName)) { - List provisioningErrors - = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedHDInsight.provisioningErrors = provisioningErrors; - } else if ("isAttachedCompute".equals(fieldName)) { - deserializedHDInsight.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); - } else if ("disableLocalAuth".equals(fieldName)) { - deserializedHDInsight.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); - } else if ("computeType".equals(fieldName)) { - deserializedHDInsight.computeType = ComputeType.fromString(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedHDInsight.properties = HDInsightProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedHDInsight; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.java deleted file mode 100644 index be00bc1a95eb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * HDInsight compute properties. - */ -@Fluent -public final class HDInsightProperties implements JsonSerializable { - /* - * Port open for ssh connections on the master node of the cluster. - */ - private Integer sshPort; - - /* - * Public IP address of the master node of the cluster. - */ - private String address; - - /* - * Admin credentials for master node of the cluster - */ - private VirtualMachineSshCredentials administratorAccount; - - /** - * Creates an instance of HDInsightProperties class. - */ - public HDInsightProperties() { - } - - /** - * Get the sshPort property: Port open for ssh connections on the master node of the cluster. - * - * @return the sshPort value. - */ - public Integer sshPort() { - return this.sshPort; - } - - /** - * Set the sshPort property: Port open for ssh connections on the master node of the cluster. - * - * @param sshPort the sshPort value to set. - * @return the HDInsightProperties object itself. - */ - public HDInsightProperties withSshPort(Integer sshPort) { - this.sshPort = sshPort; - return this; - } - - /** - * Get the address property: Public IP address of the master node of the cluster. - * - * @return the address value. - */ - public String address() { - return this.address; - } - - /** - * Set the address property: Public IP address of the master node of the cluster. - * - * @param address the address value to set. - * @return the HDInsightProperties object itself. - */ - public HDInsightProperties withAddress(String address) { - this.address = address; - return this; - } - - /** - * Get the administratorAccount property: Admin credentials for master node of the cluster. - * - * @return the administratorAccount value. - */ - public VirtualMachineSshCredentials administratorAccount() { - return this.administratorAccount; - } - - /** - * Set the administratorAccount property: Admin credentials for master node of the cluster. - * - * @param administratorAccount the administratorAccount value to set. - * @return the HDInsightProperties object itself. - */ - public HDInsightProperties withAdministratorAccount(VirtualMachineSshCredentials administratorAccount) { - this.administratorAccount = administratorAccount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (administratorAccount() != null) { - administratorAccount().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("sshPort", this.sshPort); - jsonWriter.writeStringField("address", this.address); - jsonWriter.writeJsonField("administratorAccount", this.administratorAccount); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HDInsightProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HDInsightProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the HDInsightProperties. - */ - public static HDInsightProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HDInsightProperties deserializedHDInsightProperties = new HDInsightProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sshPort".equals(fieldName)) { - deserializedHDInsightProperties.sshPort = reader.getNullable(JsonReader::getInt); - } else if ("address".equals(fieldName)) { - deserializedHDInsightProperties.address = reader.getString(); - } else if ("administratorAccount".equals(fieldName)) { - deserializedHDInsightProperties.administratorAccount - = VirtualMachineSshCredentials.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedHDInsightProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightSchema.java deleted file mode 100644 index 08811ff2412a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightSchema.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The HDInsightSchema model. - */ -@Fluent -public class HDInsightSchema implements JsonSerializable { - /* - * HDInsight compute properties - */ - private HDInsightProperties properties; - - /** - * Creates an instance of HDInsightSchema class. - */ - public HDInsightSchema() { - } - - /** - * Get the properties property: HDInsight compute properties. - * - * @return the properties value. - */ - public HDInsightProperties properties() { - return this.properties; - } - - /** - * Set the properties property: HDInsight compute properties. - * - * @param properties the properties value to set. - * @return the HDInsightSchema object itself. - */ - public HDInsightSchema withProperties(HDInsightProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HDInsightSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HDInsightSchema if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the HDInsightSchema. - */ - public static HDInsightSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HDInsightSchema deserializedHDInsightSchema = new HDInsightSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedHDInsightSchema.properties = HDInsightProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedHDInsightSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.java deleted file mode 100644 index 2e462d48e528..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Reference to an asset via its ARM resource ID. - */ -@Fluent -public final class IdAssetReference extends AssetReferenceBase { - /* - * [Required] Specifies the type of asset reference. - */ - private ReferenceType referenceType = ReferenceType.ID; - - /* - * [Required] ARM resource ID of the asset. - */ - private String assetId; - - /** - * Creates an instance of IdAssetReference class. - */ - public IdAssetReference() { - } - - /** - * Get the referenceType property: [Required] Specifies the type of asset reference. - * - * @return the referenceType value. - */ - @Override - public ReferenceType referenceType() { - return this.referenceType; - } - - /** - * Get the assetId property: [Required] ARM resource ID of the asset. - * - * @return the assetId value. - */ - public String assetId() { - return this.assetId; - } - - /** - * Set the assetId property: [Required] ARM resource ID of the asset. - * - * @param assetId the assetId value to set. - * @return the IdAssetReference object itself. - */ - public IdAssetReference withAssetId(String assetId) { - this.assetId = assetId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (assetId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property assetId in model IdAssetReference")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IdAssetReference.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("assetId", this.assetId); - jsonWriter.writeStringField("referenceType", this.referenceType == null ? null : this.referenceType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IdAssetReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IdAssetReference if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IdAssetReference. - */ - public static IdAssetReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IdAssetReference deserializedIdAssetReference = new IdAssetReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("assetId".equals(fieldName)) { - deserializedIdAssetReference.assetId = reader.getString(); - } else if ("referenceType".equals(fieldName)) { - deserializedIdAssetReference.referenceType = ReferenceType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedIdAssetReference; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.java deleted file mode 100644 index 213450120e9a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base definition for identity configuration. - */ -@Immutable -public class IdentityConfiguration implements JsonSerializable { - /* - * [Required] Specifies the type of identity framework. - */ - private IdentityConfigurationType identityType = IdentityConfigurationType.fromString("IdentityConfiguration"); - - /** - * Creates an instance of IdentityConfiguration class. - */ - public IdentityConfiguration() { - } - - /** - * Get the identityType property: [Required] Specifies the type of identity framework. - * - * @return the identityType value. - */ - public IdentityConfigurationType identityType() { - return this.identityType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("identityType", this.identityType == null ? null : this.identityType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IdentityConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IdentityConfiguration if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the IdentityConfiguration. - */ - public static IdentityConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("identityType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AMLToken".equals(discriminatorValue)) { - return AmlToken.fromJson(readerToUse.reset()); - } else if ("Managed".equals(discriminatorValue)) { - return ManagedIdentity.fromJson(readerToUse.reset()); - } else if ("UserIdentity".equals(discriminatorValue)) { - return UserIdentity.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static IdentityConfiguration fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IdentityConfiguration deserializedIdentityConfiguration = new IdentityConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("identityType".equals(fieldName)) { - deserializedIdentityConfiguration.identityType - = IdentityConfigurationType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedIdentityConfiguration; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.java deleted file mode 100644 index c30c98880e0a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine identity framework. - */ -public final class IdentityConfigurationType extends ExpandableStringEnum { - /** - * Static value Managed for IdentityConfigurationType. - */ - public static final IdentityConfigurationType MANAGED = fromString("Managed"); - - /** - * Static value AMLToken for IdentityConfigurationType. - */ - public static final IdentityConfigurationType AMLTOKEN = fromString("AMLToken"); - - /** - * Static value UserIdentity for IdentityConfigurationType. - */ - public static final IdentityConfigurationType USER_IDENTITY = fromString("UserIdentity"); - - /** - * Creates a new instance of IdentityConfigurationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IdentityConfigurationType() { - } - - /** - * Creates or finds a IdentityConfigurationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding IdentityConfigurationType. - */ - public static IdentityConfigurationType fromString(String name) { - return fromString(name, IdentityConfigurationType.class); - } - - /** - * Gets known IdentityConfigurationType values. - * - * @return known IdentityConfigurationType values. - */ - public static Collection values() { - return values(IdentityConfigurationType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityForCmk.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityForCmk.java deleted file mode 100644 index 005ee944ae13..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityForCmk.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Identity that will be used to access key vault for encryption at rest. - */ -@Fluent -public final class IdentityForCmk implements JsonSerializable { - /* - * The ArmId of the user assigned identity that will be used to access the customer managed key vault - */ - private String userAssignedIdentity; - - /** - * Creates an instance of IdentityForCmk class. - */ - public IdentityForCmk() { - } - - /** - * Get the userAssignedIdentity property: The ArmId of the user assigned identity that will be used to access the - * customer managed key vault. - * - * @return the userAssignedIdentity value. - */ - public String userAssignedIdentity() { - return this.userAssignedIdentity; - } - - /** - * Set the userAssignedIdentity property: The ArmId of the user assigned identity that will be used to access the - * customer managed key vault. - * - * @param userAssignedIdentity the userAssignedIdentity value to set. - * @return the IdentityForCmk object itself. - */ - public IdentityForCmk withUserAssignedIdentity(String userAssignedIdentity) { - this.userAssignedIdentity = userAssignedIdentity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("userAssignedIdentity", this.userAssignedIdentity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IdentityForCmk from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IdentityForCmk if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the IdentityForCmk. - */ - public static IdentityForCmk fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IdentityForCmk deserializedIdentityForCmk = new IdentityForCmk(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("userAssignedIdentity".equals(fieldName)) { - deserializedIdentityForCmk.userAssignedIdentity = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIdentityForCmk; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java deleted file mode 100644 index f47808eb5974..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * Describes the Image Specifications. - */ -@Fluent -public final class Image implements JsonSerializable { - /* - * Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images - */ - private ImageType type; - - /* - * Image reference - */ - private String reference; - - /* - * Describes the Image Specifications - */ - private Map additionalProperties; - - /** - * Creates an instance of Image class. - */ - public Image() { - } - - /** - * Get the type property: Type of the image. Possible values are: docker - For docker images. azureml - For AzureML - * images. - * - * @return the type value. - */ - public ImageType type() { - return this.type; - } - - /** - * Set the type property: Type of the image. Possible values are: docker - For docker images. azureml - For AzureML - * images. - * - * @param type the type value to set. - * @return the Image object itself. - */ - public Image withType(ImageType type) { - this.type = type; - return this; - } - - /** - * Get the reference property: Image reference. - * - * @return the reference value. - */ - public String reference() { - return this.reference; - } - - /** - * Set the reference property: Image reference. - * - * @param reference the reference value to set. - * @return the Image object itself. - */ - public Image withReference(String reference) { - this.reference = reference; - return this; - } - - /** - * Get the additionalProperties property: Describes the Image Specifications. - * - * @return the additionalProperties value. - */ - public Map additionalProperties() { - return this.additionalProperties; - } - - /** - * Set the additionalProperties property: Describes the Image Specifications. - * - * @param additionalProperties the additionalProperties value to set. - * @return the Image object itself. - */ - public Image withAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("reference", this.reference); - if (additionalProperties != null) { - for (Map.Entry additionalProperty : additionalProperties.entrySet()) { - jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); - } - } - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Image from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Image if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Image. - */ - public static Image fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Image deserializedImage = new Image(); - Map additionalProperties = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedImage.type = ImageType.fromString(reader.getString()); - } else if ("reference".equals(fieldName)) { - deserializedImage.reference = reader.getString(); - } else { - if (additionalProperties == null) { - additionalProperties = new LinkedHashMap<>(); - } - - additionalProperties.put(fieldName, reader.readUntyped()); - } - } - deserializedImage.additionalProperties = additionalProperties; - - return deserializedImage; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassification.java deleted file mode 100644 index fddff7e1c2c5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassification.java +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Image Classification. Multi-class image classification is used when an image is classified with only a single label - * from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. - */ -@Fluent -public final class ImageClassification extends AutoMLVertical { - /* - * [Required] Task type for AutoMLJob. - */ - private TaskType taskType = TaskType.IMAGE_CLASSIFICATION; - - /* - * Primary metric to optimize for this task. - */ - private ClassificationPrimaryMetrics primaryMetric; - - /* - * Settings used for training the model. - */ - private ImageModelSettingsClassification modelSettings; - - /* - * Search space for sampling different combinations of models and their hyperparameters. - */ - private List searchSpace; - - /* - * [Required] Limit settings for the AutoML job. - */ - private ImageLimitSettings limitSettings; - - /* - * Model sweeping and hyperparameter sweeping related settings. - */ - private ImageSweepSettings sweepSettings; - - /* - * Validation data inputs. - */ - private MLTableJobInput validationData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - private Double validationDataSize; - - /** - * Creates an instance of ImageClassification class. - */ - public ImageClassification() { - } - - /** - * Get the taskType property: [Required] Task type for AutoMLJob. - * - * @return the taskType value. - */ - @Override - public TaskType taskType() { - return this.taskType; - } - - /** - * Get the primaryMetric property: Primary metric to optimize for this task. - * - * @return the primaryMetric value. - */ - public ClassificationPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric to optimize for this task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the ImageClassification object itself. - */ - public ImageClassification withPrimaryMetric(ClassificationPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - - /** - * Get the modelSettings property: Settings used for training the model. - * - * @return the modelSettings value. - */ - public ImageModelSettingsClassification modelSettings() { - return this.modelSettings; - } - - /** - * Set the modelSettings property: Settings used for training the model. - * - * @param modelSettings the modelSettings value to set. - * @return the ImageClassification object itself. - */ - public ImageClassification withModelSettings(ImageModelSettingsClassification modelSettings) { - this.modelSettings = modelSettings; - return this; - } - - /** - * Get the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @return the searchSpace value. - */ - public List searchSpace() { - return this.searchSpace; - } - - /** - * Set the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @param searchSpace the searchSpace value to set. - * @return the ImageClassification object itself. - */ - public ImageClassification withSearchSpace(List searchSpace) { - this.searchSpace = searchSpace; - return this; - } - - /** - * Get the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @return the limitSettings value. - */ - public ImageLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @param limitSettings the limitSettings value to set. - * @return the ImageClassification object itself. - */ - public ImageClassification withLimitSettings(ImageLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @return the sweepSettings value. - */ - public ImageSweepSettings sweepSettings() { - return this.sweepSettings; - } - - /** - * Set the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @param sweepSettings the sweepSettings value to set. - * @return the ImageClassification object itself. - */ - public ImageClassification withSweepSettings(ImageSweepSettings sweepSettings) { - this.sweepSettings = sweepSettings; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the ImageClassification object itself. - */ - public ImageClassification withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the ImageClassification object itself. - */ - public ImageClassification withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageClassification withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageClassification withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageClassification withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - if (limitSettings() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property limitSettings in model ImageClassification")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageClassification.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("trainingData", trainingData()); - jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); - jsonWriter.writeStringField("targetColumnName", targetColumnName()); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); - jsonWriter.writeJsonField("modelSettings", this.modelSettings); - jsonWriter.writeArrayField("searchSpace", this.searchSpace, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("sweepSettings", this.sweepSettings); - jsonWriter.writeJsonField("validationData", this.validationData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageClassification from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageClassification if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ImageClassification. - */ - public static ImageClassification fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageClassification deserializedImageClassification = new ImageClassification(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("trainingData".equals(fieldName)) { - deserializedImageClassification.withTrainingData(MLTableJobInput.fromJson(reader)); - } else if ("logVerbosity".equals(fieldName)) { - deserializedImageClassification.withLogVerbosity(LogVerbosity.fromString(reader.getString())); - } else if ("targetColumnName".equals(fieldName)) { - deserializedImageClassification.withTargetColumnName(reader.getString()); - } else if ("limitSettings".equals(fieldName)) { - deserializedImageClassification.limitSettings = ImageLimitSettings.fromJson(reader); - } else if ("taskType".equals(fieldName)) { - deserializedImageClassification.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedImageClassification.primaryMetric - = ClassificationPrimaryMetrics.fromString(reader.getString()); - } else if ("modelSettings".equals(fieldName)) { - deserializedImageClassification.modelSettings = ImageModelSettingsClassification.fromJson(reader); - } else if ("searchSpace".equals(fieldName)) { - List searchSpace - = reader.readArray(reader1 -> ImageModelDistributionSettingsClassification.fromJson(reader1)); - deserializedImageClassification.searchSpace = searchSpace; - } else if ("sweepSettings".equals(fieldName)) { - deserializedImageClassification.sweepSettings = ImageSweepSettings.fromJson(reader); - } else if ("validationData".equals(fieldName)) { - deserializedImageClassification.validationData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedImageClassification.validationDataSize = reader.getNullable(JsonReader::getDouble); - } else { - reader.skipChildren(); - } - } - - return deserializedImageClassification; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationBase.java deleted file mode 100644 index 84339846a46f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationBase.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The ImageClassificationBase model. - */ -@Fluent -public class ImageClassificationBase extends ImageVertical { - /* - * Settings used for training the model. - */ - private ImageModelSettingsClassification modelSettings; - - /* - * Search space for sampling different combinations of models and their hyperparameters. - */ - private List searchSpace; - - /** - * Creates an instance of ImageClassificationBase class. - */ - public ImageClassificationBase() { - } - - /** - * Get the modelSettings property: Settings used for training the model. - * - * @return the modelSettings value. - */ - public ImageModelSettingsClassification modelSettings() { - return this.modelSettings; - } - - /** - * Set the modelSettings property: Settings used for training the model. - * - * @param modelSettings the modelSettings value to set. - * @return the ImageClassificationBase object itself. - */ - public ImageClassificationBase withModelSettings(ImageModelSettingsClassification modelSettings) { - this.modelSettings = modelSettings; - return this; - } - - /** - * Get the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @return the searchSpace value. - */ - public List searchSpace() { - return this.searchSpace; - } - - /** - * Set the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @param searchSpace the searchSpace value to set. - * @return the ImageClassificationBase object itself. - */ - public ImageClassificationBase withSearchSpace(List searchSpace) { - this.searchSpace = searchSpace; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageClassificationBase withLimitSettings(ImageLimitSettings limitSettings) { - super.withLimitSettings(limitSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageClassificationBase withSweepSettings(ImageSweepSettings sweepSettings) { - super.withSweepSettings(sweepSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageClassificationBase withValidationData(MLTableJobInput validationData) { - super.withValidationData(validationData); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageClassificationBase withValidationDataSize(Double validationDataSize) { - super.withValidationDataSize(validationDataSize); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("limitSettings", limitSettings()); - jsonWriter.writeJsonField("sweepSettings", sweepSettings()); - jsonWriter.writeJsonField("validationData", validationData()); - jsonWriter.writeNumberField("validationDataSize", validationDataSize()); - jsonWriter.writeJsonField("modelSettings", this.modelSettings); - jsonWriter.writeArrayField("searchSpace", this.searchSpace, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageClassificationBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageClassificationBase if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ImageClassificationBase. - */ - public static ImageClassificationBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageClassificationBase deserializedImageClassificationBase = new ImageClassificationBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("limitSettings".equals(fieldName)) { - deserializedImageClassificationBase.withLimitSettings(ImageLimitSettings.fromJson(reader)); - } else if ("sweepSettings".equals(fieldName)) { - deserializedImageClassificationBase.withSweepSettings(ImageSweepSettings.fromJson(reader)); - } else if ("validationData".equals(fieldName)) { - deserializedImageClassificationBase.withValidationData(MLTableJobInput.fromJson(reader)); - } else if ("validationDataSize".equals(fieldName)) { - deserializedImageClassificationBase - .withValidationDataSize(reader.getNullable(JsonReader::getDouble)); - } else if ("modelSettings".equals(fieldName)) { - deserializedImageClassificationBase.modelSettings - = ImageModelSettingsClassification.fromJson(reader); - } else if ("searchSpace".equals(fieldName)) { - List searchSpace - = reader.readArray(reader1 -> ImageModelDistributionSettingsClassification.fromJson(reader1)); - deserializedImageClassificationBase.searchSpace = searchSpace; - } else { - reader.skipChildren(); - } - } - - return deserializedImageClassificationBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationMultilabel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationMultilabel.java deleted file mode 100644 index b0f14d55141c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationMultilabel.java +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Image Classification Multilabel. Multi-label image classification is used when an image could have one or more labels - * from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. - */ -@Fluent -public final class ImageClassificationMultilabel extends AutoMLVertical { - /* - * [Required] Task type for AutoMLJob. - */ - private TaskType taskType = TaskType.IMAGE_CLASSIFICATION_MULTILABEL; - - /* - * Primary metric to optimize for this task. - */ - private ClassificationMultilabelPrimaryMetrics primaryMetric; - - /* - * Settings used for training the model. - */ - private ImageModelSettingsClassification modelSettings; - - /* - * Search space for sampling different combinations of models and their hyperparameters. - */ - private List searchSpace; - - /* - * [Required] Limit settings for the AutoML job. - */ - private ImageLimitSettings limitSettings; - - /* - * Model sweeping and hyperparameter sweeping related settings. - */ - private ImageSweepSettings sweepSettings; - - /* - * Validation data inputs. - */ - private MLTableJobInput validationData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - private Double validationDataSize; - - /** - * Creates an instance of ImageClassificationMultilabel class. - */ - public ImageClassificationMultilabel() { - } - - /** - * Get the taskType property: [Required] Task type for AutoMLJob. - * - * @return the taskType value. - */ - @Override - public TaskType taskType() { - return this.taskType; - } - - /** - * Get the primaryMetric property: Primary metric to optimize for this task. - * - * @return the primaryMetric value. - */ - public ClassificationMultilabelPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric to optimize for this task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the ImageClassificationMultilabel object itself. - */ - public ImageClassificationMultilabel withPrimaryMetric(ClassificationMultilabelPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - - /** - * Get the modelSettings property: Settings used for training the model. - * - * @return the modelSettings value. - */ - public ImageModelSettingsClassification modelSettings() { - return this.modelSettings; - } - - /** - * Set the modelSettings property: Settings used for training the model. - * - * @param modelSettings the modelSettings value to set. - * @return the ImageClassificationMultilabel object itself. - */ - public ImageClassificationMultilabel withModelSettings(ImageModelSettingsClassification modelSettings) { - this.modelSettings = modelSettings; - return this; - } - - /** - * Get the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @return the searchSpace value. - */ - public List searchSpace() { - return this.searchSpace; - } - - /** - * Set the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @param searchSpace the searchSpace value to set. - * @return the ImageClassificationMultilabel object itself. - */ - public ImageClassificationMultilabel - withSearchSpace(List searchSpace) { - this.searchSpace = searchSpace; - return this; - } - - /** - * Get the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @return the limitSettings value. - */ - public ImageLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @param limitSettings the limitSettings value to set. - * @return the ImageClassificationMultilabel object itself. - */ - public ImageClassificationMultilabel withLimitSettings(ImageLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @return the sweepSettings value. - */ - public ImageSweepSettings sweepSettings() { - return this.sweepSettings; - } - - /** - * Set the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @param sweepSettings the sweepSettings value to set. - * @return the ImageClassificationMultilabel object itself. - */ - public ImageClassificationMultilabel withSweepSettings(ImageSweepSettings sweepSettings) { - this.sweepSettings = sweepSettings; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the ImageClassificationMultilabel object itself. - */ - public ImageClassificationMultilabel withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the ImageClassificationMultilabel object itself. - */ - public ImageClassificationMultilabel withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageClassificationMultilabel withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageClassificationMultilabel withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - if (limitSettings() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property limitSettings in model ImageClassificationMultilabel")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageClassificationMultilabel.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("trainingData", trainingData()); - jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); - jsonWriter.writeStringField("targetColumnName", targetColumnName()); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); - jsonWriter.writeJsonField("modelSettings", this.modelSettings); - jsonWriter.writeArrayField("searchSpace", this.searchSpace, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("sweepSettings", this.sweepSettings); - jsonWriter.writeJsonField("validationData", this.validationData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageClassificationMultilabel from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageClassificationMultilabel if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ImageClassificationMultilabel. - */ - public static ImageClassificationMultilabel fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageClassificationMultilabel deserializedImageClassificationMultilabel - = new ImageClassificationMultilabel(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("trainingData".equals(fieldName)) { - deserializedImageClassificationMultilabel.withTrainingData(MLTableJobInput.fromJson(reader)); - } else if ("logVerbosity".equals(fieldName)) { - deserializedImageClassificationMultilabel - .withLogVerbosity(LogVerbosity.fromString(reader.getString())); - } else if ("targetColumnName".equals(fieldName)) { - deserializedImageClassificationMultilabel.withTargetColumnName(reader.getString()); - } else if ("limitSettings".equals(fieldName)) { - deserializedImageClassificationMultilabel.limitSettings = ImageLimitSettings.fromJson(reader); - } else if ("taskType".equals(fieldName)) { - deserializedImageClassificationMultilabel.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedImageClassificationMultilabel.primaryMetric - = ClassificationMultilabelPrimaryMetrics.fromString(reader.getString()); - } else if ("modelSettings".equals(fieldName)) { - deserializedImageClassificationMultilabel.modelSettings - = ImageModelSettingsClassification.fromJson(reader); - } else if ("searchSpace".equals(fieldName)) { - List searchSpace - = reader.readArray(reader1 -> ImageModelDistributionSettingsClassification.fromJson(reader1)); - deserializedImageClassificationMultilabel.searchSpace = searchSpace; - } else if ("sweepSettings".equals(fieldName)) { - deserializedImageClassificationMultilabel.sweepSettings = ImageSweepSettings.fromJson(reader); - } else if ("validationData".equals(fieldName)) { - deserializedImageClassificationMultilabel.validationData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedImageClassificationMultilabel.validationDataSize - = reader.getNullable(JsonReader::getDouble); - } else { - reader.skipChildren(); - } - } - - return deserializedImageClassificationMultilabel; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInstanceSegmentation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInstanceSegmentation.java deleted file mode 100644 index d393255a2ea1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInstanceSegmentation.java +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Image Instance Segmentation. Instance segmentation is used to identify objects in an image at the pixel level, - * drawing a polygon around each object in the image. - */ -@Fluent -public final class ImageInstanceSegmentation extends AutoMLVertical { - /* - * [Required] Task type for AutoMLJob. - */ - private TaskType taskType = TaskType.IMAGE_INSTANCE_SEGMENTATION; - - /* - * Primary metric to optimize for this task. - */ - private InstanceSegmentationPrimaryMetrics primaryMetric; - - /* - * Settings used for training the model. - */ - private ImageModelSettingsObjectDetection modelSettings; - - /* - * Search space for sampling different combinations of models and their hyperparameters. - */ - private List searchSpace; - - /* - * [Required] Limit settings for the AutoML job. - */ - private ImageLimitSettings limitSettings; - - /* - * Model sweeping and hyperparameter sweeping related settings. - */ - private ImageSweepSettings sweepSettings; - - /* - * Validation data inputs. - */ - private MLTableJobInput validationData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - private Double validationDataSize; - - /** - * Creates an instance of ImageInstanceSegmentation class. - */ - public ImageInstanceSegmentation() { - } - - /** - * Get the taskType property: [Required] Task type for AutoMLJob. - * - * @return the taskType value. - */ - @Override - public TaskType taskType() { - return this.taskType; - } - - /** - * Get the primaryMetric property: Primary metric to optimize for this task. - * - * @return the primaryMetric value. - */ - public InstanceSegmentationPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric to optimize for this task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the ImageInstanceSegmentation object itself. - */ - public ImageInstanceSegmentation withPrimaryMetric(InstanceSegmentationPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - - /** - * Get the modelSettings property: Settings used for training the model. - * - * @return the modelSettings value. - */ - public ImageModelSettingsObjectDetection modelSettings() { - return this.modelSettings; - } - - /** - * Set the modelSettings property: Settings used for training the model. - * - * @param modelSettings the modelSettings value to set. - * @return the ImageInstanceSegmentation object itself. - */ - public ImageInstanceSegmentation withModelSettings(ImageModelSettingsObjectDetection modelSettings) { - this.modelSettings = modelSettings; - return this; - } - - /** - * Get the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @return the searchSpace value. - */ - public List searchSpace() { - return this.searchSpace; - } - - /** - * Set the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @param searchSpace the searchSpace value to set. - * @return the ImageInstanceSegmentation object itself. - */ - public ImageInstanceSegmentation withSearchSpace(List searchSpace) { - this.searchSpace = searchSpace; - return this; - } - - /** - * Get the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @return the limitSettings value. - */ - public ImageLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @param limitSettings the limitSettings value to set. - * @return the ImageInstanceSegmentation object itself. - */ - public ImageInstanceSegmentation withLimitSettings(ImageLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @return the sweepSettings value. - */ - public ImageSweepSettings sweepSettings() { - return this.sweepSettings; - } - - /** - * Set the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @param sweepSettings the sweepSettings value to set. - * @return the ImageInstanceSegmentation object itself. - */ - public ImageInstanceSegmentation withSweepSettings(ImageSweepSettings sweepSettings) { - this.sweepSettings = sweepSettings; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the ImageInstanceSegmentation object itself. - */ - public ImageInstanceSegmentation withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the ImageInstanceSegmentation object itself. - */ - public ImageInstanceSegmentation withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageInstanceSegmentation withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageInstanceSegmentation withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageInstanceSegmentation withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - if (limitSettings() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property limitSettings in model ImageInstanceSegmentation")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageInstanceSegmentation.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("trainingData", trainingData()); - jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); - jsonWriter.writeStringField("targetColumnName", targetColumnName()); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); - jsonWriter.writeJsonField("modelSettings", this.modelSettings); - jsonWriter.writeArrayField("searchSpace", this.searchSpace, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("sweepSettings", this.sweepSettings); - jsonWriter.writeJsonField("validationData", this.validationData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageInstanceSegmentation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageInstanceSegmentation if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ImageInstanceSegmentation. - */ - public static ImageInstanceSegmentation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageInstanceSegmentation deserializedImageInstanceSegmentation = new ImageInstanceSegmentation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("trainingData".equals(fieldName)) { - deserializedImageInstanceSegmentation.withTrainingData(MLTableJobInput.fromJson(reader)); - } else if ("logVerbosity".equals(fieldName)) { - deserializedImageInstanceSegmentation.withLogVerbosity(LogVerbosity.fromString(reader.getString())); - } else if ("targetColumnName".equals(fieldName)) { - deserializedImageInstanceSegmentation.withTargetColumnName(reader.getString()); - } else if ("limitSettings".equals(fieldName)) { - deserializedImageInstanceSegmentation.limitSettings = ImageLimitSettings.fromJson(reader); - } else if ("taskType".equals(fieldName)) { - deserializedImageInstanceSegmentation.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedImageInstanceSegmentation.primaryMetric - = InstanceSegmentationPrimaryMetrics.fromString(reader.getString()); - } else if ("modelSettings".equals(fieldName)) { - deserializedImageInstanceSegmentation.modelSettings - = ImageModelSettingsObjectDetection.fromJson(reader); - } else if ("searchSpace".equals(fieldName)) { - List searchSpace - = reader.readArray(reader1 -> ImageModelDistributionSettingsObjectDetection.fromJson(reader1)); - deserializedImageInstanceSegmentation.searchSpace = searchSpace; - } else if ("sweepSettings".equals(fieldName)) { - deserializedImageInstanceSegmentation.sweepSettings = ImageSweepSettings.fromJson(reader); - } else if ("validationData".equals(fieldName)) { - deserializedImageInstanceSegmentation.validationData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedImageInstanceSegmentation.validationDataSize - = reader.getNullable(JsonReader::getDouble); - } else { - reader.skipChildren(); - } - } - - return deserializedImageInstanceSegmentation; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.java deleted file mode 100644 index b003370fed91..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; - -/** - * Limit settings for the AutoML job. - */ -@Fluent -public final class ImageLimitSettings implements JsonSerializable { - /* - * Maximum number of AutoML iterations. - */ - private Integer maxTrials; - - /* - * AutoML job timeout. - */ - private Duration timeout; - - /* - * Maximum number of concurrent AutoML iterations. - */ - private Integer maxConcurrentTrials; - - /** - * Creates an instance of ImageLimitSettings class. - */ - public ImageLimitSettings() { - } - - /** - * Get the maxTrials property: Maximum number of AutoML iterations. - * - * @return the maxTrials value. - */ - public Integer maxTrials() { - return this.maxTrials; - } - - /** - * Set the maxTrials property: Maximum number of AutoML iterations. - * - * @param maxTrials the maxTrials value to set. - * @return the ImageLimitSettings object itself. - */ - public ImageLimitSettings withMaxTrials(Integer maxTrials) { - this.maxTrials = maxTrials; - return this; - } - - /** - * Get the timeout property: AutoML job timeout. - * - * @return the timeout value. - */ - public Duration timeout() { - return this.timeout; - } - - /** - * Set the timeout property: AutoML job timeout. - * - * @param timeout the timeout value to set. - * @return the ImageLimitSettings object itself. - */ - public ImageLimitSettings withTimeout(Duration timeout) { - this.timeout = timeout; - return this; - } - - /** - * Get the maxConcurrentTrials property: Maximum number of concurrent AutoML iterations. - * - * @return the maxConcurrentTrials value. - */ - public Integer maxConcurrentTrials() { - return this.maxConcurrentTrials; - } - - /** - * Set the maxConcurrentTrials property: Maximum number of concurrent AutoML iterations. - * - * @param maxConcurrentTrials the maxConcurrentTrials value to set. - * @return the ImageLimitSettings object itself. - */ - public ImageLimitSettings withMaxConcurrentTrials(Integer maxConcurrentTrials) { - this.maxConcurrentTrials = maxConcurrentTrials; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("maxTrials", this.maxTrials); - jsonWriter.writeStringField("timeout", CoreUtils.durationToStringWithDays(this.timeout)); - jsonWriter.writeNumberField("maxConcurrentTrials", this.maxConcurrentTrials); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageLimitSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageLimitSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ImageLimitSettings. - */ - public static ImageLimitSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageLimitSettings deserializedImageLimitSettings = new ImageLimitSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxTrials".equals(fieldName)) { - deserializedImageLimitSettings.maxTrials = reader.getNullable(JsonReader::getInt); - } else if ("timeout".equals(fieldName)) { - deserializedImageLimitSettings.timeout - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("maxConcurrentTrials".equals(fieldName)) { - deserializedImageLimitSettings.maxConcurrentTrials = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedImageLimitSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.java deleted file mode 100644 index 751e4968480d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Returns metadata about the operating system image for this compute instance. - */ -@Fluent -public final class ImageMetadata implements JsonSerializable { - /* - * Specifies the current operating system image version this compute instance is running on. - */ - private String currentImageVersion; - - /* - * Specifies the latest available operating system image version. - */ - private String latestImageVersion; - - /* - * Specifies whether this compute instance is running on the latest operating system image. - */ - private Boolean isLatestOsImageVersion; - - /** - * Creates an instance of ImageMetadata class. - */ - public ImageMetadata() { - } - - /** - * Get the currentImageVersion property: Specifies the current operating system image version this compute instance - * is running on. - * - * @return the currentImageVersion value. - */ - public String currentImageVersion() { - return this.currentImageVersion; - } - - /** - * Set the currentImageVersion property: Specifies the current operating system image version this compute instance - * is running on. - * - * @param currentImageVersion the currentImageVersion value to set. - * @return the ImageMetadata object itself. - */ - public ImageMetadata withCurrentImageVersion(String currentImageVersion) { - this.currentImageVersion = currentImageVersion; - return this; - } - - /** - * Get the latestImageVersion property: Specifies the latest available operating system image version. - * - * @return the latestImageVersion value. - */ - public String latestImageVersion() { - return this.latestImageVersion; - } - - /** - * Set the latestImageVersion property: Specifies the latest available operating system image version. - * - * @param latestImageVersion the latestImageVersion value to set. - * @return the ImageMetadata object itself. - */ - public ImageMetadata withLatestImageVersion(String latestImageVersion) { - this.latestImageVersion = latestImageVersion; - return this; - } - - /** - * Get the isLatestOsImageVersion property: Specifies whether this compute instance is running on the latest - * operating system image. - * - * @return the isLatestOsImageVersion value. - */ - public Boolean isLatestOsImageVersion() { - return this.isLatestOsImageVersion; - } - - /** - * Set the isLatestOsImageVersion property: Specifies whether this compute instance is running on the latest - * operating system image. - * - * @param isLatestOsImageVersion the isLatestOsImageVersion value to set. - * @return the ImageMetadata object itself. - */ - public ImageMetadata withIsLatestOsImageVersion(Boolean isLatestOsImageVersion) { - this.isLatestOsImageVersion = isLatestOsImageVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("currentImageVersion", this.currentImageVersion); - jsonWriter.writeStringField("latestImageVersion", this.latestImageVersion); - jsonWriter.writeBooleanField("isLatestOsImageVersion", this.isLatestOsImageVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageMetadata from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageMetadata if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ImageMetadata. - */ - public static ImageMetadata fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageMetadata deserializedImageMetadata = new ImageMetadata(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("currentImageVersion".equals(fieldName)) { - deserializedImageMetadata.currentImageVersion = reader.getString(); - } else if ("latestImageVersion".equals(fieldName)) { - deserializedImageMetadata.latestImageVersion = reader.getString(); - } else if ("isLatestOsImageVersion".equals(fieldName)) { - deserializedImageMetadata.isLatestOsImageVersion = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedImageMetadata; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettings.java deleted file mode 100644 index 4963e43c01e7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettings.java +++ /dev/null @@ -1,912 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Distribution expressions to sweep over values of model settings. - * <example> - * Some examples are: - * ``` - * ModelName = "choice('seresnext', 'resnest50')"; - * LearningRate = "uniform(0.001, 0.01)"; - * LayersToFreeze = "choice(0, 2)"; - * ```</example> - * All distributions can be specified as distribution_name(min, max) or choice(val1, val2, ..., valn) - * where distribution name can be: uniform, quniform, loguniform, etc - * For more details on how to compose distribution expressions please check the documentation: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters - * For more information on the available settings please visit the official documentation: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - */ -@Fluent -public class ImageModelDistributionSettings implements JsonSerializable { - /* - * Enable AMSGrad when optimizer is 'adam' or 'adamw'. - */ - private String amsGradient; - - /* - * Settings for using Augmentations. - */ - private String augmentations; - - /* - * Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. - */ - private String beta1; - - /* - * Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. - */ - private String beta2; - - /* - * Whether to use distributer training. - */ - private String distributed; - - /* - * Enable early stopping logic during training. - */ - private String earlyStopping; - - /* - * Minimum number of epochs or validation evaluations to wait before primary metric improvement - * is tracked for early stopping. Must be a positive integer. - */ - private String earlyStoppingDelay; - - /* - * Minimum number of epochs or validation evaluations with no primary metric improvement before - * the run is stopped. Must be a positive integer. - */ - private String earlyStoppingPatience; - - /* - * Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. - */ - private String evaluationFrequency; - - /* - * Enable normalization when exporting ONNX model. - */ - private String enableOnnxNormalization; - - /* - * Gradient accumulation means running a configured number of "GradAccumulationStep" steps without - * updating the model weights while accumulating the gradients of those steps, and then using - * the accumulated gradients to compute the weight updates. Must be a positive integer. - */ - private String gradientAccumulationStep; - - /* - * Number of layers to freeze for the model. Must be a positive integer. - * For instance, passing 2 as value for 'seresnext' means - * freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please - * see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - */ - private String layersToFreeze; - - /* - * Initial learning rate. Must be a float in the range [0, 1]. - */ - private String learningRate; - - /* - * Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - */ - private String learningRateScheduler; - - /* - * Name of the model to use for training. - * For more information on the available models please visit the official documentation: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - */ - private String modelName; - - /* - * Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - */ - private String momentum; - - /* - * Enable nesterov when optimizer is 'sgd'. - */ - private String nesterov; - - /* - * Number of training epochs. Must be a positive integer. - */ - private String numberOfEpochs; - - /* - * Number of data loader workers. Must be a non-negative integer. - */ - private String numberOfWorkers; - - /* - * Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. - */ - private String optimizer; - - /* - * Random seed to be used when using deterministic training. - */ - private String randomSeed; - - /* - * Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. - */ - private String stepLRGamma; - - /* - * Value of step size when learning rate scheduler is 'step'. Must be a positive integer. - */ - private String stepLRStepSize; - - /* - * Training batch size. Must be a positive integer. - */ - private String trainingBatchSize; - - /* - * Validation batch size. Must be a positive integer. - */ - private String validationBatchSize; - - /* - * Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. - */ - private String warmupCosineLRCycles; - - /* - * Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. - */ - private String warmupCosineLRWarmupEpochs; - - /* - * Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. - */ - private String weightDecay; - - /** - * Creates an instance of ImageModelDistributionSettings class. - */ - public ImageModelDistributionSettings() { - } - - /** - * Get the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. - * - * @return the amsGradient value. - */ - public String amsGradient() { - return this.amsGradient; - } - - /** - * Set the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. - * - * @param amsGradient the amsGradient value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withAmsGradient(String amsGradient) { - this.amsGradient = amsGradient; - return this; - } - - /** - * Get the augmentations property: Settings for using Augmentations. - * - * @return the augmentations value. - */ - public String augmentations() { - return this.augmentations; - } - - /** - * Set the augmentations property: Settings for using Augmentations. - * - * @param augmentations the augmentations value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withAugmentations(String augmentations) { - this.augmentations = augmentations; - return this; - } - - /** - * Get the beta1 property: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, - * 1]. - * - * @return the beta1 value. - */ - public String beta1() { - return this.beta1; - } - - /** - * Set the beta1 property: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, - * 1]. - * - * @param beta1 the beta1 value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withBeta1(String beta1) { - this.beta1 = beta1; - return this; - } - - /** - * Get the beta2 property: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, - * 1]. - * - * @return the beta2 value. - */ - public String beta2() { - return this.beta2; - } - - /** - * Set the beta2 property: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, - * 1]. - * - * @param beta2 the beta2 value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withBeta2(String beta2) { - this.beta2 = beta2; - return this; - } - - /** - * Get the distributed property: Whether to use distributer training. - * - * @return the distributed value. - */ - public String distributed() { - return this.distributed; - } - - /** - * Set the distributed property: Whether to use distributer training. - * - * @param distributed the distributed value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withDistributed(String distributed) { - this.distributed = distributed; - return this; - } - - /** - * Get the earlyStopping property: Enable early stopping logic during training. - * - * @return the earlyStopping value. - */ - public String earlyStopping() { - return this.earlyStopping; - } - - /** - * Set the earlyStopping property: Enable early stopping logic during training. - * - * @param earlyStopping the earlyStopping value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withEarlyStopping(String earlyStopping) { - this.earlyStopping = earlyStopping; - return this; - } - - /** - * Get the earlyStoppingDelay property: Minimum number of epochs or validation evaluations to wait before primary - * metric improvement - * is tracked for early stopping. Must be a positive integer. - * - * @return the earlyStoppingDelay value. - */ - public String earlyStoppingDelay() { - return this.earlyStoppingDelay; - } - - /** - * Set the earlyStoppingDelay property: Minimum number of epochs or validation evaluations to wait before primary - * metric improvement - * is tracked for early stopping. Must be a positive integer. - * - * @param earlyStoppingDelay the earlyStoppingDelay value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withEarlyStoppingDelay(String earlyStoppingDelay) { - this.earlyStoppingDelay = earlyStoppingDelay; - return this; - } - - /** - * Get the earlyStoppingPatience property: Minimum number of epochs or validation evaluations with no primary metric - * improvement before - * the run is stopped. Must be a positive integer. - * - * @return the earlyStoppingPatience value. - */ - public String earlyStoppingPatience() { - return this.earlyStoppingPatience; - } - - /** - * Set the earlyStoppingPatience property: Minimum number of epochs or validation evaluations with no primary metric - * improvement before - * the run is stopped. Must be a positive integer. - * - * @param earlyStoppingPatience the earlyStoppingPatience value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withEarlyStoppingPatience(String earlyStoppingPatience) { - this.earlyStoppingPatience = earlyStoppingPatience; - return this; - } - - /** - * Get the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores. Must be a - * positive integer. - * - * @return the evaluationFrequency value. - */ - public String evaluationFrequency() { - return this.evaluationFrequency; - } - - /** - * Set the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores. Must be a - * positive integer. - * - * @param evaluationFrequency the evaluationFrequency value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withEvaluationFrequency(String evaluationFrequency) { - this.evaluationFrequency = evaluationFrequency; - return this; - } - - /** - * Get the enableOnnxNormalization property: Enable normalization when exporting ONNX model. - * - * @return the enableOnnxNormalization value. - */ - public String enableOnnxNormalization() { - return this.enableOnnxNormalization; - } - - /** - * Set the enableOnnxNormalization property: Enable normalization when exporting ONNX model. - * - * @param enableOnnxNormalization the enableOnnxNormalization value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withEnableOnnxNormalization(String enableOnnxNormalization) { - this.enableOnnxNormalization = enableOnnxNormalization; - return this; - } - - /** - * Get the gradientAccumulationStep property: Gradient accumulation means running a configured number of - * "GradAccumulationStep" steps without - * updating the model weights while accumulating the gradients of those steps, and then using - * the accumulated gradients to compute the weight updates. Must be a positive integer. - * - * @return the gradientAccumulationStep value. - */ - public String gradientAccumulationStep() { - return this.gradientAccumulationStep; - } - - /** - * Set the gradientAccumulationStep property: Gradient accumulation means running a configured number of - * "GradAccumulationStep" steps without - * updating the model weights while accumulating the gradients of those steps, and then using - * the accumulated gradients to compute the weight updates. Must be a positive integer. - * - * @param gradientAccumulationStep the gradientAccumulationStep value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withGradientAccumulationStep(String gradientAccumulationStep) { - this.gradientAccumulationStep = gradientAccumulationStep; - return this; - } - - /** - * Get the layersToFreeze property: Number of layers to freeze for the model. Must be a positive integer. - * For instance, passing 2 as value for 'seresnext' means - * freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please - * see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - * - * @return the layersToFreeze value. - */ - public String layersToFreeze() { - return this.layersToFreeze; - } - - /** - * Set the layersToFreeze property: Number of layers to freeze for the model. Must be a positive integer. - * For instance, passing 2 as value for 'seresnext' means - * freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please - * see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - * - * @param layersToFreeze the layersToFreeze value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withLayersToFreeze(String layersToFreeze) { - this.layersToFreeze = layersToFreeze; - return this; - } - - /** - * Get the learningRate property: Initial learning rate. Must be a float in the range [0, 1]. - * - * @return the learningRate value. - */ - public String learningRate() { - return this.learningRate; - } - - /** - * Set the learningRate property: Initial learning rate. Must be a float in the range [0, 1]. - * - * @param learningRate the learningRate value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withLearningRate(String learningRate) { - this.learningRate = learningRate; - return this; - } - - /** - * Get the learningRateScheduler property: Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - * - * @return the learningRateScheduler value. - */ - public String learningRateScheduler() { - return this.learningRateScheduler; - } - - /** - * Set the learningRateScheduler property: Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - * - * @param learningRateScheduler the learningRateScheduler value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withLearningRateScheduler(String learningRateScheduler) { - this.learningRateScheduler = learningRateScheduler; - return this; - } - - /** - * Get the modelName property: Name of the model to use for training. - * For more information on the available models please visit the official documentation: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - * - * @return the modelName value. - */ - public String modelName() { - return this.modelName; - } - - /** - * Set the modelName property: Name of the model to use for training. - * For more information on the available models please visit the official documentation: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - * - * @param modelName the modelName value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withModelName(String modelName) { - this.modelName = modelName; - return this; - } - - /** - * Get the momentum property: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - * - * @return the momentum value. - */ - public String momentum() { - return this.momentum; - } - - /** - * Set the momentum property: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - * - * @param momentum the momentum value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withMomentum(String momentum) { - this.momentum = momentum; - return this; - } - - /** - * Get the nesterov property: Enable nesterov when optimizer is 'sgd'. - * - * @return the nesterov value. - */ - public String nesterov() { - return this.nesterov; - } - - /** - * Set the nesterov property: Enable nesterov when optimizer is 'sgd'. - * - * @param nesterov the nesterov value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withNesterov(String nesterov) { - this.nesterov = nesterov; - return this; - } - - /** - * Get the numberOfEpochs property: Number of training epochs. Must be a positive integer. - * - * @return the numberOfEpochs value. - */ - public String numberOfEpochs() { - return this.numberOfEpochs; - } - - /** - * Set the numberOfEpochs property: Number of training epochs. Must be a positive integer. - * - * @param numberOfEpochs the numberOfEpochs value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withNumberOfEpochs(String numberOfEpochs) { - this.numberOfEpochs = numberOfEpochs; - return this; - } - - /** - * Get the numberOfWorkers property: Number of data loader workers. Must be a non-negative integer. - * - * @return the numberOfWorkers value. - */ - public String numberOfWorkers() { - return this.numberOfWorkers; - } - - /** - * Set the numberOfWorkers property: Number of data loader workers. Must be a non-negative integer. - * - * @param numberOfWorkers the numberOfWorkers value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withNumberOfWorkers(String numberOfWorkers) { - this.numberOfWorkers = numberOfWorkers; - return this; - } - - /** - * Get the optimizer property: Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. - * - * @return the optimizer value. - */ - public String optimizer() { - return this.optimizer; - } - - /** - * Set the optimizer property: Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. - * - * @param optimizer the optimizer value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withOptimizer(String optimizer) { - this.optimizer = optimizer; - return this; - } - - /** - * Get the randomSeed property: Random seed to be used when using deterministic training. - * - * @return the randomSeed value. - */ - public String randomSeed() { - return this.randomSeed; - } - - /** - * Set the randomSeed property: Random seed to be used when using deterministic training. - * - * @param randomSeed the randomSeed value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withRandomSeed(String randomSeed) { - this.randomSeed = randomSeed; - return this; - } - - /** - * Get the stepLRGamma property: Value of gamma when learning rate scheduler is 'step'. Must be a float in the range - * [0, 1]. - * - * @return the stepLRGamma value. - */ - public String stepLRGamma() { - return this.stepLRGamma; - } - - /** - * Set the stepLRGamma property: Value of gamma when learning rate scheduler is 'step'. Must be a float in the range - * [0, 1]. - * - * @param stepLRGamma the stepLRGamma value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withStepLRGamma(String stepLRGamma) { - this.stepLRGamma = stepLRGamma; - return this; - } - - /** - * Get the stepLRStepSize property: Value of step size when learning rate scheduler is 'step'. Must be a positive - * integer. - * - * @return the stepLRStepSize value. - */ - public String stepLRStepSize() { - return this.stepLRStepSize; - } - - /** - * Set the stepLRStepSize property: Value of step size when learning rate scheduler is 'step'. Must be a positive - * integer. - * - * @param stepLRStepSize the stepLRStepSize value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withStepLRStepSize(String stepLRStepSize) { - this.stepLRStepSize = stepLRStepSize; - return this; - } - - /** - * Get the trainingBatchSize property: Training batch size. Must be a positive integer. - * - * @return the trainingBatchSize value. - */ - public String trainingBatchSize() { - return this.trainingBatchSize; - } - - /** - * Set the trainingBatchSize property: Training batch size. Must be a positive integer. - * - * @param trainingBatchSize the trainingBatchSize value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withTrainingBatchSize(String trainingBatchSize) { - this.trainingBatchSize = trainingBatchSize; - return this; - } - - /** - * Get the validationBatchSize property: Validation batch size. Must be a positive integer. - * - * @return the validationBatchSize value. - */ - public String validationBatchSize() { - return this.validationBatchSize; - } - - /** - * Set the validationBatchSize property: Validation batch size. Must be a positive integer. - * - * @param validationBatchSize the validationBatchSize value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withValidationBatchSize(String validationBatchSize) { - this.validationBatchSize = validationBatchSize; - return this; - } - - /** - * Get the warmupCosineLRCycles property: Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. - * Must be a float in the range [0, 1]. - * - * @return the warmupCosineLRCycles value. - */ - public String warmupCosineLRCycles() { - return this.warmupCosineLRCycles; - } - - /** - * Set the warmupCosineLRCycles property: Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. - * Must be a float in the range [0, 1]. - * - * @param warmupCosineLRCycles the warmupCosineLRCycles value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withWarmupCosineLRCycles(String warmupCosineLRCycles) { - this.warmupCosineLRCycles = warmupCosineLRCycles; - return this; - } - - /** - * Get the warmupCosineLRWarmupEpochs property: Value of warmup epochs when learning rate scheduler is - * 'warmup_cosine'. Must be a positive integer. - * - * @return the warmupCosineLRWarmupEpochs value. - */ - public String warmupCosineLRWarmupEpochs() { - return this.warmupCosineLRWarmupEpochs; - } - - /** - * Set the warmupCosineLRWarmupEpochs property: Value of warmup epochs when learning rate scheduler is - * 'warmup_cosine'. Must be a positive integer. - * - * @param warmupCosineLRWarmupEpochs the warmupCosineLRWarmupEpochs value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withWarmupCosineLRWarmupEpochs(String warmupCosineLRWarmupEpochs) { - this.warmupCosineLRWarmupEpochs = warmupCosineLRWarmupEpochs; - return this; - } - - /** - * Get the weightDecay property: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float - * in the range[0, 1]. - * - * @return the weightDecay value. - */ - public String weightDecay() { - return this.weightDecay; - } - - /** - * Set the weightDecay property: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float - * in the range[0, 1]. - * - * @param weightDecay the weightDecay value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withWeightDecay(String weightDecay) { - this.weightDecay = weightDecay; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("amsGradient", this.amsGradient); - jsonWriter.writeStringField("augmentations", this.augmentations); - jsonWriter.writeStringField("beta1", this.beta1); - jsonWriter.writeStringField("beta2", this.beta2); - jsonWriter.writeStringField("distributed", this.distributed); - jsonWriter.writeStringField("earlyStopping", this.earlyStopping); - jsonWriter.writeStringField("earlyStoppingDelay", this.earlyStoppingDelay); - jsonWriter.writeStringField("earlyStoppingPatience", this.earlyStoppingPatience); - jsonWriter.writeStringField("evaluationFrequency", this.evaluationFrequency); - jsonWriter.writeStringField("enableOnnxNormalization", this.enableOnnxNormalization); - jsonWriter.writeStringField("gradientAccumulationStep", this.gradientAccumulationStep); - jsonWriter.writeStringField("layersToFreeze", this.layersToFreeze); - jsonWriter.writeStringField("learningRate", this.learningRate); - jsonWriter.writeStringField("learningRateScheduler", this.learningRateScheduler); - jsonWriter.writeStringField("modelName", this.modelName); - jsonWriter.writeStringField("momentum", this.momentum); - jsonWriter.writeStringField("nesterov", this.nesterov); - jsonWriter.writeStringField("numberOfEpochs", this.numberOfEpochs); - jsonWriter.writeStringField("numberOfWorkers", this.numberOfWorkers); - jsonWriter.writeStringField("optimizer", this.optimizer); - jsonWriter.writeStringField("randomSeed", this.randomSeed); - jsonWriter.writeStringField("stepLRGamma", this.stepLRGamma); - jsonWriter.writeStringField("stepLRStepSize", this.stepLRStepSize); - jsonWriter.writeStringField("trainingBatchSize", this.trainingBatchSize); - jsonWriter.writeStringField("validationBatchSize", this.validationBatchSize); - jsonWriter.writeStringField("warmupCosineLRCycles", this.warmupCosineLRCycles); - jsonWriter.writeStringField("warmupCosineLRWarmupEpochs", this.warmupCosineLRWarmupEpochs); - jsonWriter.writeStringField("weightDecay", this.weightDecay); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageModelDistributionSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageModelDistributionSettings if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ImageModelDistributionSettings. - */ - public static ImageModelDistributionSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageModelDistributionSettings deserializedImageModelDistributionSettings - = new ImageModelDistributionSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("amsGradient".equals(fieldName)) { - deserializedImageModelDistributionSettings.amsGradient = reader.getString(); - } else if ("augmentations".equals(fieldName)) { - deserializedImageModelDistributionSettings.augmentations = reader.getString(); - } else if ("beta1".equals(fieldName)) { - deserializedImageModelDistributionSettings.beta1 = reader.getString(); - } else if ("beta2".equals(fieldName)) { - deserializedImageModelDistributionSettings.beta2 = reader.getString(); - } else if ("distributed".equals(fieldName)) { - deserializedImageModelDistributionSettings.distributed = reader.getString(); - } else if ("earlyStopping".equals(fieldName)) { - deserializedImageModelDistributionSettings.earlyStopping = reader.getString(); - } else if ("earlyStoppingDelay".equals(fieldName)) { - deserializedImageModelDistributionSettings.earlyStoppingDelay = reader.getString(); - } else if ("earlyStoppingPatience".equals(fieldName)) { - deserializedImageModelDistributionSettings.earlyStoppingPatience = reader.getString(); - } else if ("evaluationFrequency".equals(fieldName)) { - deserializedImageModelDistributionSettings.evaluationFrequency = reader.getString(); - } else if ("enableOnnxNormalization".equals(fieldName)) { - deserializedImageModelDistributionSettings.enableOnnxNormalization = reader.getString(); - } else if ("gradientAccumulationStep".equals(fieldName)) { - deserializedImageModelDistributionSettings.gradientAccumulationStep = reader.getString(); - } else if ("layersToFreeze".equals(fieldName)) { - deserializedImageModelDistributionSettings.layersToFreeze = reader.getString(); - } else if ("learningRate".equals(fieldName)) { - deserializedImageModelDistributionSettings.learningRate = reader.getString(); - } else if ("learningRateScheduler".equals(fieldName)) { - deserializedImageModelDistributionSettings.learningRateScheduler = reader.getString(); - } else if ("modelName".equals(fieldName)) { - deserializedImageModelDistributionSettings.modelName = reader.getString(); - } else if ("momentum".equals(fieldName)) { - deserializedImageModelDistributionSettings.momentum = reader.getString(); - } else if ("nesterov".equals(fieldName)) { - deserializedImageModelDistributionSettings.nesterov = reader.getString(); - } else if ("numberOfEpochs".equals(fieldName)) { - deserializedImageModelDistributionSettings.numberOfEpochs = reader.getString(); - } else if ("numberOfWorkers".equals(fieldName)) { - deserializedImageModelDistributionSettings.numberOfWorkers = reader.getString(); - } else if ("optimizer".equals(fieldName)) { - deserializedImageModelDistributionSettings.optimizer = reader.getString(); - } else if ("randomSeed".equals(fieldName)) { - deserializedImageModelDistributionSettings.randomSeed = reader.getString(); - } else if ("stepLRGamma".equals(fieldName)) { - deserializedImageModelDistributionSettings.stepLRGamma = reader.getString(); - } else if ("stepLRStepSize".equals(fieldName)) { - deserializedImageModelDistributionSettings.stepLRStepSize = reader.getString(); - } else if ("trainingBatchSize".equals(fieldName)) { - deserializedImageModelDistributionSettings.trainingBatchSize = reader.getString(); - } else if ("validationBatchSize".equals(fieldName)) { - deserializedImageModelDistributionSettings.validationBatchSize = reader.getString(); - } else if ("warmupCosineLRCycles".equals(fieldName)) { - deserializedImageModelDistributionSettings.warmupCosineLRCycles = reader.getString(); - } else if ("warmupCosineLRWarmupEpochs".equals(fieldName)) { - deserializedImageModelDistributionSettings.warmupCosineLRWarmupEpochs = reader.getString(); - } else if ("weightDecay".equals(fieldName)) { - deserializedImageModelDistributionSettings.weightDecay = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedImageModelDistributionSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsClassification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsClassification.java deleted file mode 100644 index 5819ca1fa2d7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsClassification.java +++ /dev/null @@ -1,544 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Distribution expressions to sweep over values of model settings. - * <example> - * Some examples are: - * ``` - * ModelName = "choice('seresnext', 'resnest50')"; - * LearningRate = "uniform(0.001, 0.01)"; - * LayersToFreeze = "choice(0, 2)"; - * ```</example> - * For more details on how to compose distribution expressions please check the documentation: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters - * For more information on the available settings please visit the official documentation: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - */ -@Fluent -public final class ImageModelDistributionSettingsClassification extends ImageModelDistributionSettings { - /* - * Image crop size that is input to the neural network for the training dataset. Must be a positive integer. - */ - private String trainingCropSize; - - /* - * Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. - */ - private String validationCropSize; - - /* - * Image size to which to resize before cropping for validation dataset. Must be a positive integer. - */ - private String validationResizeSize; - - /* - * Weighted loss. The accepted values are 0 for no weighted loss. - * 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. - */ - private String weightedLoss; - - /** - * Creates an instance of ImageModelDistributionSettingsClassification class. - */ - public ImageModelDistributionSettingsClassification() { - } - - /** - * Get the trainingCropSize property: Image crop size that is input to the neural network for the training dataset. - * Must be a positive integer. - * - * @return the trainingCropSize value. - */ - public String trainingCropSize() { - return this.trainingCropSize; - } - - /** - * Set the trainingCropSize property: Image crop size that is input to the neural network for the training dataset. - * Must be a positive integer. - * - * @param trainingCropSize the trainingCropSize value to set. - * @return the ImageModelDistributionSettingsClassification object itself. - */ - public ImageModelDistributionSettingsClassification withTrainingCropSize(String trainingCropSize) { - this.trainingCropSize = trainingCropSize; - return this; - } - - /** - * Get the validationCropSize property: Image crop size that is input to the neural network for the validation - * dataset. Must be a positive integer. - * - * @return the validationCropSize value. - */ - public String validationCropSize() { - return this.validationCropSize; - } - - /** - * Set the validationCropSize property: Image crop size that is input to the neural network for the validation - * dataset. Must be a positive integer. - * - * @param validationCropSize the validationCropSize value to set. - * @return the ImageModelDistributionSettingsClassification object itself. - */ - public ImageModelDistributionSettingsClassification withValidationCropSize(String validationCropSize) { - this.validationCropSize = validationCropSize; - return this; - } - - /** - * Get the validationResizeSize property: Image size to which to resize before cropping for validation dataset. Must - * be a positive integer. - * - * @return the validationResizeSize value. - */ - public String validationResizeSize() { - return this.validationResizeSize; - } - - /** - * Set the validationResizeSize property: Image size to which to resize before cropping for validation dataset. Must - * be a positive integer. - * - * @param validationResizeSize the validationResizeSize value to set. - * @return the ImageModelDistributionSettingsClassification object itself. - */ - public ImageModelDistributionSettingsClassification withValidationResizeSize(String validationResizeSize) { - this.validationResizeSize = validationResizeSize; - return this; - } - - /** - * Get the weightedLoss property: Weighted loss. The accepted values are 0 for no weighted loss. - * 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. - * - * @return the weightedLoss value. - */ - public String weightedLoss() { - return this.weightedLoss; - } - - /** - * Set the weightedLoss property: Weighted loss. The accepted values are 0 for no weighted loss. - * 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. - * - * @param weightedLoss the weightedLoss value to set. - * @return the ImageModelDistributionSettingsClassification object itself. - */ - public ImageModelDistributionSettingsClassification withWeightedLoss(String weightedLoss) { - this.weightedLoss = weightedLoss; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withAmsGradient(String amsGradient) { - super.withAmsGradient(amsGradient); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withAugmentations(String augmentations) { - super.withAugmentations(augmentations); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withBeta1(String beta1) { - super.withBeta1(beta1); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withBeta2(String beta2) { - super.withBeta2(beta2); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withDistributed(String distributed) { - super.withDistributed(distributed); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withEarlyStopping(String earlyStopping) { - super.withEarlyStopping(earlyStopping); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withEarlyStoppingDelay(String earlyStoppingDelay) { - super.withEarlyStoppingDelay(earlyStoppingDelay); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withEarlyStoppingPatience(String earlyStoppingPatience) { - super.withEarlyStoppingPatience(earlyStoppingPatience); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withEvaluationFrequency(String evaluationFrequency) { - super.withEvaluationFrequency(evaluationFrequency); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withEnableOnnxNormalization(String enableOnnxNormalization) { - super.withEnableOnnxNormalization(enableOnnxNormalization); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withGradientAccumulationStep(String gradientAccumulationStep) { - super.withGradientAccumulationStep(gradientAccumulationStep); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withLayersToFreeze(String layersToFreeze) { - super.withLayersToFreeze(layersToFreeze); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withLearningRate(String learningRate) { - super.withLearningRate(learningRate); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withLearningRateScheduler(String learningRateScheduler) { - super.withLearningRateScheduler(learningRateScheduler); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withModelName(String modelName) { - super.withModelName(modelName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withMomentum(String momentum) { - super.withMomentum(momentum); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withNesterov(String nesterov) { - super.withNesterov(nesterov); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withNumberOfEpochs(String numberOfEpochs) { - super.withNumberOfEpochs(numberOfEpochs); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withNumberOfWorkers(String numberOfWorkers) { - super.withNumberOfWorkers(numberOfWorkers); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withOptimizer(String optimizer) { - super.withOptimizer(optimizer); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withRandomSeed(String randomSeed) { - super.withRandomSeed(randomSeed); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withStepLRGamma(String stepLRGamma) { - super.withStepLRGamma(stepLRGamma); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withStepLRStepSize(String stepLRStepSize) { - super.withStepLRStepSize(stepLRStepSize); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withTrainingBatchSize(String trainingBatchSize) { - super.withTrainingBatchSize(trainingBatchSize); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withValidationBatchSize(String validationBatchSize) { - super.withValidationBatchSize(validationBatchSize); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withWarmupCosineLRCycles(String warmupCosineLRCycles) { - super.withWarmupCosineLRCycles(warmupCosineLRCycles); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification - withWarmupCosineLRWarmupEpochs(String warmupCosineLRWarmupEpochs) { - super.withWarmupCosineLRWarmupEpochs(warmupCosineLRWarmupEpochs); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsClassification withWeightDecay(String weightDecay) { - super.withWeightDecay(weightDecay); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("amsGradient", amsGradient()); - jsonWriter.writeStringField("augmentations", augmentations()); - jsonWriter.writeStringField("beta1", beta1()); - jsonWriter.writeStringField("beta2", beta2()); - jsonWriter.writeStringField("distributed", distributed()); - jsonWriter.writeStringField("earlyStopping", earlyStopping()); - jsonWriter.writeStringField("earlyStoppingDelay", earlyStoppingDelay()); - jsonWriter.writeStringField("earlyStoppingPatience", earlyStoppingPatience()); - jsonWriter.writeStringField("evaluationFrequency", evaluationFrequency()); - jsonWriter.writeStringField("enableOnnxNormalization", enableOnnxNormalization()); - jsonWriter.writeStringField("gradientAccumulationStep", gradientAccumulationStep()); - jsonWriter.writeStringField("layersToFreeze", layersToFreeze()); - jsonWriter.writeStringField("learningRate", learningRate()); - jsonWriter.writeStringField("learningRateScheduler", learningRateScheduler()); - jsonWriter.writeStringField("modelName", modelName()); - jsonWriter.writeStringField("momentum", momentum()); - jsonWriter.writeStringField("nesterov", nesterov()); - jsonWriter.writeStringField("numberOfEpochs", numberOfEpochs()); - jsonWriter.writeStringField("numberOfWorkers", numberOfWorkers()); - jsonWriter.writeStringField("optimizer", optimizer()); - jsonWriter.writeStringField("randomSeed", randomSeed()); - jsonWriter.writeStringField("stepLRGamma", stepLRGamma()); - jsonWriter.writeStringField("stepLRStepSize", stepLRStepSize()); - jsonWriter.writeStringField("trainingBatchSize", trainingBatchSize()); - jsonWriter.writeStringField("validationBatchSize", validationBatchSize()); - jsonWriter.writeStringField("warmupCosineLRCycles", warmupCosineLRCycles()); - jsonWriter.writeStringField("warmupCosineLRWarmupEpochs", warmupCosineLRWarmupEpochs()); - jsonWriter.writeStringField("weightDecay", weightDecay()); - jsonWriter.writeStringField("trainingCropSize", this.trainingCropSize); - jsonWriter.writeStringField("validationCropSize", this.validationCropSize); - jsonWriter.writeStringField("validationResizeSize", this.validationResizeSize); - jsonWriter.writeStringField("weightedLoss", this.weightedLoss); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageModelDistributionSettingsClassification from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageModelDistributionSettingsClassification if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ImageModelDistributionSettingsClassification. - */ - public static ImageModelDistributionSettingsClassification fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageModelDistributionSettingsClassification deserializedImageModelDistributionSettingsClassification - = new ImageModelDistributionSettingsClassification(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("amsGradient".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withAmsGradient(reader.getString()); - } else if ("augmentations".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withAugmentations(reader.getString()); - } else if ("beta1".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withBeta1(reader.getString()); - } else if ("beta2".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withBeta2(reader.getString()); - } else if ("distributed".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withDistributed(reader.getString()); - } else if ("earlyStopping".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withEarlyStopping(reader.getString()); - } else if ("earlyStoppingDelay".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withEarlyStoppingDelay(reader.getString()); - } else if ("earlyStoppingPatience".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification - .withEarlyStoppingPatience(reader.getString()); - } else if ("evaluationFrequency".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification - .withEvaluationFrequency(reader.getString()); - } else if ("enableOnnxNormalization".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification - .withEnableOnnxNormalization(reader.getString()); - } else if ("gradientAccumulationStep".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification - .withGradientAccumulationStep(reader.getString()); - } else if ("layersToFreeze".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withLayersToFreeze(reader.getString()); - } else if ("learningRate".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withLearningRate(reader.getString()); - } else if ("learningRateScheduler".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification - .withLearningRateScheduler(reader.getString()); - } else if ("modelName".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withModelName(reader.getString()); - } else if ("momentum".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withMomentum(reader.getString()); - } else if ("nesterov".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withNesterov(reader.getString()); - } else if ("numberOfEpochs".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withNumberOfEpochs(reader.getString()); - } else if ("numberOfWorkers".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withNumberOfWorkers(reader.getString()); - } else if ("optimizer".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withOptimizer(reader.getString()); - } else if ("randomSeed".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withRandomSeed(reader.getString()); - } else if ("stepLRGamma".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withStepLRGamma(reader.getString()); - } else if ("stepLRStepSize".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withStepLRStepSize(reader.getString()); - } else if ("trainingBatchSize".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withTrainingBatchSize(reader.getString()); - } else if ("validationBatchSize".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification - .withValidationBatchSize(reader.getString()); - } else if ("warmupCosineLRCycles".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification - .withWarmupCosineLRCycles(reader.getString()); - } else if ("warmupCosineLRWarmupEpochs".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification - .withWarmupCosineLRWarmupEpochs(reader.getString()); - } else if ("weightDecay".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.withWeightDecay(reader.getString()); - } else if ("trainingCropSize".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.trainingCropSize = reader.getString(); - } else if ("validationCropSize".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.validationCropSize = reader.getString(); - } else if ("validationResizeSize".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.validationResizeSize = reader.getString(); - } else if ("weightedLoss".equals(fieldName)) { - deserializedImageModelDistributionSettingsClassification.weightedLoss = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedImageModelDistributionSettingsClassification; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsObjectDetection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsObjectDetection.java deleted file mode 100644 index 5d54819da955..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsObjectDetection.java +++ /dev/null @@ -1,860 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Distribution expressions to sweep over values of model settings. - * <example> - * Some examples are: - * ``` - * ModelName = "choice('seresnext', 'resnest50')"; - * LearningRate = "uniform(0.001, 0.01)"; - * LayersToFreeze = "choice(0, 2)"; - * ```</example> - * For more details on how to compose distribution expressions please check the documentation: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters - * For more information on the available settings please visit the official documentation: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - */ -@Fluent -public final class ImageModelDistributionSettingsObjectDetection extends ImageModelDistributionSettings { - /* - * Maximum number of detections per image, for all classes. Must be a positive integer. - * Note: This settings is not supported for the 'yolov5' algorithm. - */ - private String boxDetectionsPerImage; - - /* - * During inference, only return proposals with a classification score greater than - * BoxScoreThreshold. Must be a float in the range[0, 1]. - */ - private String boxScoreThreshold; - - /* - * Image size for train and validation. Must be a positive integer. - * Note: The training run may get into CUDA OOM if the size is too big. - * Note: This settings is only supported for the 'yolov5' algorithm. - */ - private String imageSize; - - /* - * Maximum size of the image to be rescaled before feeding it to the backbone. - * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. - * Note: This settings is not supported for the 'yolov5' algorithm. - */ - private String maxSize; - - /* - * Minimum size of the image to be rescaled before feeding it to the backbone. - * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. - * Note: This settings is not supported for the 'yolov5' algorithm. - */ - private String minSize; - - /* - * Model size. Must be 'small', 'medium', 'large', or 'xlarge'. - * Note: training run may get into CUDA OOM if the model size is too big. - * Note: This settings is only supported for the 'yolov5' algorithm. - */ - private String modelSize; - - /* - * Enable multi-scale image by varying image size by +/- 50%. - * Note: training run may get into CUDA OOM if no sufficient GPU memory. - * Note: This settings is only supported for the 'yolov5' algorithm. - */ - private String multiScale; - - /* - * IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1]. - */ - private String nmsIouThreshold; - - /* - * The grid size to use for tiling each image. Note: TileGridSize must not be - * None to enable small object detection logic. A string containing two integers in mxn format. - * Note: This settings is not supported for the 'yolov5' algorithm. - */ - private String tileGridSize; - - /* - * Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). - * Note: This settings is not supported for the 'yolov5' algorithm. - */ - private String tileOverlapRatio; - - /* - * The IOU threshold to use to perform NMS while merging predictions from tiles and image. - * Used in validation/ inference. Must be float in the range [0, 1]. - * Note: This settings is not supported for the 'yolov5' algorithm. - * NMS: Non-maximum suppression - */ - private String tilePredictionsNmsThreshold; - - /* - * IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. - */ - private String validationIouThreshold; - - /* - * Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'. - */ - private String validationMetricType; - - /** - * Creates an instance of ImageModelDistributionSettingsObjectDetection class. - */ - public ImageModelDistributionSettingsObjectDetection() { - } - - /** - * Get the boxDetectionsPerImage property: Maximum number of detections per image, for all classes. Must be a - * positive integer. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @return the boxDetectionsPerImage value. - */ - public String boxDetectionsPerImage() { - return this.boxDetectionsPerImage; - } - - /** - * Set the boxDetectionsPerImage property: Maximum number of detections per image, for all classes. Must be a - * positive integer. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @param boxDetectionsPerImage the boxDetectionsPerImage value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withBoxDetectionsPerImage(String boxDetectionsPerImage) { - this.boxDetectionsPerImage = boxDetectionsPerImage; - return this; - } - - /** - * Get the boxScoreThreshold property: During inference, only return proposals with a classification score greater - * than - * BoxScoreThreshold. Must be a float in the range[0, 1]. - * - * @return the boxScoreThreshold value. - */ - public String boxScoreThreshold() { - return this.boxScoreThreshold; - } - - /** - * Set the boxScoreThreshold property: During inference, only return proposals with a classification score greater - * than - * BoxScoreThreshold. Must be a float in the range[0, 1]. - * - * @param boxScoreThreshold the boxScoreThreshold value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withBoxScoreThreshold(String boxScoreThreshold) { - this.boxScoreThreshold = boxScoreThreshold; - return this; - } - - /** - * Get the imageSize property: Image size for train and validation. Must be a positive integer. - * Note: The training run may get into CUDA OOM if the size is too big. - * Note: This settings is only supported for the 'yolov5' algorithm. - * - * @return the imageSize value. - */ - public String imageSize() { - return this.imageSize; - } - - /** - * Set the imageSize property: Image size for train and validation. Must be a positive integer. - * Note: The training run may get into CUDA OOM if the size is too big. - * Note: This settings is only supported for the 'yolov5' algorithm. - * - * @param imageSize the imageSize value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withImageSize(String imageSize) { - this.imageSize = imageSize; - return this; - } - - /** - * Get the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. - * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @return the maxSize value. - */ - public String maxSize() { - return this.maxSize; - } - - /** - * Set the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. - * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @param maxSize the maxSize value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withMaxSize(String maxSize) { - this.maxSize = maxSize; - return this; - } - - /** - * Get the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. - * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @return the minSize value. - */ - public String minSize() { - return this.minSize; - } - - /** - * Set the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. - * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @param minSize the minSize value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withMinSize(String minSize) { - this.minSize = minSize; - return this; - } - - /** - * Get the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. - * Note: training run may get into CUDA OOM if the model size is too big. - * Note: This settings is only supported for the 'yolov5' algorithm. - * - * @return the modelSize value. - */ - public String modelSize() { - return this.modelSize; - } - - /** - * Set the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. - * Note: training run may get into CUDA OOM if the model size is too big. - * Note: This settings is only supported for the 'yolov5' algorithm. - * - * @param modelSize the modelSize value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withModelSize(String modelSize) { - this.modelSize = modelSize; - return this; - } - - /** - * Get the multiScale property: Enable multi-scale image by varying image size by +/- 50%. - * Note: training run may get into CUDA OOM if no sufficient GPU memory. - * Note: This settings is only supported for the 'yolov5' algorithm. - * - * @return the multiScale value. - */ - public String multiScale() { - return this.multiScale; - } - - /** - * Set the multiScale property: Enable multi-scale image by varying image size by +/- 50%. - * Note: training run may get into CUDA OOM if no sufficient GPU memory. - * Note: This settings is only supported for the 'yolov5' algorithm. - * - * @param multiScale the multiScale value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withMultiScale(String multiScale) { - this.multiScale = multiScale; - return this; - } - - /** - * Get the nmsIouThreshold property: IOU threshold used during inference in NMS post processing. Must be float in - * the range [0, 1]. - * - * @return the nmsIouThreshold value. - */ - public String nmsIouThreshold() { - return this.nmsIouThreshold; - } - - /** - * Set the nmsIouThreshold property: IOU threshold used during inference in NMS post processing. Must be float in - * the range [0, 1]. - * - * @param nmsIouThreshold the nmsIouThreshold value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withNmsIouThreshold(String nmsIouThreshold) { - this.nmsIouThreshold = nmsIouThreshold; - return this; - } - - /** - * Get the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be - * None to enable small object detection logic. A string containing two integers in mxn format. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @return the tileGridSize value. - */ - public String tileGridSize() { - return this.tileGridSize; - } - - /** - * Set the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be - * None to enable small object detection logic. A string containing two integers in mxn format. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @param tileGridSize the tileGridSize value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withTileGridSize(String tileGridSize) { - this.tileGridSize = tileGridSize; - return this; - } - - /** - * Get the tileOverlapRatio property: Overlap ratio between adjacent tiles in each dimension. Must be float in the - * range [0, 1). - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @return the tileOverlapRatio value. - */ - public String tileOverlapRatio() { - return this.tileOverlapRatio; - } - - /** - * Set the tileOverlapRatio property: Overlap ratio between adjacent tiles in each dimension. Must be float in the - * range [0, 1). - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @param tileOverlapRatio the tileOverlapRatio value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withTileOverlapRatio(String tileOverlapRatio) { - this.tileOverlapRatio = tileOverlapRatio; - return this; - } - - /** - * Get the tilePredictionsNmsThreshold property: The IOU threshold to use to perform NMS while merging predictions - * from tiles and image. - * Used in validation/ inference. Must be float in the range [0, 1]. - * Note: This settings is not supported for the 'yolov5' algorithm. - * NMS: Non-maximum suppression. - * - * @return the tilePredictionsNmsThreshold value. - */ - public String tilePredictionsNmsThreshold() { - return this.tilePredictionsNmsThreshold; - } - - /** - * Set the tilePredictionsNmsThreshold property: The IOU threshold to use to perform NMS while merging predictions - * from tiles and image. - * Used in validation/ inference. Must be float in the range [0, 1]. - * Note: This settings is not supported for the 'yolov5' algorithm. - * NMS: Non-maximum suppression. - * - * @param tilePredictionsNmsThreshold the tilePredictionsNmsThreshold value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection - withTilePredictionsNmsThreshold(String tilePredictionsNmsThreshold) { - this.tilePredictionsNmsThreshold = tilePredictionsNmsThreshold; - return this; - } - - /** - * Get the validationIouThreshold property: IOU threshold to use when computing validation metric. Must be float in - * the range [0, 1]. - * - * @return the validationIouThreshold value. - */ - public String validationIouThreshold() { - return this.validationIouThreshold; - } - - /** - * Set the validationIouThreshold property: IOU threshold to use when computing validation metric. Must be float in - * the range [0, 1]. - * - * @param validationIouThreshold the validationIouThreshold value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withValidationIouThreshold(String validationIouThreshold) { - this.validationIouThreshold = validationIouThreshold; - return this; - } - - /** - * Get the validationMetricType property: Metric computation method to use for validation metrics. Must be 'none', - * 'coco', 'voc', or 'coco_voc'. - * - * @return the validationMetricType value. - */ - public String validationMetricType() { - return this.validationMetricType; - } - - /** - * Set the validationMetricType property: Metric computation method to use for validation metrics. Must be 'none', - * 'coco', 'voc', or 'coco_voc'. - * - * @param validationMetricType the validationMetricType value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withValidationMetricType(String validationMetricType) { - this.validationMetricType = validationMetricType; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withAmsGradient(String amsGradient) { - super.withAmsGradient(amsGradient); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withAugmentations(String augmentations) { - super.withAugmentations(augmentations); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withBeta1(String beta1) { - super.withBeta1(beta1); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withBeta2(String beta2) { - super.withBeta2(beta2); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withDistributed(String distributed) { - super.withDistributed(distributed); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withEarlyStopping(String earlyStopping) { - super.withEarlyStopping(earlyStopping); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withEarlyStoppingDelay(String earlyStoppingDelay) { - super.withEarlyStoppingDelay(earlyStoppingDelay); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withEarlyStoppingPatience(String earlyStoppingPatience) { - super.withEarlyStoppingPatience(earlyStoppingPatience); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withEvaluationFrequency(String evaluationFrequency) { - super.withEvaluationFrequency(evaluationFrequency); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withEnableOnnxNormalization(String enableOnnxNormalization) { - super.withEnableOnnxNormalization(enableOnnxNormalization); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withGradientAccumulationStep(String gradientAccumulationStep) { - super.withGradientAccumulationStep(gradientAccumulationStep); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withLayersToFreeze(String layersToFreeze) { - super.withLayersToFreeze(layersToFreeze); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withLearningRate(String learningRate) { - super.withLearningRate(learningRate); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withLearningRateScheduler(String learningRateScheduler) { - super.withLearningRateScheduler(learningRateScheduler); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withModelName(String modelName) { - super.withModelName(modelName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withMomentum(String momentum) { - super.withMomentum(momentum); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withNesterov(String nesterov) { - super.withNesterov(nesterov); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withNumberOfEpochs(String numberOfEpochs) { - super.withNumberOfEpochs(numberOfEpochs); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withNumberOfWorkers(String numberOfWorkers) { - super.withNumberOfWorkers(numberOfWorkers); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withOptimizer(String optimizer) { - super.withOptimizer(optimizer); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withRandomSeed(String randomSeed) { - super.withRandomSeed(randomSeed); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withStepLRGamma(String stepLRGamma) { - super.withStepLRGamma(stepLRGamma); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withStepLRStepSize(String stepLRStepSize) { - super.withStepLRStepSize(stepLRStepSize); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withTrainingBatchSize(String trainingBatchSize) { - super.withTrainingBatchSize(trainingBatchSize); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withValidationBatchSize(String validationBatchSize) { - super.withValidationBatchSize(validationBatchSize); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withWarmupCosineLRCycles(String warmupCosineLRCycles) { - super.withWarmupCosineLRCycles(warmupCosineLRCycles); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection - withWarmupCosineLRWarmupEpochs(String warmupCosineLRWarmupEpochs) { - super.withWarmupCosineLRWarmupEpochs(warmupCosineLRWarmupEpochs); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelDistributionSettingsObjectDetection withWeightDecay(String weightDecay) { - super.withWeightDecay(weightDecay); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("amsGradient", amsGradient()); - jsonWriter.writeStringField("augmentations", augmentations()); - jsonWriter.writeStringField("beta1", beta1()); - jsonWriter.writeStringField("beta2", beta2()); - jsonWriter.writeStringField("distributed", distributed()); - jsonWriter.writeStringField("earlyStopping", earlyStopping()); - jsonWriter.writeStringField("earlyStoppingDelay", earlyStoppingDelay()); - jsonWriter.writeStringField("earlyStoppingPatience", earlyStoppingPatience()); - jsonWriter.writeStringField("evaluationFrequency", evaluationFrequency()); - jsonWriter.writeStringField("enableOnnxNormalization", enableOnnxNormalization()); - jsonWriter.writeStringField("gradientAccumulationStep", gradientAccumulationStep()); - jsonWriter.writeStringField("layersToFreeze", layersToFreeze()); - jsonWriter.writeStringField("learningRate", learningRate()); - jsonWriter.writeStringField("learningRateScheduler", learningRateScheduler()); - jsonWriter.writeStringField("modelName", modelName()); - jsonWriter.writeStringField("momentum", momentum()); - jsonWriter.writeStringField("nesterov", nesterov()); - jsonWriter.writeStringField("numberOfEpochs", numberOfEpochs()); - jsonWriter.writeStringField("numberOfWorkers", numberOfWorkers()); - jsonWriter.writeStringField("optimizer", optimizer()); - jsonWriter.writeStringField("randomSeed", randomSeed()); - jsonWriter.writeStringField("stepLRGamma", stepLRGamma()); - jsonWriter.writeStringField("stepLRStepSize", stepLRStepSize()); - jsonWriter.writeStringField("trainingBatchSize", trainingBatchSize()); - jsonWriter.writeStringField("validationBatchSize", validationBatchSize()); - jsonWriter.writeStringField("warmupCosineLRCycles", warmupCosineLRCycles()); - jsonWriter.writeStringField("warmupCosineLRWarmupEpochs", warmupCosineLRWarmupEpochs()); - jsonWriter.writeStringField("weightDecay", weightDecay()); - jsonWriter.writeStringField("boxDetectionsPerImage", this.boxDetectionsPerImage); - jsonWriter.writeStringField("boxScoreThreshold", this.boxScoreThreshold); - jsonWriter.writeStringField("imageSize", this.imageSize); - jsonWriter.writeStringField("maxSize", this.maxSize); - jsonWriter.writeStringField("minSize", this.minSize); - jsonWriter.writeStringField("modelSize", this.modelSize); - jsonWriter.writeStringField("multiScale", this.multiScale); - jsonWriter.writeStringField("nmsIouThreshold", this.nmsIouThreshold); - jsonWriter.writeStringField("tileGridSize", this.tileGridSize); - jsonWriter.writeStringField("tileOverlapRatio", this.tileOverlapRatio); - jsonWriter.writeStringField("tilePredictionsNmsThreshold", this.tilePredictionsNmsThreshold); - jsonWriter.writeStringField("validationIouThreshold", this.validationIouThreshold); - jsonWriter.writeStringField("validationMetricType", this.validationMetricType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageModelDistributionSettingsObjectDetection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageModelDistributionSettingsObjectDetection if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ImageModelDistributionSettingsObjectDetection. - */ - public static ImageModelDistributionSettingsObjectDetection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageModelDistributionSettingsObjectDetection deserializedImageModelDistributionSettingsObjectDetection - = new ImageModelDistributionSettingsObjectDetection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("amsGradient".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withAmsGradient(reader.getString()); - } else if ("augmentations".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withAugmentations(reader.getString()); - } else if ("beta1".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withBeta1(reader.getString()); - } else if ("beta2".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withBeta2(reader.getString()); - } else if ("distributed".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withDistributed(reader.getString()); - } else if ("earlyStopping".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withEarlyStopping(reader.getString()); - } else if ("earlyStoppingDelay".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection - .withEarlyStoppingDelay(reader.getString()); - } else if ("earlyStoppingPatience".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection - .withEarlyStoppingPatience(reader.getString()); - } else if ("evaluationFrequency".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection - .withEvaluationFrequency(reader.getString()); - } else if ("enableOnnxNormalization".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection - .withEnableOnnxNormalization(reader.getString()); - } else if ("gradientAccumulationStep".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection - .withGradientAccumulationStep(reader.getString()); - } else if ("layersToFreeze".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withLayersToFreeze(reader.getString()); - } else if ("learningRate".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withLearningRate(reader.getString()); - } else if ("learningRateScheduler".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection - .withLearningRateScheduler(reader.getString()); - } else if ("modelName".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withModelName(reader.getString()); - } else if ("momentum".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withMomentum(reader.getString()); - } else if ("nesterov".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withNesterov(reader.getString()); - } else if ("numberOfEpochs".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withNumberOfEpochs(reader.getString()); - } else if ("numberOfWorkers".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withNumberOfWorkers(reader.getString()); - } else if ("optimizer".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withOptimizer(reader.getString()); - } else if ("randomSeed".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withRandomSeed(reader.getString()); - } else if ("stepLRGamma".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withStepLRGamma(reader.getString()); - } else if ("stepLRStepSize".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withStepLRStepSize(reader.getString()); - } else if ("trainingBatchSize".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withTrainingBatchSize(reader.getString()); - } else if ("validationBatchSize".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection - .withValidationBatchSize(reader.getString()); - } else if ("warmupCosineLRCycles".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection - .withWarmupCosineLRCycles(reader.getString()); - } else if ("warmupCosineLRWarmupEpochs".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection - .withWarmupCosineLRWarmupEpochs(reader.getString()); - } else if ("weightDecay".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.withWeightDecay(reader.getString()); - } else if ("boxDetectionsPerImage".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.boxDetectionsPerImage - = reader.getString(); - } else if ("boxScoreThreshold".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.boxScoreThreshold = reader.getString(); - } else if ("imageSize".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.imageSize = reader.getString(); - } else if ("maxSize".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.maxSize = reader.getString(); - } else if ("minSize".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.minSize = reader.getString(); - } else if ("modelSize".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.modelSize = reader.getString(); - } else if ("multiScale".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.multiScale = reader.getString(); - } else if ("nmsIouThreshold".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.nmsIouThreshold = reader.getString(); - } else if ("tileGridSize".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.tileGridSize = reader.getString(); - } else if ("tileOverlapRatio".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.tileOverlapRatio = reader.getString(); - } else if ("tilePredictionsNmsThreshold".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.tilePredictionsNmsThreshold - = reader.getString(); - } else if ("validationIouThreshold".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.validationIouThreshold - = reader.getString(); - } else if ("validationMetricType".equals(fieldName)) { - deserializedImageModelDistributionSettingsObjectDetection.validationMetricType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedImageModelDistributionSettingsObjectDetection; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettings.java deleted file mode 100644 index 54f1b0eab68b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettings.java +++ /dev/null @@ -1,1019 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Settings used for training the model. - * For more information on the available settings please visit the official documentation: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - */ -@Fluent -public class ImageModelSettings implements JsonSerializable { - /* - * Enable AMSGrad when optimizer is 'adam' or 'adamw'. - */ - private Boolean amsGradient; - - /* - * Settings for advanced scenarios. - */ - private String advancedSettings; - - /* - * Settings for using Augmentations. - */ - private String augmentations; - - /* - * Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. - */ - private Float beta1; - - /* - * Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. - */ - private Float beta2; - - /* - * Frequency to store model checkpoints. Must be a positive integer. - */ - private Integer checkpointFrequency; - - /* - * The id of a previous run that has a pretrained checkpoint for incremental training. - */ - private String checkpointRunId; - - /* - * The pretrained checkpoint model for incremental training. - */ - private MLFlowModelJobInput checkpointModel; - - /* - * Whether to use distributed training. - */ - private Boolean distributed; - - /* - * Enable early stopping logic during training. - */ - private Boolean earlyStopping; - - /* - * Minimum number of epochs or validation evaluations to wait before primary metric improvement - * is tracked for early stopping. Must be a positive integer. - */ - private Integer earlyStoppingDelay; - - /* - * Minimum number of epochs or validation evaluations with no primary metric improvement before - * the run is stopped. Must be a positive integer. - */ - private Integer earlyStoppingPatience; - - /* - * Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. - */ - private Integer evaluationFrequency; - - /* - * Enable normalization when exporting ONNX model. - */ - private Boolean enableOnnxNormalization; - - /* - * Gradient accumulation means running a configured number of "GradAccumulationStep" steps without - * updating the model weights while accumulating the gradients of those steps, and then using - * the accumulated gradients to compute the weight updates. Must be a positive integer. - */ - private Integer gradientAccumulationStep; - - /* - * Number of layers to freeze for the model. Must be a positive integer. - * For instance, passing 2 as value for 'seresnext' means - * freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please - * see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - */ - private Integer layersToFreeze; - - /* - * Initial learning rate. Must be a float in the range [0, 1]. - */ - private Float learningRate; - - /* - * Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - */ - private LearningRateScheduler learningRateScheduler; - - /* - * Name of the model to use for training. - * For more information on the available models please visit the official documentation: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - */ - private String modelName; - - /* - * Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - */ - private Float momentum; - - /* - * Enable nesterov when optimizer is 'sgd'. - */ - private Boolean nesterov; - - /* - * Number of training epochs. Must be a positive integer. - */ - private Integer numberOfEpochs; - - /* - * Number of data loader workers. Must be a non-negative integer. - */ - private Integer numberOfWorkers; - - /* - * Type of optimizer. - */ - private StochasticOptimizer optimizer; - - /* - * Random seed to be used when using deterministic training. - */ - private Integer randomSeed; - - /* - * Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. - */ - private Float stepLRGamma; - - /* - * Value of step size when learning rate scheduler is 'step'. Must be a positive integer. - */ - private Integer stepLRStepSize; - - /* - * Training batch size. Must be a positive integer. - */ - private Integer trainingBatchSize; - - /* - * Validation batch size. Must be a positive integer. - */ - private Integer validationBatchSize; - - /* - * Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. - */ - private Float warmupCosineLRCycles; - - /* - * Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. - */ - private Integer warmupCosineLRWarmupEpochs; - - /* - * Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. - */ - private Float weightDecay; - - /** - * Creates an instance of ImageModelSettings class. - */ - public ImageModelSettings() { - } - - /** - * Get the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. - * - * @return the amsGradient value. - */ - public Boolean amsGradient() { - return this.amsGradient; - } - - /** - * Set the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. - * - * @param amsGradient the amsGradient value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withAmsGradient(Boolean amsGradient) { - this.amsGradient = amsGradient; - return this; - } - - /** - * Get the advancedSettings property: Settings for advanced scenarios. - * - * @return the advancedSettings value. - */ - public String advancedSettings() { - return this.advancedSettings; - } - - /** - * Set the advancedSettings property: Settings for advanced scenarios. - * - * @param advancedSettings the advancedSettings value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withAdvancedSettings(String advancedSettings) { - this.advancedSettings = advancedSettings; - return this; - } - - /** - * Get the augmentations property: Settings for using Augmentations. - * - * @return the augmentations value. - */ - public String augmentations() { - return this.augmentations; - } - - /** - * Set the augmentations property: Settings for using Augmentations. - * - * @param augmentations the augmentations value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withAugmentations(String augmentations) { - this.augmentations = augmentations; - return this; - } - - /** - * Get the beta1 property: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, - * 1]. - * - * @return the beta1 value. - */ - public Float beta1() { - return this.beta1; - } - - /** - * Set the beta1 property: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, - * 1]. - * - * @param beta1 the beta1 value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withBeta1(Float beta1) { - this.beta1 = beta1; - return this; - } - - /** - * Get the beta2 property: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, - * 1]. - * - * @return the beta2 value. - */ - public Float beta2() { - return this.beta2; - } - - /** - * Set the beta2 property: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, - * 1]. - * - * @param beta2 the beta2 value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withBeta2(Float beta2) { - this.beta2 = beta2; - return this; - } - - /** - * Get the checkpointFrequency property: Frequency to store model checkpoints. Must be a positive integer. - * - * @return the checkpointFrequency value. - */ - public Integer checkpointFrequency() { - return this.checkpointFrequency; - } - - /** - * Set the checkpointFrequency property: Frequency to store model checkpoints. Must be a positive integer. - * - * @param checkpointFrequency the checkpointFrequency value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withCheckpointFrequency(Integer checkpointFrequency) { - this.checkpointFrequency = checkpointFrequency; - return this; - } - - /** - * Get the checkpointRunId property: The id of a previous run that has a pretrained checkpoint for incremental - * training. - * - * @return the checkpointRunId value. - */ - public String checkpointRunId() { - return this.checkpointRunId; - } - - /** - * Set the checkpointRunId property: The id of a previous run that has a pretrained checkpoint for incremental - * training. - * - * @param checkpointRunId the checkpointRunId value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withCheckpointRunId(String checkpointRunId) { - this.checkpointRunId = checkpointRunId; - return this; - } - - /** - * Get the checkpointModel property: The pretrained checkpoint model for incremental training. - * - * @return the checkpointModel value. - */ - public MLFlowModelJobInput checkpointModel() { - return this.checkpointModel; - } - - /** - * Set the checkpointModel property: The pretrained checkpoint model for incremental training. - * - * @param checkpointModel the checkpointModel value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withCheckpointModel(MLFlowModelJobInput checkpointModel) { - this.checkpointModel = checkpointModel; - return this; - } - - /** - * Get the distributed property: Whether to use distributed training. - * - * @return the distributed value. - */ - public Boolean distributed() { - return this.distributed; - } - - /** - * Set the distributed property: Whether to use distributed training. - * - * @param distributed the distributed value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withDistributed(Boolean distributed) { - this.distributed = distributed; - return this; - } - - /** - * Get the earlyStopping property: Enable early stopping logic during training. - * - * @return the earlyStopping value. - */ - public Boolean earlyStopping() { - return this.earlyStopping; - } - - /** - * Set the earlyStopping property: Enable early stopping logic during training. - * - * @param earlyStopping the earlyStopping value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withEarlyStopping(Boolean earlyStopping) { - this.earlyStopping = earlyStopping; - return this; - } - - /** - * Get the earlyStoppingDelay property: Minimum number of epochs or validation evaluations to wait before primary - * metric improvement - * is tracked for early stopping. Must be a positive integer. - * - * @return the earlyStoppingDelay value. - */ - public Integer earlyStoppingDelay() { - return this.earlyStoppingDelay; - } - - /** - * Set the earlyStoppingDelay property: Minimum number of epochs or validation evaluations to wait before primary - * metric improvement - * is tracked for early stopping. Must be a positive integer. - * - * @param earlyStoppingDelay the earlyStoppingDelay value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withEarlyStoppingDelay(Integer earlyStoppingDelay) { - this.earlyStoppingDelay = earlyStoppingDelay; - return this; - } - - /** - * Get the earlyStoppingPatience property: Minimum number of epochs or validation evaluations with no primary metric - * improvement before - * the run is stopped. Must be a positive integer. - * - * @return the earlyStoppingPatience value. - */ - public Integer earlyStoppingPatience() { - return this.earlyStoppingPatience; - } - - /** - * Set the earlyStoppingPatience property: Minimum number of epochs or validation evaluations with no primary metric - * improvement before - * the run is stopped. Must be a positive integer. - * - * @param earlyStoppingPatience the earlyStoppingPatience value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withEarlyStoppingPatience(Integer earlyStoppingPatience) { - this.earlyStoppingPatience = earlyStoppingPatience; - return this; - } - - /** - * Get the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores. Must be a - * positive integer. - * - * @return the evaluationFrequency value. - */ - public Integer evaluationFrequency() { - return this.evaluationFrequency; - } - - /** - * Set the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores. Must be a - * positive integer. - * - * @param evaluationFrequency the evaluationFrequency value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withEvaluationFrequency(Integer evaluationFrequency) { - this.evaluationFrequency = evaluationFrequency; - return this; - } - - /** - * Get the enableOnnxNormalization property: Enable normalization when exporting ONNX model. - * - * @return the enableOnnxNormalization value. - */ - public Boolean enableOnnxNormalization() { - return this.enableOnnxNormalization; - } - - /** - * Set the enableOnnxNormalization property: Enable normalization when exporting ONNX model. - * - * @param enableOnnxNormalization the enableOnnxNormalization value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withEnableOnnxNormalization(Boolean enableOnnxNormalization) { - this.enableOnnxNormalization = enableOnnxNormalization; - return this; - } - - /** - * Get the gradientAccumulationStep property: Gradient accumulation means running a configured number of - * "GradAccumulationStep" steps without - * updating the model weights while accumulating the gradients of those steps, and then using - * the accumulated gradients to compute the weight updates. Must be a positive integer. - * - * @return the gradientAccumulationStep value. - */ - public Integer gradientAccumulationStep() { - return this.gradientAccumulationStep; - } - - /** - * Set the gradientAccumulationStep property: Gradient accumulation means running a configured number of - * "GradAccumulationStep" steps without - * updating the model weights while accumulating the gradients of those steps, and then using - * the accumulated gradients to compute the weight updates. Must be a positive integer. - * - * @param gradientAccumulationStep the gradientAccumulationStep value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withGradientAccumulationStep(Integer gradientAccumulationStep) { - this.gradientAccumulationStep = gradientAccumulationStep; - return this; - } - - /** - * Get the layersToFreeze property: Number of layers to freeze for the model. Must be a positive integer. - * For instance, passing 2 as value for 'seresnext' means - * freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please - * see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - * - * @return the layersToFreeze value. - */ - public Integer layersToFreeze() { - return this.layersToFreeze; - } - - /** - * Set the layersToFreeze property: Number of layers to freeze for the model. Must be a positive integer. - * For instance, passing 2 as value for 'seresnext' means - * freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please - * see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - * - * @param layersToFreeze the layersToFreeze value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withLayersToFreeze(Integer layersToFreeze) { - this.layersToFreeze = layersToFreeze; - return this; - } - - /** - * Get the learningRate property: Initial learning rate. Must be a float in the range [0, 1]. - * - * @return the learningRate value. - */ - public Float learningRate() { - return this.learningRate; - } - - /** - * Set the learningRate property: Initial learning rate. Must be a float in the range [0, 1]. - * - * @param learningRate the learningRate value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withLearningRate(Float learningRate) { - this.learningRate = learningRate; - return this; - } - - /** - * Get the learningRateScheduler property: Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - * - * @return the learningRateScheduler value. - */ - public LearningRateScheduler learningRateScheduler() { - return this.learningRateScheduler; - } - - /** - * Set the learningRateScheduler property: Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - * - * @param learningRateScheduler the learningRateScheduler value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withLearningRateScheduler(LearningRateScheduler learningRateScheduler) { - this.learningRateScheduler = learningRateScheduler; - return this; - } - - /** - * Get the modelName property: Name of the model to use for training. - * For more information on the available models please visit the official documentation: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - * - * @return the modelName value. - */ - public String modelName() { - return this.modelName; - } - - /** - * Set the modelName property: Name of the model to use for training. - * For more information on the available models please visit the official documentation: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - * - * @param modelName the modelName value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withModelName(String modelName) { - this.modelName = modelName; - return this; - } - - /** - * Get the momentum property: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - * - * @return the momentum value. - */ - public Float momentum() { - return this.momentum; - } - - /** - * Set the momentum property: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - * - * @param momentum the momentum value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withMomentum(Float momentum) { - this.momentum = momentum; - return this; - } - - /** - * Get the nesterov property: Enable nesterov when optimizer is 'sgd'. - * - * @return the nesterov value. - */ - public Boolean nesterov() { - return this.nesterov; - } - - /** - * Set the nesterov property: Enable nesterov when optimizer is 'sgd'. - * - * @param nesterov the nesterov value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withNesterov(Boolean nesterov) { - this.nesterov = nesterov; - return this; - } - - /** - * Get the numberOfEpochs property: Number of training epochs. Must be a positive integer. - * - * @return the numberOfEpochs value. - */ - public Integer numberOfEpochs() { - return this.numberOfEpochs; - } - - /** - * Set the numberOfEpochs property: Number of training epochs. Must be a positive integer. - * - * @param numberOfEpochs the numberOfEpochs value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withNumberOfEpochs(Integer numberOfEpochs) { - this.numberOfEpochs = numberOfEpochs; - return this; - } - - /** - * Get the numberOfWorkers property: Number of data loader workers. Must be a non-negative integer. - * - * @return the numberOfWorkers value. - */ - public Integer numberOfWorkers() { - return this.numberOfWorkers; - } - - /** - * Set the numberOfWorkers property: Number of data loader workers. Must be a non-negative integer. - * - * @param numberOfWorkers the numberOfWorkers value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withNumberOfWorkers(Integer numberOfWorkers) { - this.numberOfWorkers = numberOfWorkers; - return this; - } - - /** - * Get the optimizer property: Type of optimizer. - * - * @return the optimizer value. - */ - public StochasticOptimizer optimizer() { - return this.optimizer; - } - - /** - * Set the optimizer property: Type of optimizer. - * - * @param optimizer the optimizer value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withOptimizer(StochasticOptimizer optimizer) { - this.optimizer = optimizer; - return this; - } - - /** - * Get the randomSeed property: Random seed to be used when using deterministic training. - * - * @return the randomSeed value. - */ - public Integer randomSeed() { - return this.randomSeed; - } - - /** - * Set the randomSeed property: Random seed to be used when using deterministic training. - * - * @param randomSeed the randomSeed value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withRandomSeed(Integer randomSeed) { - this.randomSeed = randomSeed; - return this; - } - - /** - * Get the stepLRGamma property: Value of gamma when learning rate scheduler is 'step'. Must be a float in the range - * [0, 1]. - * - * @return the stepLRGamma value. - */ - public Float stepLRGamma() { - return this.stepLRGamma; - } - - /** - * Set the stepLRGamma property: Value of gamma when learning rate scheduler is 'step'. Must be a float in the range - * [0, 1]. - * - * @param stepLRGamma the stepLRGamma value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withStepLRGamma(Float stepLRGamma) { - this.stepLRGamma = stepLRGamma; - return this; - } - - /** - * Get the stepLRStepSize property: Value of step size when learning rate scheduler is 'step'. Must be a positive - * integer. - * - * @return the stepLRStepSize value. - */ - public Integer stepLRStepSize() { - return this.stepLRStepSize; - } - - /** - * Set the stepLRStepSize property: Value of step size when learning rate scheduler is 'step'. Must be a positive - * integer. - * - * @param stepLRStepSize the stepLRStepSize value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withStepLRStepSize(Integer stepLRStepSize) { - this.stepLRStepSize = stepLRStepSize; - return this; - } - - /** - * Get the trainingBatchSize property: Training batch size. Must be a positive integer. - * - * @return the trainingBatchSize value. - */ - public Integer trainingBatchSize() { - return this.trainingBatchSize; - } - - /** - * Set the trainingBatchSize property: Training batch size. Must be a positive integer. - * - * @param trainingBatchSize the trainingBatchSize value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withTrainingBatchSize(Integer trainingBatchSize) { - this.trainingBatchSize = trainingBatchSize; - return this; - } - - /** - * Get the validationBatchSize property: Validation batch size. Must be a positive integer. - * - * @return the validationBatchSize value. - */ - public Integer validationBatchSize() { - return this.validationBatchSize; - } - - /** - * Set the validationBatchSize property: Validation batch size. Must be a positive integer. - * - * @param validationBatchSize the validationBatchSize value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withValidationBatchSize(Integer validationBatchSize) { - this.validationBatchSize = validationBatchSize; - return this; - } - - /** - * Get the warmupCosineLRCycles property: Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. - * Must be a float in the range [0, 1]. - * - * @return the warmupCosineLRCycles value. - */ - public Float warmupCosineLRCycles() { - return this.warmupCosineLRCycles; - } - - /** - * Set the warmupCosineLRCycles property: Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. - * Must be a float in the range [0, 1]. - * - * @param warmupCosineLRCycles the warmupCosineLRCycles value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withWarmupCosineLRCycles(Float warmupCosineLRCycles) { - this.warmupCosineLRCycles = warmupCosineLRCycles; - return this; - } - - /** - * Get the warmupCosineLRWarmupEpochs property: Value of warmup epochs when learning rate scheduler is - * 'warmup_cosine'. Must be a positive integer. - * - * @return the warmupCosineLRWarmupEpochs value. - */ - public Integer warmupCosineLRWarmupEpochs() { - return this.warmupCosineLRWarmupEpochs; - } - - /** - * Set the warmupCosineLRWarmupEpochs property: Value of warmup epochs when learning rate scheduler is - * 'warmup_cosine'. Must be a positive integer. - * - * @param warmupCosineLRWarmupEpochs the warmupCosineLRWarmupEpochs value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withWarmupCosineLRWarmupEpochs(Integer warmupCosineLRWarmupEpochs) { - this.warmupCosineLRWarmupEpochs = warmupCosineLRWarmupEpochs; - return this; - } - - /** - * Get the weightDecay property: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float - * in the range[0, 1]. - * - * @return the weightDecay value. - */ - public Float weightDecay() { - return this.weightDecay; - } - - /** - * Set the weightDecay property: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float - * in the range[0, 1]. - * - * @param weightDecay the weightDecay value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withWeightDecay(Float weightDecay) { - this.weightDecay = weightDecay; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (checkpointModel() != null) { - checkpointModel().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("amsGradient", this.amsGradient); - jsonWriter.writeStringField("advancedSettings", this.advancedSettings); - jsonWriter.writeStringField("augmentations", this.augmentations); - jsonWriter.writeNumberField("beta1", this.beta1); - jsonWriter.writeNumberField("beta2", this.beta2); - jsonWriter.writeNumberField("checkpointFrequency", this.checkpointFrequency); - jsonWriter.writeStringField("checkpointRunId", this.checkpointRunId); - jsonWriter.writeJsonField("checkpointModel", this.checkpointModel); - jsonWriter.writeBooleanField("distributed", this.distributed); - jsonWriter.writeBooleanField("earlyStopping", this.earlyStopping); - jsonWriter.writeNumberField("earlyStoppingDelay", this.earlyStoppingDelay); - jsonWriter.writeNumberField("earlyStoppingPatience", this.earlyStoppingPatience); - jsonWriter.writeNumberField("evaluationFrequency", this.evaluationFrequency); - jsonWriter.writeBooleanField("enableOnnxNormalization", this.enableOnnxNormalization); - jsonWriter.writeNumberField("gradientAccumulationStep", this.gradientAccumulationStep); - jsonWriter.writeNumberField("layersToFreeze", this.layersToFreeze); - jsonWriter.writeNumberField("learningRate", this.learningRate); - jsonWriter.writeStringField("learningRateScheduler", - this.learningRateScheduler == null ? null : this.learningRateScheduler.toString()); - jsonWriter.writeStringField("modelName", this.modelName); - jsonWriter.writeNumberField("momentum", this.momentum); - jsonWriter.writeBooleanField("nesterov", this.nesterov); - jsonWriter.writeNumberField("numberOfEpochs", this.numberOfEpochs); - jsonWriter.writeNumberField("numberOfWorkers", this.numberOfWorkers); - jsonWriter.writeStringField("optimizer", this.optimizer == null ? null : this.optimizer.toString()); - jsonWriter.writeNumberField("randomSeed", this.randomSeed); - jsonWriter.writeNumberField("stepLRGamma", this.stepLRGamma); - jsonWriter.writeNumberField("stepLRStepSize", this.stepLRStepSize); - jsonWriter.writeNumberField("trainingBatchSize", this.trainingBatchSize); - jsonWriter.writeNumberField("validationBatchSize", this.validationBatchSize); - jsonWriter.writeNumberField("warmupCosineLRCycles", this.warmupCosineLRCycles); - jsonWriter.writeNumberField("warmupCosineLRWarmupEpochs", this.warmupCosineLRWarmupEpochs); - jsonWriter.writeNumberField("weightDecay", this.weightDecay); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageModelSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageModelSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ImageModelSettings. - */ - public static ImageModelSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageModelSettings deserializedImageModelSettings = new ImageModelSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("amsGradient".equals(fieldName)) { - deserializedImageModelSettings.amsGradient = reader.getNullable(JsonReader::getBoolean); - } else if ("advancedSettings".equals(fieldName)) { - deserializedImageModelSettings.advancedSettings = reader.getString(); - } else if ("augmentations".equals(fieldName)) { - deserializedImageModelSettings.augmentations = reader.getString(); - } else if ("beta1".equals(fieldName)) { - deserializedImageModelSettings.beta1 = reader.getNullable(JsonReader::getFloat); - } else if ("beta2".equals(fieldName)) { - deserializedImageModelSettings.beta2 = reader.getNullable(JsonReader::getFloat); - } else if ("checkpointFrequency".equals(fieldName)) { - deserializedImageModelSettings.checkpointFrequency = reader.getNullable(JsonReader::getInt); - } else if ("checkpointRunId".equals(fieldName)) { - deserializedImageModelSettings.checkpointRunId = reader.getString(); - } else if ("checkpointModel".equals(fieldName)) { - deserializedImageModelSettings.checkpointModel = MLFlowModelJobInput.fromJson(reader); - } else if ("distributed".equals(fieldName)) { - deserializedImageModelSettings.distributed = reader.getNullable(JsonReader::getBoolean); - } else if ("earlyStopping".equals(fieldName)) { - deserializedImageModelSettings.earlyStopping = reader.getNullable(JsonReader::getBoolean); - } else if ("earlyStoppingDelay".equals(fieldName)) { - deserializedImageModelSettings.earlyStoppingDelay = reader.getNullable(JsonReader::getInt); - } else if ("earlyStoppingPatience".equals(fieldName)) { - deserializedImageModelSettings.earlyStoppingPatience = reader.getNullable(JsonReader::getInt); - } else if ("evaluationFrequency".equals(fieldName)) { - deserializedImageModelSettings.evaluationFrequency = reader.getNullable(JsonReader::getInt); - } else if ("enableOnnxNormalization".equals(fieldName)) { - deserializedImageModelSettings.enableOnnxNormalization = reader.getNullable(JsonReader::getBoolean); - } else if ("gradientAccumulationStep".equals(fieldName)) { - deserializedImageModelSettings.gradientAccumulationStep = reader.getNullable(JsonReader::getInt); - } else if ("layersToFreeze".equals(fieldName)) { - deserializedImageModelSettings.layersToFreeze = reader.getNullable(JsonReader::getInt); - } else if ("learningRate".equals(fieldName)) { - deserializedImageModelSettings.learningRate = reader.getNullable(JsonReader::getFloat); - } else if ("learningRateScheduler".equals(fieldName)) { - deserializedImageModelSettings.learningRateScheduler - = LearningRateScheduler.fromString(reader.getString()); - } else if ("modelName".equals(fieldName)) { - deserializedImageModelSettings.modelName = reader.getString(); - } else if ("momentum".equals(fieldName)) { - deserializedImageModelSettings.momentum = reader.getNullable(JsonReader::getFloat); - } else if ("nesterov".equals(fieldName)) { - deserializedImageModelSettings.nesterov = reader.getNullable(JsonReader::getBoolean); - } else if ("numberOfEpochs".equals(fieldName)) { - deserializedImageModelSettings.numberOfEpochs = reader.getNullable(JsonReader::getInt); - } else if ("numberOfWorkers".equals(fieldName)) { - deserializedImageModelSettings.numberOfWorkers = reader.getNullable(JsonReader::getInt); - } else if ("optimizer".equals(fieldName)) { - deserializedImageModelSettings.optimizer = StochasticOptimizer.fromString(reader.getString()); - } else if ("randomSeed".equals(fieldName)) { - deserializedImageModelSettings.randomSeed = reader.getNullable(JsonReader::getInt); - } else if ("stepLRGamma".equals(fieldName)) { - deserializedImageModelSettings.stepLRGamma = reader.getNullable(JsonReader::getFloat); - } else if ("stepLRStepSize".equals(fieldName)) { - deserializedImageModelSettings.stepLRStepSize = reader.getNullable(JsonReader::getInt); - } else if ("trainingBatchSize".equals(fieldName)) { - deserializedImageModelSettings.trainingBatchSize = reader.getNullable(JsonReader::getInt); - } else if ("validationBatchSize".equals(fieldName)) { - deserializedImageModelSettings.validationBatchSize = reader.getNullable(JsonReader::getInt); - } else if ("warmupCosineLRCycles".equals(fieldName)) { - deserializedImageModelSettings.warmupCosineLRCycles = reader.getNullable(JsonReader::getFloat); - } else if ("warmupCosineLRWarmupEpochs".equals(fieldName)) { - deserializedImageModelSettings.warmupCosineLRWarmupEpochs = reader.getNullable(JsonReader::getInt); - } else if ("weightDecay".equals(fieldName)) { - deserializedImageModelSettings.weightDecay = reader.getNullable(JsonReader::getFloat); - } else { - reader.skipChildren(); - } - } - - return deserializedImageModelSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsClassification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsClassification.java deleted file mode 100644 index 3869388e983e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsClassification.java +++ /dev/null @@ -1,602 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Settings used for training the model. - * For more information on the available settings please visit the official documentation: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - */ -@Fluent -public final class ImageModelSettingsClassification extends ImageModelSettings { - /* - * Image crop size that is input to the neural network for the training dataset. Must be a positive integer. - */ - private Integer trainingCropSize; - - /* - * Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. - */ - private Integer validationCropSize; - - /* - * Image size to which to resize before cropping for validation dataset. Must be a positive integer. - */ - private Integer validationResizeSize; - - /* - * Weighted loss. The accepted values are 0 for no weighted loss. - * 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. - */ - private Integer weightedLoss; - - /** - * Creates an instance of ImageModelSettingsClassification class. - */ - public ImageModelSettingsClassification() { - } - - /** - * Get the trainingCropSize property: Image crop size that is input to the neural network for the training dataset. - * Must be a positive integer. - * - * @return the trainingCropSize value. - */ - public Integer trainingCropSize() { - return this.trainingCropSize; - } - - /** - * Set the trainingCropSize property: Image crop size that is input to the neural network for the training dataset. - * Must be a positive integer. - * - * @param trainingCropSize the trainingCropSize value to set. - * @return the ImageModelSettingsClassification object itself. - */ - public ImageModelSettingsClassification withTrainingCropSize(Integer trainingCropSize) { - this.trainingCropSize = trainingCropSize; - return this; - } - - /** - * Get the validationCropSize property: Image crop size that is input to the neural network for the validation - * dataset. Must be a positive integer. - * - * @return the validationCropSize value. - */ - public Integer validationCropSize() { - return this.validationCropSize; - } - - /** - * Set the validationCropSize property: Image crop size that is input to the neural network for the validation - * dataset. Must be a positive integer. - * - * @param validationCropSize the validationCropSize value to set. - * @return the ImageModelSettingsClassification object itself. - */ - public ImageModelSettingsClassification withValidationCropSize(Integer validationCropSize) { - this.validationCropSize = validationCropSize; - return this; - } - - /** - * Get the validationResizeSize property: Image size to which to resize before cropping for validation dataset. Must - * be a positive integer. - * - * @return the validationResizeSize value. - */ - public Integer validationResizeSize() { - return this.validationResizeSize; - } - - /** - * Set the validationResizeSize property: Image size to which to resize before cropping for validation dataset. Must - * be a positive integer. - * - * @param validationResizeSize the validationResizeSize value to set. - * @return the ImageModelSettingsClassification object itself. - */ - public ImageModelSettingsClassification withValidationResizeSize(Integer validationResizeSize) { - this.validationResizeSize = validationResizeSize; - return this; - } - - /** - * Get the weightedLoss property: Weighted loss. The accepted values are 0 for no weighted loss. - * 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. - * - * @return the weightedLoss value. - */ - public Integer weightedLoss() { - return this.weightedLoss; - } - - /** - * Set the weightedLoss property: Weighted loss. The accepted values are 0 for no weighted loss. - * 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. - * - * @param weightedLoss the weightedLoss value to set. - * @return the ImageModelSettingsClassification object itself. - */ - public ImageModelSettingsClassification withWeightedLoss(Integer weightedLoss) { - this.weightedLoss = weightedLoss; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withAmsGradient(Boolean amsGradient) { - super.withAmsGradient(amsGradient); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withAdvancedSettings(String advancedSettings) { - super.withAdvancedSettings(advancedSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withAugmentations(String augmentations) { - super.withAugmentations(augmentations); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withBeta1(Float beta1) { - super.withBeta1(beta1); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withBeta2(Float beta2) { - super.withBeta2(beta2); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withCheckpointFrequency(Integer checkpointFrequency) { - super.withCheckpointFrequency(checkpointFrequency); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withCheckpointRunId(String checkpointRunId) { - super.withCheckpointRunId(checkpointRunId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withCheckpointModel(MLFlowModelJobInput checkpointModel) { - super.withCheckpointModel(checkpointModel); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withDistributed(Boolean distributed) { - super.withDistributed(distributed); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withEarlyStopping(Boolean earlyStopping) { - super.withEarlyStopping(earlyStopping); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withEarlyStoppingDelay(Integer earlyStoppingDelay) { - super.withEarlyStoppingDelay(earlyStoppingDelay); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withEarlyStoppingPatience(Integer earlyStoppingPatience) { - super.withEarlyStoppingPatience(earlyStoppingPatience); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withEvaluationFrequency(Integer evaluationFrequency) { - super.withEvaluationFrequency(evaluationFrequency); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withEnableOnnxNormalization(Boolean enableOnnxNormalization) { - super.withEnableOnnxNormalization(enableOnnxNormalization); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withGradientAccumulationStep(Integer gradientAccumulationStep) { - super.withGradientAccumulationStep(gradientAccumulationStep); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withLayersToFreeze(Integer layersToFreeze) { - super.withLayersToFreeze(layersToFreeze); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withLearningRate(Float learningRate) { - super.withLearningRate(learningRate); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withLearningRateScheduler(LearningRateScheduler learningRateScheduler) { - super.withLearningRateScheduler(learningRateScheduler); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withModelName(String modelName) { - super.withModelName(modelName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withMomentum(Float momentum) { - super.withMomentum(momentum); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withNesterov(Boolean nesterov) { - super.withNesterov(nesterov); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withNumberOfEpochs(Integer numberOfEpochs) { - super.withNumberOfEpochs(numberOfEpochs); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withNumberOfWorkers(Integer numberOfWorkers) { - super.withNumberOfWorkers(numberOfWorkers); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withOptimizer(StochasticOptimizer optimizer) { - super.withOptimizer(optimizer); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withRandomSeed(Integer randomSeed) { - super.withRandomSeed(randomSeed); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withStepLRGamma(Float stepLRGamma) { - super.withStepLRGamma(stepLRGamma); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withStepLRStepSize(Integer stepLRStepSize) { - super.withStepLRStepSize(stepLRStepSize); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withTrainingBatchSize(Integer trainingBatchSize) { - super.withTrainingBatchSize(trainingBatchSize); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withValidationBatchSize(Integer validationBatchSize) { - super.withValidationBatchSize(validationBatchSize); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withWarmupCosineLRCycles(Float warmupCosineLRCycles) { - super.withWarmupCosineLRCycles(warmupCosineLRCycles); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withWarmupCosineLRWarmupEpochs(Integer warmupCosineLRWarmupEpochs) { - super.withWarmupCosineLRWarmupEpochs(warmupCosineLRWarmupEpochs); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsClassification withWeightDecay(Float weightDecay) { - super.withWeightDecay(weightDecay); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("amsGradient", amsGradient()); - jsonWriter.writeStringField("advancedSettings", advancedSettings()); - jsonWriter.writeStringField("augmentations", augmentations()); - jsonWriter.writeNumberField("beta1", beta1()); - jsonWriter.writeNumberField("beta2", beta2()); - jsonWriter.writeNumberField("checkpointFrequency", checkpointFrequency()); - jsonWriter.writeStringField("checkpointRunId", checkpointRunId()); - jsonWriter.writeJsonField("checkpointModel", checkpointModel()); - jsonWriter.writeBooleanField("distributed", distributed()); - jsonWriter.writeBooleanField("earlyStopping", earlyStopping()); - jsonWriter.writeNumberField("earlyStoppingDelay", earlyStoppingDelay()); - jsonWriter.writeNumberField("earlyStoppingPatience", earlyStoppingPatience()); - jsonWriter.writeNumberField("evaluationFrequency", evaluationFrequency()); - jsonWriter.writeBooleanField("enableOnnxNormalization", enableOnnxNormalization()); - jsonWriter.writeNumberField("gradientAccumulationStep", gradientAccumulationStep()); - jsonWriter.writeNumberField("layersToFreeze", layersToFreeze()); - jsonWriter.writeNumberField("learningRate", learningRate()); - jsonWriter.writeStringField("learningRateScheduler", - learningRateScheduler() == null ? null : learningRateScheduler().toString()); - jsonWriter.writeStringField("modelName", modelName()); - jsonWriter.writeNumberField("momentum", momentum()); - jsonWriter.writeBooleanField("nesterov", nesterov()); - jsonWriter.writeNumberField("numberOfEpochs", numberOfEpochs()); - jsonWriter.writeNumberField("numberOfWorkers", numberOfWorkers()); - jsonWriter.writeStringField("optimizer", optimizer() == null ? null : optimizer().toString()); - jsonWriter.writeNumberField("randomSeed", randomSeed()); - jsonWriter.writeNumberField("stepLRGamma", stepLRGamma()); - jsonWriter.writeNumberField("stepLRStepSize", stepLRStepSize()); - jsonWriter.writeNumberField("trainingBatchSize", trainingBatchSize()); - jsonWriter.writeNumberField("validationBatchSize", validationBatchSize()); - jsonWriter.writeNumberField("warmupCosineLRCycles", warmupCosineLRCycles()); - jsonWriter.writeNumberField("warmupCosineLRWarmupEpochs", warmupCosineLRWarmupEpochs()); - jsonWriter.writeNumberField("weightDecay", weightDecay()); - jsonWriter.writeNumberField("trainingCropSize", this.trainingCropSize); - jsonWriter.writeNumberField("validationCropSize", this.validationCropSize); - jsonWriter.writeNumberField("validationResizeSize", this.validationResizeSize); - jsonWriter.writeNumberField("weightedLoss", this.weightedLoss); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageModelSettingsClassification from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageModelSettingsClassification if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ImageModelSettingsClassification. - */ - public static ImageModelSettingsClassification fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageModelSettingsClassification deserializedImageModelSettingsClassification - = new ImageModelSettingsClassification(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("amsGradient".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withAmsGradient(reader.getNullable(JsonReader::getBoolean)); - } else if ("advancedSettings".equals(fieldName)) { - deserializedImageModelSettingsClassification.withAdvancedSettings(reader.getString()); - } else if ("augmentations".equals(fieldName)) { - deserializedImageModelSettingsClassification.withAugmentations(reader.getString()); - } else if ("beta1".equals(fieldName)) { - deserializedImageModelSettingsClassification.withBeta1(reader.getNullable(JsonReader::getFloat)); - } else if ("beta2".equals(fieldName)) { - deserializedImageModelSettingsClassification.withBeta2(reader.getNullable(JsonReader::getFloat)); - } else if ("checkpointFrequency".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withCheckpointFrequency(reader.getNullable(JsonReader::getInt)); - } else if ("checkpointRunId".equals(fieldName)) { - deserializedImageModelSettingsClassification.withCheckpointRunId(reader.getString()); - } else if ("checkpointModel".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withCheckpointModel(MLFlowModelJobInput.fromJson(reader)); - } else if ("distributed".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withDistributed(reader.getNullable(JsonReader::getBoolean)); - } else if ("earlyStopping".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withEarlyStopping(reader.getNullable(JsonReader::getBoolean)); - } else if ("earlyStoppingDelay".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withEarlyStoppingDelay(reader.getNullable(JsonReader::getInt)); - } else if ("earlyStoppingPatience".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withEarlyStoppingPatience(reader.getNullable(JsonReader::getInt)); - } else if ("evaluationFrequency".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withEvaluationFrequency(reader.getNullable(JsonReader::getInt)); - } else if ("enableOnnxNormalization".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withEnableOnnxNormalization(reader.getNullable(JsonReader::getBoolean)); - } else if ("gradientAccumulationStep".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withGradientAccumulationStep(reader.getNullable(JsonReader::getInt)); - } else if ("layersToFreeze".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withLayersToFreeze(reader.getNullable(JsonReader::getInt)); - } else if ("learningRate".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withLearningRate(reader.getNullable(JsonReader::getFloat)); - } else if ("learningRateScheduler".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withLearningRateScheduler(LearningRateScheduler.fromString(reader.getString())); - } else if ("modelName".equals(fieldName)) { - deserializedImageModelSettingsClassification.withModelName(reader.getString()); - } else if ("momentum".equals(fieldName)) { - deserializedImageModelSettingsClassification.withMomentum(reader.getNullable(JsonReader::getFloat)); - } else if ("nesterov".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withNesterov(reader.getNullable(JsonReader::getBoolean)); - } else if ("numberOfEpochs".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withNumberOfEpochs(reader.getNullable(JsonReader::getInt)); - } else if ("numberOfWorkers".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withNumberOfWorkers(reader.getNullable(JsonReader::getInt)); - } else if ("optimizer".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withOptimizer(StochasticOptimizer.fromString(reader.getString())); - } else if ("randomSeed".equals(fieldName)) { - deserializedImageModelSettingsClassification.withRandomSeed(reader.getNullable(JsonReader::getInt)); - } else if ("stepLRGamma".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withStepLRGamma(reader.getNullable(JsonReader::getFloat)); - } else if ("stepLRStepSize".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withStepLRStepSize(reader.getNullable(JsonReader::getInt)); - } else if ("trainingBatchSize".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withTrainingBatchSize(reader.getNullable(JsonReader::getInt)); - } else if ("validationBatchSize".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withValidationBatchSize(reader.getNullable(JsonReader::getInt)); - } else if ("warmupCosineLRCycles".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withWarmupCosineLRCycles(reader.getNullable(JsonReader::getFloat)); - } else if ("warmupCosineLRWarmupEpochs".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withWarmupCosineLRWarmupEpochs(reader.getNullable(JsonReader::getInt)); - } else if ("weightDecay".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withWeightDecay(reader.getNullable(JsonReader::getFloat)); - } else if ("trainingCropSize".equals(fieldName)) { - deserializedImageModelSettingsClassification.trainingCropSize - = reader.getNullable(JsonReader::getInt); - } else if ("validationCropSize".equals(fieldName)) { - deserializedImageModelSettingsClassification.validationCropSize - = reader.getNullable(JsonReader::getInt); - } else if ("validationResizeSize".equals(fieldName)) { - deserializedImageModelSettingsClassification.validationResizeSize - = reader.getNullable(JsonReader::getInt); - } else if ("weightedLoss".equals(fieldName)) { - deserializedImageModelSettingsClassification.weightedLoss = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedImageModelSettingsClassification; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsObjectDetection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsObjectDetection.java deleted file mode 100644 index 6ff6a94d99ca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsObjectDetection.java +++ /dev/null @@ -1,916 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Settings used for training the model. - * For more information on the available settings please visit the official documentation: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - */ -@Fluent -public final class ImageModelSettingsObjectDetection extends ImageModelSettings { - /* - * Maximum number of detections per image, for all classes. Must be a positive integer. - * Note: This settings is not supported for the 'yolov5' algorithm. - */ - private Integer boxDetectionsPerImage; - - /* - * During inference, only return proposals with a classification score greater than - * BoxScoreThreshold. Must be a float in the range[0, 1]. - */ - private Float boxScoreThreshold; - - /* - * Image size for train and validation. Must be a positive integer. - * Note: The training run may get into CUDA OOM if the size is too big. - * Note: This settings is only supported for the 'yolov5' algorithm. - */ - private Integer imageSize; - - /* - * Maximum size of the image to be rescaled before feeding it to the backbone. - * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. - * Note: This settings is not supported for the 'yolov5' algorithm. - */ - private Integer maxSize; - - /* - * Minimum size of the image to be rescaled before feeding it to the backbone. - * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. - * Note: This settings is not supported for the 'yolov5' algorithm. - */ - private Integer minSize; - - /* - * Model size. Must be 'small', 'medium', 'large', or 'xlarge'. - * Note: training run may get into CUDA OOM if the model size is too big. - * Note: This settings is only supported for the 'yolov5' algorithm. - */ - private ModelSize modelSize; - - /* - * Enable multi-scale image by varying image size by +/- 50%. - * Note: training run may get into CUDA OOM if no sufficient GPU memory. - * Note: This settings is only supported for the 'yolov5' algorithm. - */ - private Boolean multiScale; - - /* - * IOU threshold used during inference in NMS post processing. Must be a float in the range [0, 1]. - */ - private Float nmsIouThreshold; - - /* - * The grid size to use for tiling each image. Note: TileGridSize must not be - * None to enable small object detection logic. A string containing two integers in mxn format. - * Note: This settings is not supported for the 'yolov5' algorithm. - */ - private String tileGridSize; - - /* - * Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). - * Note: This settings is not supported for the 'yolov5' algorithm. - */ - private Float tileOverlapRatio; - - /* - * The IOU threshold to use to perform NMS while merging predictions from tiles and image. - * Used in validation/ inference. Must be float in the range [0, 1]. - * Note: This settings is not supported for the 'yolov5' algorithm. - */ - private Float tilePredictionsNmsThreshold; - - /* - * IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. - */ - private Float validationIouThreshold; - - /* - * Metric computation method to use for validation metrics. - */ - private ValidationMetricType validationMetricType; - - /** - * Creates an instance of ImageModelSettingsObjectDetection class. - */ - public ImageModelSettingsObjectDetection() { - } - - /** - * Get the boxDetectionsPerImage property: Maximum number of detections per image, for all classes. Must be a - * positive integer. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @return the boxDetectionsPerImage value. - */ - public Integer boxDetectionsPerImage() { - return this.boxDetectionsPerImage; - } - - /** - * Set the boxDetectionsPerImage property: Maximum number of detections per image, for all classes. Must be a - * positive integer. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @param boxDetectionsPerImage the boxDetectionsPerImage value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withBoxDetectionsPerImage(Integer boxDetectionsPerImage) { - this.boxDetectionsPerImage = boxDetectionsPerImage; - return this; - } - - /** - * Get the boxScoreThreshold property: During inference, only return proposals with a classification score greater - * than - * BoxScoreThreshold. Must be a float in the range[0, 1]. - * - * @return the boxScoreThreshold value. - */ - public Float boxScoreThreshold() { - return this.boxScoreThreshold; - } - - /** - * Set the boxScoreThreshold property: During inference, only return proposals with a classification score greater - * than - * BoxScoreThreshold. Must be a float in the range[0, 1]. - * - * @param boxScoreThreshold the boxScoreThreshold value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withBoxScoreThreshold(Float boxScoreThreshold) { - this.boxScoreThreshold = boxScoreThreshold; - return this; - } - - /** - * Get the imageSize property: Image size for train and validation. Must be a positive integer. - * Note: The training run may get into CUDA OOM if the size is too big. - * Note: This settings is only supported for the 'yolov5' algorithm. - * - * @return the imageSize value. - */ - public Integer imageSize() { - return this.imageSize; - } - - /** - * Set the imageSize property: Image size for train and validation. Must be a positive integer. - * Note: The training run may get into CUDA OOM if the size is too big. - * Note: This settings is only supported for the 'yolov5' algorithm. - * - * @param imageSize the imageSize value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withImageSize(Integer imageSize) { - this.imageSize = imageSize; - return this; - } - - /** - * Get the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. - * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @return the maxSize value. - */ - public Integer maxSize() { - return this.maxSize; - } - - /** - * Set the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. - * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @param maxSize the maxSize value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withMaxSize(Integer maxSize) { - this.maxSize = maxSize; - return this; - } - - /** - * Get the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. - * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @return the minSize value. - */ - public Integer minSize() { - return this.minSize; - } - - /** - * Set the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. - * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @param minSize the minSize value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withMinSize(Integer minSize) { - this.minSize = minSize; - return this; - } - - /** - * Get the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. - * Note: training run may get into CUDA OOM if the model size is too big. - * Note: This settings is only supported for the 'yolov5' algorithm. - * - * @return the modelSize value. - */ - public ModelSize modelSize() { - return this.modelSize; - } - - /** - * Set the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. - * Note: training run may get into CUDA OOM if the model size is too big. - * Note: This settings is only supported for the 'yolov5' algorithm. - * - * @param modelSize the modelSize value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withModelSize(ModelSize modelSize) { - this.modelSize = modelSize; - return this; - } - - /** - * Get the multiScale property: Enable multi-scale image by varying image size by +/- 50%. - * Note: training run may get into CUDA OOM if no sufficient GPU memory. - * Note: This settings is only supported for the 'yolov5' algorithm. - * - * @return the multiScale value. - */ - public Boolean multiScale() { - return this.multiScale; - } - - /** - * Set the multiScale property: Enable multi-scale image by varying image size by +/- 50%. - * Note: training run may get into CUDA OOM if no sufficient GPU memory. - * Note: This settings is only supported for the 'yolov5' algorithm. - * - * @param multiScale the multiScale value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withMultiScale(Boolean multiScale) { - this.multiScale = multiScale; - return this; - } - - /** - * Get the nmsIouThreshold property: IOU threshold used during inference in NMS post processing. Must be a float in - * the range [0, 1]. - * - * @return the nmsIouThreshold value. - */ - public Float nmsIouThreshold() { - return this.nmsIouThreshold; - } - - /** - * Set the nmsIouThreshold property: IOU threshold used during inference in NMS post processing. Must be a float in - * the range [0, 1]. - * - * @param nmsIouThreshold the nmsIouThreshold value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withNmsIouThreshold(Float nmsIouThreshold) { - this.nmsIouThreshold = nmsIouThreshold; - return this; - } - - /** - * Get the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be - * None to enable small object detection logic. A string containing two integers in mxn format. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @return the tileGridSize value. - */ - public String tileGridSize() { - return this.tileGridSize; - } - - /** - * Set the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be - * None to enable small object detection logic. A string containing two integers in mxn format. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @param tileGridSize the tileGridSize value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withTileGridSize(String tileGridSize) { - this.tileGridSize = tileGridSize; - return this; - } - - /** - * Get the tileOverlapRatio property: Overlap ratio between adjacent tiles in each dimension. Must be float in the - * range [0, 1). - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @return the tileOverlapRatio value. - */ - public Float tileOverlapRatio() { - return this.tileOverlapRatio; - } - - /** - * Set the tileOverlapRatio property: Overlap ratio between adjacent tiles in each dimension. Must be float in the - * range [0, 1). - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @param tileOverlapRatio the tileOverlapRatio value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withTileOverlapRatio(Float tileOverlapRatio) { - this.tileOverlapRatio = tileOverlapRatio; - return this; - } - - /** - * Get the tilePredictionsNmsThreshold property: The IOU threshold to use to perform NMS while merging predictions - * from tiles and image. - * Used in validation/ inference. Must be float in the range [0, 1]. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @return the tilePredictionsNmsThreshold value. - */ - public Float tilePredictionsNmsThreshold() { - return this.tilePredictionsNmsThreshold; - } - - /** - * Set the tilePredictionsNmsThreshold property: The IOU threshold to use to perform NMS while merging predictions - * from tiles and image. - * Used in validation/ inference. Must be float in the range [0, 1]. - * Note: This settings is not supported for the 'yolov5' algorithm. - * - * @param tilePredictionsNmsThreshold the tilePredictionsNmsThreshold value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withTilePredictionsNmsThreshold(Float tilePredictionsNmsThreshold) { - this.tilePredictionsNmsThreshold = tilePredictionsNmsThreshold; - return this; - } - - /** - * Get the validationIouThreshold property: IOU threshold to use when computing validation metric. Must be float in - * the range [0, 1]. - * - * @return the validationIouThreshold value. - */ - public Float validationIouThreshold() { - return this.validationIouThreshold; - } - - /** - * Set the validationIouThreshold property: IOU threshold to use when computing validation metric. Must be float in - * the range [0, 1]. - * - * @param validationIouThreshold the validationIouThreshold value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withValidationIouThreshold(Float validationIouThreshold) { - this.validationIouThreshold = validationIouThreshold; - return this; - } - - /** - * Get the validationMetricType property: Metric computation method to use for validation metrics. - * - * @return the validationMetricType value. - */ - public ValidationMetricType validationMetricType() { - return this.validationMetricType; - } - - /** - * Set the validationMetricType property: Metric computation method to use for validation metrics. - * - * @param validationMetricType the validationMetricType value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withValidationMetricType(ValidationMetricType validationMetricType) { - this.validationMetricType = validationMetricType; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withAmsGradient(Boolean amsGradient) { - super.withAmsGradient(amsGradient); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withAdvancedSettings(String advancedSettings) { - super.withAdvancedSettings(advancedSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withAugmentations(String augmentations) { - super.withAugmentations(augmentations); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withBeta1(Float beta1) { - super.withBeta1(beta1); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withBeta2(Float beta2) { - super.withBeta2(beta2); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withCheckpointFrequency(Integer checkpointFrequency) { - super.withCheckpointFrequency(checkpointFrequency); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withCheckpointRunId(String checkpointRunId) { - super.withCheckpointRunId(checkpointRunId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withCheckpointModel(MLFlowModelJobInput checkpointModel) { - super.withCheckpointModel(checkpointModel); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withDistributed(Boolean distributed) { - super.withDistributed(distributed); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withEarlyStopping(Boolean earlyStopping) { - super.withEarlyStopping(earlyStopping); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withEarlyStoppingDelay(Integer earlyStoppingDelay) { - super.withEarlyStoppingDelay(earlyStoppingDelay); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withEarlyStoppingPatience(Integer earlyStoppingPatience) { - super.withEarlyStoppingPatience(earlyStoppingPatience); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withEvaluationFrequency(Integer evaluationFrequency) { - super.withEvaluationFrequency(evaluationFrequency); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withEnableOnnxNormalization(Boolean enableOnnxNormalization) { - super.withEnableOnnxNormalization(enableOnnxNormalization); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withGradientAccumulationStep(Integer gradientAccumulationStep) { - super.withGradientAccumulationStep(gradientAccumulationStep); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withLayersToFreeze(Integer layersToFreeze) { - super.withLayersToFreeze(layersToFreeze); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withLearningRate(Float learningRate) { - super.withLearningRate(learningRate); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withLearningRateScheduler(LearningRateScheduler learningRateScheduler) { - super.withLearningRateScheduler(learningRateScheduler); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withModelName(String modelName) { - super.withModelName(modelName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withMomentum(Float momentum) { - super.withMomentum(momentum); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withNesterov(Boolean nesterov) { - super.withNesterov(nesterov); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withNumberOfEpochs(Integer numberOfEpochs) { - super.withNumberOfEpochs(numberOfEpochs); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withNumberOfWorkers(Integer numberOfWorkers) { - super.withNumberOfWorkers(numberOfWorkers); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withOptimizer(StochasticOptimizer optimizer) { - super.withOptimizer(optimizer); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withRandomSeed(Integer randomSeed) { - super.withRandomSeed(randomSeed); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withStepLRGamma(Float stepLRGamma) { - super.withStepLRGamma(stepLRGamma); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withStepLRStepSize(Integer stepLRStepSize) { - super.withStepLRStepSize(stepLRStepSize); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withTrainingBatchSize(Integer trainingBatchSize) { - super.withTrainingBatchSize(trainingBatchSize); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withValidationBatchSize(Integer validationBatchSize) { - super.withValidationBatchSize(validationBatchSize); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withWarmupCosineLRCycles(Float warmupCosineLRCycles) { - super.withWarmupCosineLRCycles(warmupCosineLRCycles); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withWarmupCosineLRWarmupEpochs(Integer warmupCosineLRWarmupEpochs) { - super.withWarmupCosineLRWarmupEpochs(warmupCosineLRWarmupEpochs); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageModelSettingsObjectDetection withWeightDecay(Float weightDecay) { - super.withWeightDecay(weightDecay); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("amsGradient", amsGradient()); - jsonWriter.writeStringField("advancedSettings", advancedSettings()); - jsonWriter.writeStringField("augmentations", augmentations()); - jsonWriter.writeNumberField("beta1", beta1()); - jsonWriter.writeNumberField("beta2", beta2()); - jsonWriter.writeNumberField("checkpointFrequency", checkpointFrequency()); - jsonWriter.writeStringField("checkpointRunId", checkpointRunId()); - jsonWriter.writeJsonField("checkpointModel", checkpointModel()); - jsonWriter.writeBooleanField("distributed", distributed()); - jsonWriter.writeBooleanField("earlyStopping", earlyStopping()); - jsonWriter.writeNumberField("earlyStoppingDelay", earlyStoppingDelay()); - jsonWriter.writeNumberField("earlyStoppingPatience", earlyStoppingPatience()); - jsonWriter.writeNumberField("evaluationFrequency", evaluationFrequency()); - jsonWriter.writeBooleanField("enableOnnxNormalization", enableOnnxNormalization()); - jsonWriter.writeNumberField("gradientAccumulationStep", gradientAccumulationStep()); - jsonWriter.writeNumberField("layersToFreeze", layersToFreeze()); - jsonWriter.writeNumberField("learningRate", learningRate()); - jsonWriter.writeStringField("learningRateScheduler", - learningRateScheduler() == null ? null : learningRateScheduler().toString()); - jsonWriter.writeStringField("modelName", modelName()); - jsonWriter.writeNumberField("momentum", momentum()); - jsonWriter.writeBooleanField("nesterov", nesterov()); - jsonWriter.writeNumberField("numberOfEpochs", numberOfEpochs()); - jsonWriter.writeNumberField("numberOfWorkers", numberOfWorkers()); - jsonWriter.writeStringField("optimizer", optimizer() == null ? null : optimizer().toString()); - jsonWriter.writeNumberField("randomSeed", randomSeed()); - jsonWriter.writeNumberField("stepLRGamma", stepLRGamma()); - jsonWriter.writeNumberField("stepLRStepSize", stepLRStepSize()); - jsonWriter.writeNumberField("trainingBatchSize", trainingBatchSize()); - jsonWriter.writeNumberField("validationBatchSize", validationBatchSize()); - jsonWriter.writeNumberField("warmupCosineLRCycles", warmupCosineLRCycles()); - jsonWriter.writeNumberField("warmupCosineLRWarmupEpochs", warmupCosineLRWarmupEpochs()); - jsonWriter.writeNumberField("weightDecay", weightDecay()); - jsonWriter.writeNumberField("boxDetectionsPerImage", this.boxDetectionsPerImage); - jsonWriter.writeNumberField("boxScoreThreshold", this.boxScoreThreshold); - jsonWriter.writeNumberField("imageSize", this.imageSize); - jsonWriter.writeNumberField("maxSize", this.maxSize); - jsonWriter.writeNumberField("minSize", this.minSize); - jsonWriter.writeStringField("modelSize", this.modelSize == null ? null : this.modelSize.toString()); - jsonWriter.writeBooleanField("multiScale", this.multiScale); - jsonWriter.writeNumberField("nmsIouThreshold", this.nmsIouThreshold); - jsonWriter.writeStringField("tileGridSize", this.tileGridSize); - jsonWriter.writeNumberField("tileOverlapRatio", this.tileOverlapRatio); - jsonWriter.writeNumberField("tilePredictionsNmsThreshold", this.tilePredictionsNmsThreshold); - jsonWriter.writeNumberField("validationIouThreshold", this.validationIouThreshold); - jsonWriter.writeStringField("validationMetricType", - this.validationMetricType == null ? null : this.validationMetricType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageModelSettingsObjectDetection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageModelSettingsObjectDetection if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ImageModelSettingsObjectDetection. - */ - public static ImageModelSettingsObjectDetection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageModelSettingsObjectDetection deserializedImageModelSettingsObjectDetection - = new ImageModelSettingsObjectDetection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("amsGradient".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withAmsGradient(reader.getNullable(JsonReader::getBoolean)); - } else if ("advancedSettings".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.withAdvancedSettings(reader.getString()); - } else if ("augmentations".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.withAugmentations(reader.getString()); - } else if ("beta1".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.withBeta1(reader.getNullable(JsonReader::getFloat)); - } else if ("beta2".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.withBeta2(reader.getNullable(JsonReader::getFloat)); - } else if ("checkpointFrequency".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withCheckpointFrequency(reader.getNullable(JsonReader::getInt)); - } else if ("checkpointRunId".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.withCheckpointRunId(reader.getString()); - } else if ("checkpointModel".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withCheckpointModel(MLFlowModelJobInput.fromJson(reader)); - } else if ("distributed".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withDistributed(reader.getNullable(JsonReader::getBoolean)); - } else if ("earlyStopping".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withEarlyStopping(reader.getNullable(JsonReader::getBoolean)); - } else if ("earlyStoppingDelay".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withEarlyStoppingDelay(reader.getNullable(JsonReader::getInt)); - } else if ("earlyStoppingPatience".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withEarlyStoppingPatience(reader.getNullable(JsonReader::getInt)); - } else if ("evaluationFrequency".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withEvaluationFrequency(reader.getNullable(JsonReader::getInt)); - } else if ("enableOnnxNormalization".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withEnableOnnxNormalization(reader.getNullable(JsonReader::getBoolean)); - } else if ("gradientAccumulationStep".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withGradientAccumulationStep(reader.getNullable(JsonReader::getInt)); - } else if ("layersToFreeze".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withLayersToFreeze(reader.getNullable(JsonReader::getInt)); - } else if ("learningRate".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withLearningRate(reader.getNullable(JsonReader::getFloat)); - } else if ("learningRateScheduler".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withLearningRateScheduler(LearningRateScheduler.fromString(reader.getString())); - } else if ("modelName".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.withModelName(reader.getString()); - } else if ("momentum".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withMomentum(reader.getNullable(JsonReader::getFloat)); - } else if ("nesterov".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withNesterov(reader.getNullable(JsonReader::getBoolean)); - } else if ("numberOfEpochs".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withNumberOfEpochs(reader.getNullable(JsonReader::getInt)); - } else if ("numberOfWorkers".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withNumberOfWorkers(reader.getNullable(JsonReader::getInt)); - } else if ("optimizer".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withOptimizer(StochasticOptimizer.fromString(reader.getString())); - } else if ("randomSeed".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withRandomSeed(reader.getNullable(JsonReader::getInt)); - } else if ("stepLRGamma".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withStepLRGamma(reader.getNullable(JsonReader::getFloat)); - } else if ("stepLRStepSize".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withStepLRStepSize(reader.getNullable(JsonReader::getInt)); - } else if ("trainingBatchSize".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withTrainingBatchSize(reader.getNullable(JsonReader::getInt)); - } else if ("validationBatchSize".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withValidationBatchSize(reader.getNullable(JsonReader::getInt)); - } else if ("warmupCosineLRCycles".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withWarmupCosineLRCycles(reader.getNullable(JsonReader::getFloat)); - } else if ("warmupCosineLRWarmupEpochs".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withWarmupCosineLRWarmupEpochs(reader.getNullable(JsonReader::getInt)); - } else if ("weightDecay".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withWeightDecay(reader.getNullable(JsonReader::getFloat)); - } else if ("boxDetectionsPerImage".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.boxDetectionsPerImage - = reader.getNullable(JsonReader::getInt); - } else if ("boxScoreThreshold".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.boxScoreThreshold - = reader.getNullable(JsonReader::getFloat); - } else if ("imageSize".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.imageSize = reader.getNullable(JsonReader::getInt); - } else if ("maxSize".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.maxSize = reader.getNullable(JsonReader::getInt); - } else if ("minSize".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.minSize = reader.getNullable(JsonReader::getInt); - } else if ("modelSize".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.modelSize = ModelSize.fromString(reader.getString()); - } else if ("multiScale".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.multiScale - = reader.getNullable(JsonReader::getBoolean); - } else if ("nmsIouThreshold".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.nmsIouThreshold - = reader.getNullable(JsonReader::getFloat); - } else if ("tileGridSize".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.tileGridSize = reader.getString(); - } else if ("tileOverlapRatio".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.tileOverlapRatio - = reader.getNullable(JsonReader::getFloat); - } else if ("tilePredictionsNmsThreshold".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.tilePredictionsNmsThreshold - = reader.getNullable(JsonReader::getFloat); - } else if ("validationIouThreshold".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.validationIouThreshold - = reader.getNullable(JsonReader::getFloat); - } else if ("validationMetricType".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.validationMetricType - = ValidationMetricType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedImageModelSettingsObjectDetection; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetection.java deleted file mode 100644 index 99f1efb1404a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetection.java +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Image Object Detection. Object detection is used to identify objects in an image and locate each object with a - * bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. - */ -@Fluent -public final class ImageObjectDetection extends AutoMLVertical { - /* - * [Required] Task type for AutoMLJob. - */ - private TaskType taskType = TaskType.IMAGE_OBJECT_DETECTION; - - /* - * Primary metric to optimize for this task. - */ - private ObjectDetectionPrimaryMetrics primaryMetric; - - /* - * Settings used for training the model. - */ - private ImageModelSettingsObjectDetection modelSettings; - - /* - * Search space for sampling different combinations of models and their hyperparameters. - */ - private List searchSpace; - - /* - * [Required] Limit settings for the AutoML job. - */ - private ImageLimitSettings limitSettings; - - /* - * Model sweeping and hyperparameter sweeping related settings. - */ - private ImageSweepSettings sweepSettings; - - /* - * Validation data inputs. - */ - private MLTableJobInput validationData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - private Double validationDataSize; - - /** - * Creates an instance of ImageObjectDetection class. - */ - public ImageObjectDetection() { - } - - /** - * Get the taskType property: [Required] Task type for AutoMLJob. - * - * @return the taskType value. - */ - @Override - public TaskType taskType() { - return this.taskType; - } - - /** - * Get the primaryMetric property: Primary metric to optimize for this task. - * - * @return the primaryMetric value. - */ - public ObjectDetectionPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric to optimize for this task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the ImageObjectDetection object itself. - */ - public ImageObjectDetection withPrimaryMetric(ObjectDetectionPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - - /** - * Get the modelSettings property: Settings used for training the model. - * - * @return the modelSettings value. - */ - public ImageModelSettingsObjectDetection modelSettings() { - return this.modelSettings; - } - - /** - * Set the modelSettings property: Settings used for training the model. - * - * @param modelSettings the modelSettings value to set. - * @return the ImageObjectDetection object itself. - */ - public ImageObjectDetection withModelSettings(ImageModelSettingsObjectDetection modelSettings) { - this.modelSettings = modelSettings; - return this; - } - - /** - * Get the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @return the searchSpace value. - */ - public List searchSpace() { - return this.searchSpace; - } - - /** - * Set the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @param searchSpace the searchSpace value to set. - * @return the ImageObjectDetection object itself. - */ - public ImageObjectDetection withSearchSpace(List searchSpace) { - this.searchSpace = searchSpace; - return this; - } - - /** - * Get the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @return the limitSettings value. - */ - public ImageLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @param limitSettings the limitSettings value to set. - * @return the ImageObjectDetection object itself. - */ - public ImageObjectDetection withLimitSettings(ImageLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @return the sweepSettings value. - */ - public ImageSweepSettings sweepSettings() { - return this.sweepSettings; - } - - /** - * Set the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @param sweepSettings the sweepSettings value to set. - * @return the ImageObjectDetection object itself. - */ - public ImageObjectDetection withSweepSettings(ImageSweepSettings sweepSettings) { - this.sweepSettings = sweepSettings; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the ImageObjectDetection object itself. - */ - public ImageObjectDetection withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the ImageObjectDetection object itself. - */ - public ImageObjectDetection withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageObjectDetection withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageObjectDetection withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageObjectDetection withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - if (limitSettings() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property limitSettings in model ImageObjectDetection")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageObjectDetection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("trainingData", trainingData()); - jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); - jsonWriter.writeStringField("targetColumnName", targetColumnName()); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); - jsonWriter.writeJsonField("modelSettings", this.modelSettings); - jsonWriter.writeArrayField("searchSpace", this.searchSpace, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("sweepSettings", this.sweepSettings); - jsonWriter.writeJsonField("validationData", this.validationData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageObjectDetection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageObjectDetection if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ImageObjectDetection. - */ - public static ImageObjectDetection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageObjectDetection deserializedImageObjectDetection = new ImageObjectDetection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("trainingData".equals(fieldName)) { - deserializedImageObjectDetection.withTrainingData(MLTableJobInput.fromJson(reader)); - } else if ("logVerbosity".equals(fieldName)) { - deserializedImageObjectDetection.withLogVerbosity(LogVerbosity.fromString(reader.getString())); - } else if ("targetColumnName".equals(fieldName)) { - deserializedImageObjectDetection.withTargetColumnName(reader.getString()); - } else if ("limitSettings".equals(fieldName)) { - deserializedImageObjectDetection.limitSettings = ImageLimitSettings.fromJson(reader); - } else if ("taskType".equals(fieldName)) { - deserializedImageObjectDetection.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedImageObjectDetection.primaryMetric - = ObjectDetectionPrimaryMetrics.fromString(reader.getString()); - } else if ("modelSettings".equals(fieldName)) { - deserializedImageObjectDetection.modelSettings = ImageModelSettingsObjectDetection.fromJson(reader); - } else if ("searchSpace".equals(fieldName)) { - List searchSpace - = reader.readArray(reader1 -> ImageModelDistributionSettingsObjectDetection.fromJson(reader1)); - deserializedImageObjectDetection.searchSpace = searchSpace; - } else if ("sweepSettings".equals(fieldName)) { - deserializedImageObjectDetection.sweepSettings = ImageSweepSettings.fromJson(reader); - } else if ("validationData".equals(fieldName)) { - deserializedImageObjectDetection.validationData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedImageObjectDetection.validationDataSize = reader.getNullable(JsonReader::getDouble); - } else { - reader.skipChildren(); - } - } - - return deserializedImageObjectDetection; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetectionBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetectionBase.java deleted file mode 100644 index 23d39931454c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetectionBase.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The ImageObjectDetectionBase model. - */ -@Fluent -public class ImageObjectDetectionBase extends ImageVertical { - /* - * Settings used for training the model. - */ - private ImageModelSettingsObjectDetection modelSettings; - - /* - * Search space for sampling different combinations of models and their hyperparameters. - */ - private List searchSpace; - - /** - * Creates an instance of ImageObjectDetectionBase class. - */ - public ImageObjectDetectionBase() { - } - - /** - * Get the modelSettings property: Settings used for training the model. - * - * @return the modelSettings value. - */ - public ImageModelSettingsObjectDetection modelSettings() { - return this.modelSettings; - } - - /** - * Set the modelSettings property: Settings used for training the model. - * - * @param modelSettings the modelSettings value to set. - * @return the ImageObjectDetectionBase object itself. - */ - public ImageObjectDetectionBase withModelSettings(ImageModelSettingsObjectDetection modelSettings) { - this.modelSettings = modelSettings; - return this; - } - - /** - * Get the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @return the searchSpace value. - */ - public List searchSpace() { - return this.searchSpace; - } - - /** - * Set the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @param searchSpace the searchSpace value to set. - * @return the ImageObjectDetectionBase object itself. - */ - public ImageObjectDetectionBase withSearchSpace(List searchSpace) { - this.searchSpace = searchSpace; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageObjectDetectionBase withLimitSettings(ImageLimitSettings limitSettings) { - super.withLimitSettings(limitSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageObjectDetectionBase withSweepSettings(ImageSweepSettings sweepSettings) { - super.withSweepSettings(sweepSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageObjectDetectionBase withValidationData(MLTableJobInput validationData) { - super.withValidationData(validationData); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageObjectDetectionBase withValidationDataSize(Double validationDataSize) { - super.withValidationDataSize(validationDataSize); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("limitSettings", limitSettings()); - jsonWriter.writeJsonField("sweepSettings", sweepSettings()); - jsonWriter.writeJsonField("validationData", validationData()); - jsonWriter.writeNumberField("validationDataSize", validationDataSize()); - jsonWriter.writeJsonField("modelSettings", this.modelSettings); - jsonWriter.writeArrayField("searchSpace", this.searchSpace, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageObjectDetectionBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageObjectDetectionBase if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ImageObjectDetectionBase. - */ - public static ImageObjectDetectionBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageObjectDetectionBase deserializedImageObjectDetectionBase = new ImageObjectDetectionBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("limitSettings".equals(fieldName)) { - deserializedImageObjectDetectionBase.withLimitSettings(ImageLimitSettings.fromJson(reader)); - } else if ("sweepSettings".equals(fieldName)) { - deserializedImageObjectDetectionBase.withSweepSettings(ImageSweepSettings.fromJson(reader)); - } else if ("validationData".equals(fieldName)) { - deserializedImageObjectDetectionBase.withValidationData(MLTableJobInput.fromJson(reader)); - } else if ("validationDataSize".equals(fieldName)) { - deserializedImageObjectDetectionBase - .withValidationDataSize(reader.getNullable(JsonReader::getDouble)); - } else if ("modelSettings".equals(fieldName)) { - deserializedImageObjectDetectionBase.modelSettings - = ImageModelSettingsObjectDetection.fromJson(reader); - } else if ("searchSpace".equals(fieldName)) { - List searchSpace - = reader.readArray(reader1 -> ImageModelDistributionSettingsObjectDetection.fromJson(reader1)); - deserializedImageObjectDetectionBase.searchSpace = searchSpace; - } else { - reader.skipChildren(); - } - } - - return deserializedImageObjectDetectionBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepSettings.java deleted file mode 100644 index cbe5ebe1e801..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepSettings.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model sweeping and hyperparameter sweeping related settings. - */ -@Fluent -public final class ImageSweepSettings implements JsonSerializable { - /* - * [Required] Type of the hyperparameter sampling algorithms. - */ - private SamplingAlgorithmType samplingAlgorithm; - - /* - * Type of early termination policy. - */ - private EarlyTerminationPolicy earlyTermination; - - /** - * Creates an instance of ImageSweepSettings class. - */ - public ImageSweepSettings() { - } - - /** - * Get the samplingAlgorithm property: [Required] Type of the hyperparameter sampling algorithms. - * - * @return the samplingAlgorithm value. - */ - public SamplingAlgorithmType samplingAlgorithm() { - return this.samplingAlgorithm; - } - - /** - * Set the samplingAlgorithm property: [Required] Type of the hyperparameter sampling algorithms. - * - * @param samplingAlgorithm the samplingAlgorithm value to set. - * @return the ImageSweepSettings object itself. - */ - public ImageSweepSettings withSamplingAlgorithm(SamplingAlgorithmType samplingAlgorithm) { - this.samplingAlgorithm = samplingAlgorithm; - return this; - } - - /** - * Get the earlyTermination property: Type of early termination policy. - * - * @return the earlyTermination value. - */ - public EarlyTerminationPolicy earlyTermination() { - return this.earlyTermination; - } - - /** - * Set the earlyTermination property: Type of early termination policy. - * - * @param earlyTermination the earlyTermination value to set. - * @return the ImageSweepSettings object itself. - */ - public ImageSweepSettings withEarlyTermination(EarlyTerminationPolicy earlyTermination) { - this.earlyTermination = earlyTermination; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (samplingAlgorithm() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property samplingAlgorithm in model ImageSweepSettings")); - } - if (earlyTermination() != null) { - earlyTermination().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageSweepSettings.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("samplingAlgorithm", - this.samplingAlgorithm == null ? null : this.samplingAlgorithm.toString()); - jsonWriter.writeJsonField("earlyTermination", this.earlyTermination); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageSweepSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageSweepSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ImageSweepSettings. - */ - public static ImageSweepSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageSweepSettings deserializedImageSweepSettings = new ImageSweepSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("samplingAlgorithm".equals(fieldName)) { - deserializedImageSweepSettings.samplingAlgorithm - = SamplingAlgorithmType.fromString(reader.getString()); - } else if ("earlyTermination".equals(fieldName)) { - deserializedImageSweepSettings.earlyTermination = EarlyTerminationPolicy.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedImageSweepSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageType.java deleted file mode 100644 index ae3c83ed0d01..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of the image - * - * Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images. - */ -public final class ImageType extends ExpandableStringEnum { - /** - * Static value docker for ImageType. - */ - public static final ImageType DOCKER = fromString("docker"); - - /** - * Static value azureml for ImageType. - */ - public static final ImageType AZUREML = fromString("azureml"); - - /** - * Creates a new instance of ImageType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ImageType() { - } - - /** - * Creates or finds a ImageType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ImageType. - */ - public static ImageType fromString(String name) { - return fromString(name, ImageType.class); - } - - /** - * Gets known ImageType values. - * - * @return known ImageType values. - */ - public static Collection values() { - return values(ImageType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVertical.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVertical.java deleted file mode 100644 index baa6f77c2128..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVertical.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Abstract class for AutoML tasks that train image (computer vision) models - - * such as Image Classification / Image Classification Multilabel / Image Object Detection / Image Instance - * Segmentation. - */ -@Fluent -public class ImageVertical implements JsonSerializable { - /* - * [Required] Limit settings for the AutoML job. - */ - private ImageLimitSettings limitSettings; - - /* - * Model sweeping and hyperparameter sweeping related settings. - */ - private ImageSweepSettings sweepSettings; - - /* - * Validation data inputs. - */ - private MLTableJobInput validationData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - private Double validationDataSize; - - /** - * Creates an instance of ImageVertical class. - */ - public ImageVertical() { - } - - /** - * Get the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @return the limitSettings value. - */ - public ImageLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @param limitSettings the limitSettings value to set. - * @return the ImageVertical object itself. - */ - public ImageVertical withLimitSettings(ImageLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @return the sweepSettings value. - */ - public ImageSweepSettings sweepSettings() { - return this.sweepSettings; - } - - /** - * Set the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @param sweepSettings the sweepSettings value to set. - * @return the ImageVertical object itself. - */ - public ImageVertical withSweepSettings(ImageSweepSettings sweepSettings) { - this.sweepSettings = sweepSettings; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the ImageVertical object itself. - */ - public ImageVertical withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the ImageVertical object itself. - */ - public ImageVertical withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (limitSettings() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property limitSettings in model ImageVertical")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageVertical.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("sweepSettings", this.sweepSettings); - jsonWriter.writeJsonField("validationData", this.validationData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageVertical from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageVertical if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ImageVertical. - */ - public static ImageVertical fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageVertical deserializedImageVertical = new ImageVertical(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("limitSettings".equals(fieldName)) { - deserializedImageVertical.limitSettings = ImageLimitSettings.fromJson(reader); - } else if ("sweepSettings".equals(fieldName)) { - deserializedImageVertical.sweepSettings = ImageSweepSettings.fromJson(reader); - } else if ("validationData".equals(fieldName)) { - deserializedImageVertical.validationData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedImageVertical.validationDataSize = reader.getNullable(JsonReader::getDouble); - } else { - reader.skipChildren(); - } - } - - return deserializedImageVertical; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IndexColumn.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IndexColumn.java deleted file mode 100644 index 48f9ec428282..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IndexColumn.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * DTO object representing index column. - */ -@Fluent -public final class IndexColumn implements JsonSerializable { - /* - * Specifies the data type - */ - private FeatureDataType dataType; - - /* - * Specifies the column name - */ - private String columnName; - - /** - * Creates an instance of IndexColumn class. - */ - public IndexColumn() { - } - - /** - * Get the dataType property: Specifies the data type. - * - * @return the dataType value. - */ - public FeatureDataType dataType() { - return this.dataType; - } - - /** - * Set the dataType property: Specifies the data type. - * - * @param dataType the dataType value to set. - * @return the IndexColumn object itself. - */ - public IndexColumn withDataType(FeatureDataType dataType) { - this.dataType = dataType; - return this; - } - - /** - * Get the columnName property: Specifies the column name. - * - * @return the columnName value. - */ - public String columnName() { - return this.columnName; - } - - /** - * Set the columnName property: Specifies the column name. - * - * @param columnName the columnName value to set. - * @return the IndexColumn object itself. - */ - public IndexColumn withColumnName(String columnName) { - this.columnName = columnName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); - jsonWriter.writeStringField("columnName", this.columnName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IndexColumn from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IndexColumn if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the IndexColumn. - */ - public static IndexColumn fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IndexColumn deserializedIndexColumn = new IndexColumn(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("dataType".equals(fieldName)) { - deserializedIndexColumn.dataType = FeatureDataType.fromString(reader.getString()); - } else if ("columnName".equals(fieldName)) { - deserializedIndexColumn.columnName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIndexColumn; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceContainerProperties.java deleted file mode 100644 index ab6d72994f68..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceContainerProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The InferenceContainerProperties model. - */ -@Fluent -public final class InferenceContainerProperties implements JsonSerializable { - /* - * The route to check the liveness of the inference server container. - */ - private Route livenessRoute; - - /* - * The route to check the readiness of the inference server container. - */ - private Route readinessRoute; - - /* - * The port to send the scoring requests to, within the inference server container. - */ - private Route scoringRoute; - - /** - * Creates an instance of InferenceContainerProperties class. - */ - public InferenceContainerProperties() { - } - - /** - * Get the livenessRoute property: The route to check the liveness of the inference server container. - * - * @return the livenessRoute value. - */ - public Route livenessRoute() { - return this.livenessRoute; - } - - /** - * Set the livenessRoute property: The route to check the liveness of the inference server container. - * - * @param livenessRoute the livenessRoute value to set. - * @return the InferenceContainerProperties object itself. - */ - public InferenceContainerProperties withLivenessRoute(Route livenessRoute) { - this.livenessRoute = livenessRoute; - return this; - } - - /** - * Get the readinessRoute property: The route to check the readiness of the inference server container. - * - * @return the readinessRoute value. - */ - public Route readinessRoute() { - return this.readinessRoute; - } - - /** - * Set the readinessRoute property: The route to check the readiness of the inference server container. - * - * @param readinessRoute the readinessRoute value to set. - * @return the InferenceContainerProperties object itself. - */ - public InferenceContainerProperties withReadinessRoute(Route readinessRoute) { - this.readinessRoute = readinessRoute; - return this; - } - - /** - * Get the scoringRoute property: The port to send the scoring requests to, within the inference server container. - * - * @return the scoringRoute value. - */ - public Route scoringRoute() { - return this.scoringRoute; - } - - /** - * Set the scoringRoute property: The port to send the scoring requests to, within the inference server container. - * - * @param scoringRoute the scoringRoute value to set. - * @return the InferenceContainerProperties object itself. - */ - public InferenceContainerProperties withScoringRoute(Route scoringRoute) { - this.scoringRoute = scoringRoute; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (livenessRoute() != null) { - livenessRoute().validate(); - } - if (readinessRoute() != null) { - readinessRoute().validate(); - } - if (scoringRoute() != null) { - scoringRoute().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("livenessRoute", this.livenessRoute); - jsonWriter.writeJsonField("readinessRoute", this.readinessRoute); - jsonWriter.writeJsonField("scoringRoute", this.scoringRoute); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InferenceContainerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InferenceContainerProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InferenceContainerProperties. - */ - public static InferenceContainerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InferenceContainerProperties deserializedInferenceContainerProperties = new InferenceContainerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("livenessRoute".equals(fieldName)) { - deserializedInferenceContainerProperties.livenessRoute = Route.fromJson(reader); - } else if ("readinessRoute".equals(fieldName)) { - deserializedInferenceContainerProperties.readinessRoute = Route.fromJson(reader); - } else if ("scoringRoute".equals(fieldName)) { - deserializedInferenceContainerProperties.scoringRoute = Route.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedInferenceContainerProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.java deleted file mode 100644 index 28d59aaf93c1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine the input data delivery mode. - */ -public final class InputDeliveryMode extends ExpandableStringEnum { - /** - * Static value ReadOnlyMount for InputDeliveryMode. - */ - public static final InputDeliveryMode READ_ONLY_MOUNT = fromString("ReadOnlyMount"); - - /** - * Static value ReadWriteMount for InputDeliveryMode. - */ - public static final InputDeliveryMode READ_WRITE_MOUNT = fromString("ReadWriteMount"); - - /** - * Static value Download for InputDeliveryMode. - */ - public static final InputDeliveryMode DOWNLOAD = fromString("Download"); - - /** - * Static value Direct for InputDeliveryMode. - */ - public static final InputDeliveryMode DIRECT = fromString("Direct"); - - /** - * Static value EvalMount for InputDeliveryMode. - */ - public static final InputDeliveryMode EVAL_MOUNT = fromString("EvalMount"); - - /** - * Static value EvalDownload for InputDeliveryMode. - */ - public static final InputDeliveryMode EVAL_DOWNLOAD = fromString("EvalDownload"); - - /** - * Creates a new instance of InputDeliveryMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public InputDeliveryMode() { - } - - /** - * Creates or finds a InputDeliveryMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding InputDeliveryMode. - */ - public static InputDeliveryMode fromString(String name) { - return fromString(name, InputDeliveryMode.class); - } - - /** - * Gets known InputDeliveryMode values. - * - * @return known InputDeliveryMode values. - */ - public static Collection values() { - return values(InputDeliveryMode.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.java deleted file mode 100644 index 0244c94f50bc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Primary metrics for InstanceSegmentation tasks. - */ -public final class InstanceSegmentationPrimaryMetrics extends ExpandableStringEnum { - /** - * Static value MeanAveragePrecision for InstanceSegmentationPrimaryMetrics. - */ - public static final InstanceSegmentationPrimaryMetrics MEAN_AVERAGE_PRECISION = fromString("MeanAveragePrecision"); - - /** - * Creates a new instance of InstanceSegmentationPrimaryMetrics value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public InstanceSegmentationPrimaryMetrics() { - } - - /** - * Creates or finds a InstanceSegmentationPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding InstanceSegmentationPrimaryMetrics. - */ - public static InstanceSegmentationPrimaryMetrics fromString(String name) { - return fromString(name, InstanceSegmentationPrimaryMetrics.class); - } - - /** - * Gets known InstanceSegmentationPrimaryMetrics values. - * - * @return known InstanceSegmentationPrimaryMetrics values. - */ - public static Collection values() { - return values(InstanceSegmentationPrimaryMetrics.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.java deleted file mode 100644 index 4ec3f90e2563..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Instance type schema. - */ -@Fluent -public final class InstanceTypeSchema implements JsonSerializable { - /* - * Node Selector - */ - private Map nodeSelector; - - /* - * Resource requests/limits for this instance type - */ - private InstanceTypeSchemaResources resources; - - /** - * Creates an instance of InstanceTypeSchema class. - */ - public InstanceTypeSchema() { - } - - /** - * Get the nodeSelector property: Node Selector. - * - * @return the nodeSelector value. - */ - public Map nodeSelector() { - return this.nodeSelector; - } - - /** - * Set the nodeSelector property: Node Selector. - * - * @param nodeSelector the nodeSelector value to set. - * @return the InstanceTypeSchema object itself. - */ - public InstanceTypeSchema withNodeSelector(Map nodeSelector) { - this.nodeSelector = nodeSelector; - return this; - } - - /** - * Get the resources property: Resource requests/limits for this instance type. - * - * @return the resources value. - */ - public InstanceTypeSchemaResources resources() { - return this.resources; - } - - /** - * Set the resources property: Resource requests/limits for this instance type. - * - * @param resources the resources value to set. - * @return the InstanceTypeSchema object itself. - */ - public InstanceTypeSchema withResources(InstanceTypeSchemaResources resources) { - this.resources = resources; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (resources() != null) { - resources().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("nodeSelector", this.nodeSelector, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("resources", this.resources); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InstanceTypeSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InstanceTypeSchema if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the InstanceTypeSchema. - */ - public static InstanceTypeSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InstanceTypeSchema deserializedInstanceTypeSchema = new InstanceTypeSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nodeSelector".equals(fieldName)) { - Map nodeSelector = reader.readMap(reader1 -> reader1.getString()); - deserializedInstanceTypeSchema.nodeSelector = nodeSelector; - } else if ("resources".equals(fieldName)) { - deserializedInstanceTypeSchema.resources = InstanceTypeSchemaResources.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedInstanceTypeSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.java deleted file mode 100644 index 153fc9dec1f2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Resource requests/limits for this instance type. - */ -@Fluent -public final class InstanceTypeSchemaResources implements JsonSerializable { - /* - * Resource requests for this instance type - */ - private Map requests; - - /* - * Resource limits for this instance type - */ - private Map limits; - - /** - * Creates an instance of InstanceTypeSchemaResources class. - */ - public InstanceTypeSchemaResources() { - } - - /** - * Get the requests property: Resource requests for this instance type. - * - * @return the requests value. - */ - public Map requests() { - return this.requests; - } - - /** - * Set the requests property: Resource requests for this instance type. - * - * @param requests the requests value to set. - * @return the InstanceTypeSchemaResources object itself. - */ - public InstanceTypeSchemaResources withRequests(Map requests) { - this.requests = requests; - return this; - } - - /** - * Get the limits property: Resource limits for this instance type. - * - * @return the limits value. - */ - public Map limits() { - return this.limits; - } - - /** - * Set the limits property: Resource limits for this instance type. - * - * @param limits the limits value to set. - * @return the InstanceTypeSchemaResources object itself. - */ - public InstanceTypeSchemaResources withLimits(Map limits) { - this.limits = limits; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("requests", this.requests, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("limits", this.limits, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InstanceTypeSchemaResources from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InstanceTypeSchemaResources if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InstanceTypeSchemaResources. - */ - public static InstanceTypeSchemaResources fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InstanceTypeSchemaResources deserializedInstanceTypeSchemaResources = new InstanceTypeSchemaResources(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("requests".equals(fieldName)) { - Map requests = reader.readMap(reader1 -> reader1.getString()); - deserializedInstanceTypeSchemaResources.requests = requests; - } else if ("limits".equals(fieldName)) { - Map limits = reader.readMap(reader1 -> reader1.getString()); - deserializedInstanceTypeSchemaResources.limits = limits; - } else { - reader.skipChildren(); - } - } - - return deserializedInstanceTypeSchemaResources; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IsolationMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IsolationMode.java deleted file mode 100644 index 05222c9696fe..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IsolationMode.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Isolation mode for the managed network of a machine learning workspace. - */ -public final class IsolationMode extends ExpandableStringEnum { - /** - * Static value Disabled for IsolationMode. - */ - public static final IsolationMode DISABLED = fromString("Disabled"); - - /** - * Static value AllowInternetOutbound for IsolationMode. - */ - public static final IsolationMode ALLOW_INTERNET_OUTBOUND = fromString("AllowInternetOutbound"); - - /** - * Static value AllowOnlyApprovedOutbound for IsolationMode. - */ - public static final IsolationMode ALLOW_ONLY_APPROVED_OUTBOUND = fromString("AllowOnlyApprovedOutbound"); - - /** - * Creates a new instance of IsolationMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IsolationMode() { - } - - /** - * Creates or finds a IsolationMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding IsolationMode. - */ - public static IsolationMode fromString(String name) { - return fromString(name, IsolationMode.class); - } - - /** - * Gets known IsolationMode values. - * - * @return known IsolationMode values. - */ - public static Collection values() { - return values(IsolationMode.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java deleted file mode 100644 index 41f545757bf5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; - -/** - * An immutable client-side representation of JobBase. - */ -public interface JobBase { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - JobBaseProperties 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.machinelearning.fluent.models.JobBaseInner object. - * - * @return the inner object. - */ - JobBaseInner innerModel(); - - /** - * The entirety of the JobBase definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The JobBase definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the JobBase definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the JobBase definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the JobBase definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(JobBaseProperties properties); - } - - /** - * The stage of the JobBase 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - JobBase create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - JobBase create(Context context); - } - } - - /** - * Begins update for the JobBase resource. - * - * @return the stage of resource update. - */ - JobBase.Update update(); - - /** - * The template for JobBase update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - JobBase apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - JobBase apply(Context context); - } - - /** - * The JobBase update stages. - */ - interface UpdateStages { - /** - * The stage of the JobBase update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(JobBaseProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - JobBase refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - JobBase refresh(Context context); - - /** - * Cancels a Job (asynchronous). - * - * @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. - */ - void cancel(); - - /** - * Cancels a Job (asynchronous). - * - * @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. - */ - void cancel(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java deleted file mode 100644 index 4ef82aaabab8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java +++ /dev/null @@ -1,430 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Base definition for a job. - */ -@Fluent -public class JobBaseProperties extends ResourceBase { - /* - * [Required] Specifies the type of job. - */ - private JobType jobType = JobType.fromString("JobBaseProperties"); - - /* - * Display name of job. - */ - private String displayName; - - /* - * Status of the job. - */ - private JobStatus status; - - /* - * The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. - */ - private String experimentName; - - /* - * List of JobEndpoints. - * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - */ - private Map services; - - /* - * ARM resource ID of the compute resource. - */ - private String computeId; - - /* - * Is the asset archived? - */ - private Boolean isArchived; - - /* - * Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. - * Defaults to AmlToken if null. - */ - private IdentityConfiguration identity; - - /* - * ARM resource ID of the component resource. - */ - private String componentId; - - /* - * Notification setting for the job - */ - private NotificationSetting notificationSetting; - - /** - * Creates an instance of JobBaseProperties class. - */ - public JobBaseProperties() { - } - - /** - * Get the jobType property: [Required] Specifies the type of job. - * - * @return the jobType value. - */ - public JobType jobType() { - return this.jobType; - } - - /** - * Get the displayName property: Display name of job. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Display name of job. - * - * @param displayName the displayName value to set. - * @return the JobBaseProperties object itself. - */ - public JobBaseProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the status property: Status of the job. - * - * @return the status value. - */ - public JobStatus status() { - return this.status; - } - - /** - * Set the status property: Status of the job. - * - * @param status the status value to set. - * @return the JobBaseProperties object itself. - */ - JobBaseProperties withStatus(JobStatus status) { - this.status = status; - return this; - } - - /** - * Get the experimentName property: The name of the experiment the job belongs to. If not set, the job is placed in - * the "Default" experiment. - * - * @return the experimentName value. - */ - public String experimentName() { - return this.experimentName; - } - - /** - * Set the experimentName property: The name of the experiment the job belongs to. If not set, the job is placed in - * the "Default" experiment. - * - * @param experimentName the experimentName value to set. - * @return the JobBaseProperties object itself. - */ - public JobBaseProperties withExperimentName(String experimentName) { - this.experimentName = experimentName; - return this; - } - - /** - * Get the services property: List of JobEndpoints. - * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - * - * @return the services value. - */ - public Map services() { - return this.services; - } - - /** - * Set the services property: List of JobEndpoints. - * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - * - * @param services the services value to set. - * @return the JobBaseProperties object itself. - */ - public JobBaseProperties withServices(Map services) { - this.services = services; - return this; - } - - /** - * Get the computeId property: ARM resource ID of the compute resource. - * - * @return the computeId value. - */ - public String computeId() { - return this.computeId; - } - - /** - * Set the computeId property: ARM resource ID of the compute resource. - * - * @param computeId the computeId value to set. - * @return the JobBaseProperties object itself. - */ - public JobBaseProperties withComputeId(String computeId) { - this.computeId = computeId; - return this; - } - - /** - * Get the isArchived property: Is the asset archived?. - * - * @return the isArchived value. - */ - public Boolean isArchived() { - return this.isArchived; - } - - /** - * Set the isArchived property: Is the asset archived?. - * - * @param isArchived the isArchived value to set. - * @return the JobBaseProperties object itself. - */ - public JobBaseProperties withIsArchived(Boolean isArchived) { - this.isArchived = isArchived; - return this; - } - - /** - * Get the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, - * UserIdentity or null. - * Defaults to AmlToken if null. - * - * @return the identity value. - */ - public IdentityConfiguration identity() { - return this.identity; - } - - /** - * Set the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, - * UserIdentity or null. - * Defaults to AmlToken if null. - * - * @param identity the identity value to set. - * @return the JobBaseProperties object itself. - */ - public JobBaseProperties withIdentity(IdentityConfiguration identity) { - this.identity = identity; - return this; - } - - /** - * Get the componentId property: ARM resource ID of the component resource. - * - * @return the componentId value. - */ - public String componentId() { - return this.componentId; - } - - /** - * Set the componentId property: ARM resource ID of the component resource. - * - * @param componentId the componentId value to set. - * @return the JobBaseProperties object itself. - */ - public JobBaseProperties withComponentId(String componentId) { - this.componentId = componentId; - return this; - } - - /** - * Get the notificationSetting property: Notification setting for the job. - * - * @return the notificationSetting value. - */ - public NotificationSetting notificationSetting() { - return this.notificationSetting; - } - - /** - * Set the notificationSetting property: Notification setting for the job. - * - * @param notificationSetting the notificationSetting value to set. - * @return the JobBaseProperties object itself. - */ - public JobBaseProperties withNotificationSetting(NotificationSetting notificationSetting) { - this.notificationSetting = notificationSetting; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JobBaseProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JobBaseProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JobBaseProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (services() != null) { - services().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (identity() != null) { - identity().validate(); - } - if (notificationSetting() != null) { - notificationSetting().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeStringField("displayName", this.displayName); - jsonWriter.writeStringField("experimentName", this.experimentName); - jsonWriter.writeMapField("services", this.services, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", this.computeId); - jsonWriter.writeBooleanField("isArchived", this.isArchived); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeStringField("componentId", this.componentId); - jsonWriter.writeJsonField("notificationSetting", this.notificationSetting); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobBaseProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobBaseProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the JobBaseProperties. - */ - public static JobBaseProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("jobType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AutoML".equals(discriminatorValue)) { - return AutoMLJob.fromJson(readerToUse.reset()); - } else if ("Command".equals(discriminatorValue)) { - return CommandJob.fromJson(readerToUse.reset()); - } else if ("Pipeline".equals(discriminatorValue)) { - return PipelineJob.fromJson(readerToUse.reset()); - } else if ("Spark".equals(discriminatorValue)) { - return SparkJob.fromJson(readerToUse.reset()); - } else if ("Sweep".equals(discriminatorValue)) { - return SweepJob.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static JobBaseProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobBaseProperties deserializedJobBaseProperties = new JobBaseProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedJobBaseProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedJobBaseProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedJobBaseProperties.withProperties(properties); - } else if ("jobType".equals(fieldName)) { - deserializedJobBaseProperties.jobType = JobType.fromString(reader.getString()); - } else if ("displayName".equals(fieldName)) { - deserializedJobBaseProperties.displayName = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedJobBaseProperties.status = JobStatus.fromString(reader.getString()); - } else if ("experimentName".equals(fieldName)) { - deserializedJobBaseProperties.experimentName = reader.getString(); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedJobBaseProperties.services = services; - } else if ("computeId".equals(fieldName)) { - deserializedJobBaseProperties.computeId = reader.getString(); - } else if ("isArchived".equals(fieldName)) { - deserializedJobBaseProperties.isArchived = reader.getNullable(JsonReader::getBoolean); - } else if ("identity".equals(fieldName)) { - deserializedJobBaseProperties.identity = IdentityConfiguration.fromJson(reader); - } else if ("componentId".equals(fieldName)) { - deserializedJobBaseProperties.componentId = reader.getString(); - } else if ("notificationSetting".equals(fieldName)) { - deserializedJobBaseProperties.notificationSetting = NotificationSetting.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedJobBaseProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseResourceArmPaginatedResult.java deleted file mode 100644 index 17f54a03c103..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseResourceArmPaginatedResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of JobBase entities. - */ -@Fluent -public final class JobBaseResourceArmPaginatedResult implements JsonSerializable { - /* - * An array of objects of type JobBase. - */ - private List value; - - /* - * The link to the next page of JobBase objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of JobBaseResourceArmPaginatedResult class. - */ - public JobBaseResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type JobBase. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type JobBase. - * - * @param value the value value to set. - * @return the JobBaseResourceArmPaginatedResult object itself. - */ - public JobBaseResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of JobBase objects. If null, there are no additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of JobBase objects. If null, there are no additional pages. - * - * @param nextLink the nextLink value to set. - * @return the JobBaseResourceArmPaginatedResult object itself. - */ - public JobBaseResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobBaseResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobBaseResourceArmPaginatedResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the JobBaseResourceArmPaginatedResult. - */ - public static JobBaseResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobBaseResourceArmPaginatedResult deserializedJobBaseResourceArmPaginatedResult - = new JobBaseResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> JobBaseInner.fromJson(reader1)); - deserializedJobBaseResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedJobBaseResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobBaseResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInput.java deleted file mode 100644 index 88f0cbd589de..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInput.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Command job definition. - */ -@Fluent -public class JobInput implements JsonSerializable { - /* - * [Required] Specifies the type of job. - */ - private JobInputType jobInputType = JobInputType.fromString("JobInput"); - - /* - * Description for the input. - */ - private String description; - - /** - * Creates an instance of JobInput class. - */ - public JobInput() { - } - - /** - * Get the jobInputType property: [Required] Specifies the type of job. - * - * @return the jobInputType value. - */ - public JobInputType jobInputType() { - return this.jobInputType; - } - - /** - * Get the description property: Description for the input. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description for the input. - * - * @param description the description value to set. - * @return the JobInput object itself. - */ - public JobInput withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("jobInputType", this.jobInputType == null ? null : this.jobInputType.toString()); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobInput if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the JobInput. - */ - public static JobInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("jobInputType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("mltable".equals(discriminatorValue)) { - return MLTableJobInput.fromJson(readerToUse.reset()); - } else if ("custom_model".equals(discriminatorValue)) { - return CustomModelJobInput.fromJson(readerToUse.reset()); - } else if ("mlflow_model".equals(discriminatorValue)) { - return MLFlowModelJobInput.fromJson(readerToUse.reset()); - } else if ("literal".equals(discriminatorValue)) { - return LiteralJobInput.fromJson(readerToUse.reset()); - } else if ("triton_model".equals(discriminatorValue)) { - return TritonModelJobInput.fromJson(readerToUse.reset()); - } else if ("uri_file".equals(discriminatorValue)) { - return UriFileJobInput.fromJson(readerToUse.reset()); - } else if ("uri_folder".equals(discriminatorValue)) { - return UriFolderJobInput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static JobInput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobInput deserializedJobInput = new JobInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobInputType".equals(fieldName)) { - deserializedJobInput.jobInputType = JobInputType.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedJobInput.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobInput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInputType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInputType.java deleted file mode 100644 index 313bd4569147..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInputType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine the Job Input Type. - */ -public final class JobInputType extends ExpandableStringEnum { - /** - * Static value literal for JobInputType. - */ - public static final JobInputType LITERAL = fromString("literal"); - - /** - * Static value uri_file for JobInputType. - */ - public static final JobInputType URI_FILE = fromString("uri_file"); - - /** - * Static value uri_folder for JobInputType. - */ - public static final JobInputType URI_FOLDER = fromString("uri_folder"); - - /** - * Static value mltable for JobInputType. - */ - public static final JobInputType MLTABLE = fromString("mltable"); - - /** - * Static value custom_model for JobInputType. - */ - public static final JobInputType CUSTOM_MODEL = fromString("custom_model"); - - /** - * Static value mlflow_model for JobInputType. - */ - public static final JobInputType MLFLOW_MODEL = fromString("mlflow_model"); - - /** - * Static value triton_model for JobInputType. - */ - public static final JobInputType TRITON_MODEL = fromString("triton_model"); - - /** - * Creates a new instance of JobInputType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JobInputType() { - } - - /** - * Creates or finds a JobInputType from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobInputType. - */ - public static JobInputType fromString(String name) { - return fromString(name, JobInputType.class); - } - - /** - * Gets known JobInputType values. - * - * @return known JobInputType values. - */ - public static Collection values() { - return values(JobInputType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimits.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimits.java deleted file mode 100644 index cb22815a974f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimits.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; - -/** - * The JobLimits model. - */ -@Fluent -public class JobLimits implements JsonSerializable { - /* - * [Required] JobLimit type. - */ - private JobLimitsType jobLimitsType = JobLimitsType.fromString("JobLimits"); - - /* - * The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with - * precision as low as Seconds. - */ - private Duration timeout; - - /** - * Creates an instance of JobLimits class. - */ - public JobLimits() { - } - - /** - * Get the jobLimitsType property: [Required] JobLimit type. - * - * @return the jobLimitsType value. - */ - public JobLimitsType jobLimitsType() { - return this.jobLimitsType; - } - - /** - * Get the timeout property: The max run duration in ISO 8601 format, after which the job will be cancelled. Only - * supports duration with precision as low as Seconds. - * - * @return the timeout value. - */ - public Duration timeout() { - return this.timeout; - } - - /** - * Set the timeout property: The max run duration in ISO 8601 format, after which the job will be cancelled. Only - * supports duration with precision as low as Seconds. - * - * @param timeout the timeout value to set. - * @return the JobLimits object itself. - */ - public JobLimits withTimeout(Duration timeout) { - this.timeout = timeout; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("jobLimitsType", this.jobLimitsType == null ? null : this.jobLimitsType.toString()); - jsonWriter.writeStringField("timeout", CoreUtils.durationToStringWithDays(this.timeout)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobLimits from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobLimits if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the JobLimits. - */ - public static JobLimits fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("jobLimitsType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Command".equals(discriminatorValue)) { - return CommandJobLimits.fromJson(readerToUse.reset()); - } else if ("Sweep".equals(discriminatorValue)) { - return SweepJobLimits.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static JobLimits fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobLimits deserializedJobLimits = new JobLimits(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobLimitsType".equals(fieldName)) { - deserializedJobLimits.jobLimitsType = JobLimitsType.fromString(reader.getString()); - } else if ("timeout".equals(fieldName)) { - deserializedJobLimits.timeout - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedJobLimits; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimitsType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimitsType.java deleted file mode 100644 index 701ae070452d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimitsType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for JobLimitsType. - */ -public final class JobLimitsType extends ExpandableStringEnum { - /** - * Static value Command for JobLimitsType. - */ - public static final JobLimitsType COMMAND = fromString("Command"); - - /** - * Static value Sweep for JobLimitsType. - */ - public static final JobLimitsType SWEEP = fromString("Sweep"); - - /** - * Creates a new instance of JobLimitsType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JobLimitsType() { - } - - /** - * Creates or finds a JobLimitsType from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobLimitsType. - */ - public static JobLimitsType fromString(String name) { - return fromString(name, JobLimitsType.class); - } - - /** - * Gets known JobLimitsType values. - * - * @return known JobLimitsType values. - */ - public static Collection values() { - return values(JobLimitsType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutput.java deleted file mode 100644 index 95004ccd7696..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutput.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Job output definition container information on where to find job output/logs. - */ -@Fluent -public class JobOutput implements JsonSerializable { - /* - * [Required] Specifies the type of job. - */ - private JobOutputType jobOutputType = JobOutputType.fromString("JobOutput"); - - /* - * Description for the output. - */ - private String description; - - /** - * Creates an instance of JobOutput class. - */ - public JobOutput() { - } - - /** - * Get the jobOutputType property: [Required] Specifies the type of job. - * - * @return the jobOutputType value. - */ - public JobOutputType jobOutputType() { - return this.jobOutputType; - } - - /** - * Get the description property: Description for the output. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description for the output. - * - * @param description the description value to set. - * @return the JobOutput object itself. - */ - public JobOutput withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobOutput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobOutput if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the JobOutput. - */ - public static JobOutput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("jobOutputType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("custom_model".equals(discriminatorValue)) { - return CustomModelJobOutput.fromJson(readerToUse.reset()); - } else if ("mlflow_model".equals(discriminatorValue)) { - return MLFlowModelJobOutput.fromJson(readerToUse.reset()); - } else if ("mltable".equals(discriminatorValue)) { - return MLTableJobOutput.fromJson(readerToUse.reset()); - } else if ("triton_model".equals(discriminatorValue)) { - return TritonModelJobOutput.fromJson(readerToUse.reset()); - } else if ("uri_file".equals(discriminatorValue)) { - return UriFileJobOutput.fromJson(readerToUse.reset()); - } else if ("uri_folder".equals(discriminatorValue)) { - return UriFolderJobOutput.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static JobOutput fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobOutput deserializedJobOutput = new JobOutput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobOutputType".equals(fieldName)) { - deserializedJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedJobOutput.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobOutput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutputType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutputType.java deleted file mode 100644 index 711b28b17355..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutputType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine the Job Output Type. - */ -public final class JobOutputType extends ExpandableStringEnum { - /** - * Static value uri_file for JobOutputType. - */ - public static final JobOutputType URI_FILE = fromString("uri_file"); - - /** - * Static value uri_folder for JobOutputType. - */ - public static final JobOutputType URI_FOLDER = fromString("uri_folder"); - - /** - * Static value mltable for JobOutputType. - */ - public static final JobOutputType MLTABLE = fromString("mltable"); - - /** - * Static value custom_model for JobOutputType. - */ - public static final JobOutputType CUSTOM_MODEL = fromString("custom_model"); - - /** - * Static value mlflow_model for JobOutputType. - */ - public static final JobOutputType MLFLOW_MODEL = fromString("mlflow_model"); - - /** - * Static value triton_model for JobOutputType. - */ - public static final JobOutputType TRITON_MODEL = fromString("triton_model"); - - /** - * Creates a new instance of JobOutputType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JobOutputType() { - } - - /** - * Creates or finds a JobOutputType from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobOutputType. - */ - public static JobOutputType fromString(String name) { - return fromString(name, JobOutputType.class); - } - - /** - * Gets known JobOutputType values. - * - * @return known JobOutputType values. - */ - public static Collection values() { - return values(JobOutputType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.java deleted file mode 100644 index 3786fa96eb3b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The JobResourceConfiguration model. - */ -@Fluent -public final class JobResourceConfiguration extends ResourceConfiguration { - /* - * Size of the docker container's shared memory block. This should be in the format of (number)(unit) where number - * as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes). - */ - private String shmSize; - - /* - * Extra arguments to pass to the Docker run command. This would override any parameters that have already been set - * by the system, or in this section. This parameter is only supported for Azure ML compute types. - */ - private String dockerArgs; - - /** - * Creates an instance of JobResourceConfiguration class. - */ - public JobResourceConfiguration() { - } - - /** - * Get the shmSize property: Size of the docker container's shared memory block. This should be in the format of - * (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), - * m(megabytes), or g(gigabytes). - * - * @return the shmSize value. - */ - public String shmSize() { - return this.shmSize; - } - - /** - * Set the shmSize property: Size of the docker container's shared memory block. This should be in the format of - * (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), - * m(megabytes), or g(gigabytes). - * - * @param shmSize the shmSize value to set. - * @return the JobResourceConfiguration object itself. - */ - public JobResourceConfiguration withShmSize(String shmSize) { - this.shmSize = shmSize; - return this; - } - - /** - * Get the dockerArgs property: Extra arguments to pass to the Docker run command. This would override any - * parameters that have already been set by the system, or in this section. This parameter is only supported for - * Azure ML compute types. - * - * @return the dockerArgs value. - */ - public String dockerArgs() { - return this.dockerArgs; - } - - /** - * Set the dockerArgs property: Extra arguments to pass to the Docker run command. This would override any - * parameters that have already been set by the system, or in this section. This parameter is only supported for - * Azure ML compute types. - * - * @param dockerArgs the dockerArgs value to set. - * @return the JobResourceConfiguration object itself. - */ - public JobResourceConfiguration withDockerArgs(String dockerArgs) { - this.dockerArgs = dockerArgs; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JobResourceConfiguration withInstanceCount(Integer instanceCount) { - super.withInstanceCount(instanceCount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JobResourceConfiguration withInstanceType(String instanceType) { - super.withInstanceType(instanceType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JobResourceConfiguration withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("instanceCount", instanceCount()); - jsonWriter.writeStringField("instanceType", instanceType()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeStringField("shmSize", this.shmSize); - jsonWriter.writeStringField("dockerArgs", this.dockerArgs); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobResourceConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobResourceConfiguration if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the JobResourceConfiguration. - */ - public static JobResourceConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobResourceConfiguration deserializedJobResourceConfiguration = new JobResourceConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceCount".equals(fieldName)) { - deserializedJobResourceConfiguration.withInstanceCount(reader.getNullable(JsonReader::getInt)); - } else if ("instanceType".equals(fieldName)) { - deserializedJobResourceConfiguration.withInstanceType(reader.getString()); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedJobResourceConfiguration.withProperties(properties); - } else if ("shmSize".equals(fieldName)) { - deserializedJobResourceConfiguration.shmSize = reader.getString(); - } else if ("dockerArgs".equals(fieldName)) { - deserializedJobResourceConfiguration.dockerArgs = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobResourceConfiguration; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java deleted file mode 100644 index 9fb78f3743d1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The JobScheduleAction model. - */ -@Fluent -public final class JobScheduleAction extends ScheduleActionBase { - /* - * [Required] Specifies the action type of the schedule - */ - private ScheduleActionType actionType = ScheduleActionType.CREATE_JOB; - - /* - * [Required] Defines Schedule action definition details. - */ - private JobBaseProperties jobDefinition; - - /** - * Creates an instance of JobScheduleAction class. - */ - public JobScheduleAction() { - } - - /** - * Get the actionType property: [Required] Specifies the action type of the schedule. - * - * @return the actionType value. - */ - @Override - public ScheduleActionType actionType() { - return this.actionType; - } - - /** - * Get the jobDefinition property: [Required] Defines Schedule action definition details. - * - * @return the jobDefinition value. - */ - public JobBaseProperties jobDefinition() { - return this.jobDefinition; - } - - /** - * Set the jobDefinition property: [Required] Defines Schedule action definition details. - * - * @param jobDefinition the jobDefinition value to set. - * @return the JobScheduleAction object itself. - */ - public JobScheduleAction withJobDefinition(JobBaseProperties jobDefinition) { - this.jobDefinition = jobDefinition; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (jobDefinition() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property jobDefinition in model JobScheduleAction")); - } else { - jobDefinition().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JobScheduleAction.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("jobDefinition", this.jobDefinition); - jsonWriter.writeStringField("actionType", this.actionType == null ? null : this.actionType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobScheduleAction from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobScheduleAction if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JobScheduleAction. - */ - public static JobScheduleAction fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobScheduleAction deserializedJobScheduleAction = new JobScheduleAction(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobDefinition".equals(fieldName)) { - deserializedJobScheduleAction.jobDefinition = JobBaseProperties.fromJson(reader); - } else if ("actionType".equals(fieldName)) { - deserializedJobScheduleAction.actionType = ScheduleActionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedJobScheduleAction; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java deleted file mode 100644 index e6374f1e1458..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Job endpoint definition. - */ -@Fluent -public final class JobService implements JsonSerializable { - /* - * Endpoint type. - */ - private String jobServiceType; - - /* - * Port for endpoint. - */ - private Integer port; - - /* - * Url for endpoint. - */ - private String endpoint; - - /* - * Status of endpoint. - */ - private String status; - - /* - * Any error in the service. - */ - private String errorMessage; - - /* - * Additional properties to set on the endpoint. - */ - private Map properties; - - /* - * Nodes that user would like to start the service on. - * If Nodes is not set or set to null, the service will only be started on leader node. - */ - private Nodes nodes; - - /** - * Creates an instance of JobService class. - */ - public JobService() { - } - - /** - * Get the jobServiceType property: Endpoint type. - * - * @return the jobServiceType value. - */ - public String jobServiceType() { - return this.jobServiceType; - } - - /** - * Set the jobServiceType property: Endpoint type. - * - * @param jobServiceType the jobServiceType value to set. - * @return the JobService object itself. - */ - public JobService withJobServiceType(String jobServiceType) { - this.jobServiceType = jobServiceType; - return this; - } - - /** - * Get the port property: Port for endpoint. - * - * @return the port value. - */ - public Integer port() { - return this.port; - } - - /** - * Set the port property: Port for endpoint. - * - * @param port the port value to set. - * @return the JobService object itself. - */ - public JobService withPort(Integer port) { - this.port = port; - return this; - } - - /** - * Get the endpoint property: Url for endpoint. - * - * @return the endpoint value. - */ - public String endpoint() { - return this.endpoint; - } - - /** - * Set the endpoint property: Url for endpoint. - * - * @param endpoint the endpoint value to set. - * @return the JobService object itself. - */ - public JobService withEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * Get the status property: Status of endpoint. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Get the errorMessage property: Any error in the service. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Get the properties property: Additional properties to set on the endpoint. - * - * @return the properties value. - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties property: Additional properties to set on the endpoint. - * - * @param properties the properties value to set. - * @return the JobService object itself. - */ - public JobService withProperties(Map properties) { - this.properties = properties; - return this; - } - - /** - * Get the nodes property: Nodes that user would like to start the service on. - * If Nodes is not set or set to null, the service will only be started on leader node. - * - * @return the nodes value. - */ - public Nodes nodes() { - return this.nodes; - } - - /** - * Set the nodes property: Nodes that user would like to start the service on. - * If Nodes is not set or set to null, the service will only be started on leader node. - * - * @param nodes the nodes value to set. - * @return the JobService object itself. - */ - public JobService withNodes(Nodes nodes) { - this.nodes = nodes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (nodes() != null) { - nodes().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("jobServiceType", this.jobServiceType); - jsonWriter.writeNumberField("port", this.port); - jsonWriter.writeStringField("endpoint", this.endpoint); - jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("nodes", this.nodes); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobService from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobService if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the JobService. - */ - public static JobService fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobService deserializedJobService = new JobService(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobServiceType".equals(fieldName)) { - deserializedJobService.jobServiceType = reader.getString(); - } else if ("port".equals(fieldName)) { - deserializedJobService.port = reader.getNullable(JsonReader::getInt); - } else if ("endpoint".equals(fieldName)) { - deserializedJobService.endpoint = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedJobService.status = reader.getString(); - } else if ("errorMessage".equals(fieldName)) { - deserializedJobService.errorMessage = reader.getString(); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedJobService.properties = properties; - } else if ("nodes".equals(fieldName)) { - deserializedJobService.nodes = Nodes.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedJobService; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.java deleted file mode 100644 index 9a2a2d5a618e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The status of a job. - */ -public final class JobStatus extends ExpandableStringEnum { - /** - * Static value NotStarted for JobStatus. - */ - public static final JobStatus NOT_STARTED = fromString("NotStarted"); - - /** - * Static value Starting for JobStatus. - */ - public static final JobStatus STARTING = fromString("Starting"); - - /** - * Static value Provisioning for JobStatus. - */ - public static final JobStatus PROVISIONING = fromString("Provisioning"); - - /** - * Static value Preparing for JobStatus. - */ - public static final JobStatus PREPARING = fromString("Preparing"); - - /** - * Static value Queued for JobStatus. - */ - public static final JobStatus QUEUED = fromString("Queued"); - - /** - * Static value Running for JobStatus. - */ - public static final JobStatus RUNNING = fromString("Running"); - - /** - * Static value Finalizing for JobStatus. - */ - public static final JobStatus FINALIZING = fromString("Finalizing"); - - /** - * Static value CancelRequested for JobStatus. - */ - public static final JobStatus CANCEL_REQUESTED = fromString("CancelRequested"); - - /** - * Static value Completed for JobStatus. - */ - public static final JobStatus COMPLETED = fromString("Completed"); - - /** - * Static value Failed for JobStatus. - */ - public static final JobStatus FAILED = fromString("Failed"); - - /** - * Static value Canceled for JobStatus. - */ - public static final JobStatus CANCELED = fromString("Canceled"); - - /** - * Static value NotResponding for JobStatus. - */ - public static final JobStatus NOT_RESPONDING = fromString("NotResponding"); - - /** - * Static value Paused for JobStatus. - */ - public static final JobStatus PAUSED = fromString("Paused"); - - /** - * Static value Unknown for JobStatus. - */ - public static final JobStatus UNKNOWN = fromString("Unknown"); - - /** - * Creates a new instance of JobStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JobStatus() { - } - - /** - * Creates or finds a JobStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobStatus. - */ - public static JobStatus fromString(String name) { - return fromString(name, JobStatus.class); - } - - /** - * Gets known JobStatus values. - * - * @return known JobStatus values. - */ - public static Collection values() { - return values(JobStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobTier.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobTier.java deleted file mode 100644 index a4ea9676a29f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobTier.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine the job tier. - */ -public final class JobTier extends ExpandableStringEnum { - /** - * Static value Null for JobTier. - */ - public static final JobTier NULL = fromString("Null"); - - /** - * Static value Spot for JobTier. - */ - public static final JobTier SPOT = fromString("Spot"); - - /** - * Static value Basic for JobTier. - */ - public static final JobTier BASIC = fromString("Basic"); - - /** - * Static value Standard for JobTier. - */ - public static final JobTier STANDARD = fromString("Standard"); - - /** - * Static value Premium for JobTier. - */ - public static final JobTier PREMIUM = fromString("Premium"); - - /** - * Creates a new instance of JobTier value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JobTier() { - } - - /** - * Creates or finds a JobTier from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobTier. - */ - public static JobTier fromString(String name) { - return fromString(name, JobTier.class); - } - - /** - * Gets known JobTier values. - * - * @return known JobTier values. - */ - public static Collection values() { - return values(JobTier.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobType.java deleted file mode 100644 index 9a7e0d5b6ae6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine the type of job. - */ -public final class JobType extends ExpandableStringEnum { - /** - * Static value AutoML for JobType. - */ - public static final JobType AUTO_ML = fromString("AutoML"); - - /** - * Static value Command for JobType. - */ - public static final JobType COMMAND = fromString("Command"); - - /** - * Static value Sweep for JobType. - */ - public static final JobType SWEEP = fromString("Sweep"); - - /** - * Static value Pipeline for JobType. - */ - public static final JobType PIPELINE = fromString("Pipeline"); - - /** - * Static value Spark for JobType. - */ - public static final JobType SPARK = fromString("Spark"); - - /** - * Creates a new instance of JobType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JobType() { - } - - /** - * Creates or finds a JobType from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobType. - */ - public static JobType fromString(String name) { - return fromString(name, JobType.class); - } - - /** - * Gets known JobType values. - * - * @return known JobType values. - */ - public static Collection values() { - return values(JobType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Jobs.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Jobs.java deleted file mode 100644 index bc5f3be5a755..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Jobs.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 Jobs. - */ -public interface Jobs { - /** - * Lists Jobs in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of JobBase entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Lists Jobs in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param jobType Type of job to be returned. - * @param tag Jobs returned will have this tag key. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param properties Comma-separated list of user property names (and optionally values). Example: - * prop1,prop2=value2. - * @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 a paginated list of JobBase entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, String jobType, String tag, - ListViewType listViewType, String properties, Context context); - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String id); - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String id, Context context); - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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 a Job by name/id along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String id, Context context); - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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 a Job by name/id. - */ - JobBase get(String resourceGroupName, String workspaceName, String id); - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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. - */ - void cancel(String resourceGroupName, String workspaceName, String id); - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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. - */ - void cancel(String resourceGroupName, String workspaceName, String id, Context context); - - /** - * Gets a Job by name/id. - * - * @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 a Job by name/id along with {@link Response}. - */ - JobBase getById(String id); - - /** - * Gets a Job by name/id. - * - * @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 a Job by name/id along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a Job (asynchronous). - * - * @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. - */ - void deleteById(String id); - - /** - * Deletes a Job (asynchronous). - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new JobBase resource. - * - * @param name resource name. - * @return the first stage of the new JobBase definition. - */ - JobBase.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyType.java deleted file mode 100644 index 6e0cf938e18d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for KeyType. - */ -public final class KeyType extends ExpandableStringEnum { - /** - * Static value Primary for KeyType. - */ - public static final KeyType PRIMARY = fromString("Primary"); - - /** - * Static value Secondary for KeyType. - */ - public static final KeyType SECONDARY = fromString("Secondary"); - - /** - * Creates a new instance of KeyType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public KeyType() { - } - - /** - * Creates or finds a KeyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding KeyType. - */ - public static KeyType fromString(String name) { - return fromString(name, KeyType.class); - } - - /** - * Gets known KeyType values. - * - * @return known KeyType values. - */ - public static Collection values() { - return values(KeyType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java deleted file mode 100644 index d28ca97e56c6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * A Machine Learning compute based on Kubernetes Compute. - */ -@Fluent -public final class Kubernetes extends Compute { - /* - * The type of compute - */ - private ComputeType computeType = ComputeType.KUBERNETES; - - /* - * Properties of Kubernetes - */ - private KubernetesProperties properties; - - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - - /** - * Creates an instance of Kubernetes class. - */ - public Kubernetes() { - } - - /** - * Get the computeType property: The type of compute. - * - * @return the computeType value. - */ - @Override - public ComputeType computeType() { - return this.computeType; - } - - /** - * Get the properties property: Properties of Kubernetes. - * - * @return the properties value. - */ - public KubernetesProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of Kubernetes. - * - * @param properties the properties value to set. - * @return the Kubernetes object itself. - */ - public Kubernetes withProperties(KubernetesProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - - /** - * {@inheritDoc} - */ - @Override - public Kubernetes withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Kubernetes withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Kubernetes withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Kubernetes withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeLocation", computeLocation()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("resourceId", resourceId()); - jsonWriter.writeBooleanField("disableLocalAuth", disableLocalAuth()); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Kubernetes from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Kubernetes if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the Kubernetes. - */ - public static Kubernetes fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Kubernetes deserializedKubernetes = new Kubernetes(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeLocation".equals(fieldName)) { - deserializedKubernetes.withComputeLocation(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedKubernetes.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedKubernetes.withDescription(reader.getString()); - } else if ("createdOn".equals(fieldName)) { - deserializedKubernetes.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("modifiedOn".equals(fieldName)) { - deserializedKubernetes.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("resourceId".equals(fieldName)) { - deserializedKubernetes.withResourceId(reader.getString()); - } else if ("provisioningErrors".equals(fieldName)) { - List provisioningErrors - = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedKubernetes.provisioningErrors = provisioningErrors; - } else if ("isAttachedCompute".equals(fieldName)) { - deserializedKubernetes.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); - } else if ("disableLocalAuth".equals(fieldName)) { - deserializedKubernetes.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); - } else if ("computeType".equals(fieldName)) { - deserializedKubernetes.computeType = ComputeType.fromString(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedKubernetes.properties = KubernetesProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedKubernetes; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesOnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesOnlineDeployment.java deleted file mode 100644 index 747afb926be8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesOnlineDeployment.java +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Properties specific to a KubernetesOnlineDeployment. - */ -@Fluent -public final class KubernetesOnlineDeployment extends OnlineDeploymentProperties { - /* - * [Required] The compute type of the endpoint. - */ - private EndpointComputeType endpointComputeType = EndpointComputeType.KUBERNETES; - - /* - * The resource requirements for the container (cpu and memory). - */ - private ContainerResourceRequirements containerResourceRequirements; - - /* - * Provisioning state for the endpoint deployment. - */ - private DeploymentProvisioningState provisioningState; - - /** - * Creates an instance of KubernetesOnlineDeployment class. - */ - public KubernetesOnlineDeployment() { - } - - /** - * Get the endpointComputeType property: [Required] The compute type of the endpoint. - * - * @return the endpointComputeType value. - */ - @Override - public EndpointComputeType endpointComputeType() { - return this.endpointComputeType; - } - - /** - * Get the containerResourceRequirements property: The resource requirements for the container (cpu and memory). - * - * @return the containerResourceRequirements value. - */ - public ContainerResourceRequirements containerResourceRequirements() { - return this.containerResourceRequirements; - } - - /** - * Set the containerResourceRequirements property: The resource requirements for the container (cpu and memory). - * - * @param containerResourceRequirements the containerResourceRequirements value to set. - * @return the KubernetesOnlineDeployment object itself. - */ - public KubernetesOnlineDeployment - withContainerResourceRequirements(ContainerResourceRequirements containerResourceRequirements) { - this.containerResourceRequirements = containerResourceRequirements; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the endpoint deployment. - * - * @return the provisioningState value. - */ - @Override - public DeploymentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public KubernetesOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { - super.withScaleSettings(scaleSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public KubernetesOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { - super.withRequestSettings(requestSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public KubernetesOnlineDeployment withModelMountPath(String modelMountPath) { - super.withModelMountPath(modelMountPath); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public KubernetesOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { - super.withAppInsightsEnabled(appInsightsEnabled); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public KubernetesOnlineDeployment withLivenessProbe(ProbeSettings livenessProbe) { - super.withLivenessProbe(livenessProbe); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public KubernetesOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { - super.withReadinessProbe(readinessProbe); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public KubernetesOnlineDeployment withInstanceType(String instanceType) { - super.withInstanceType(instanceType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public KubernetesOnlineDeployment withModel(String model) { - super.withModel(model); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public KubernetesOnlineDeployment - withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { - super.withEgressPublicNetworkAccess(egressPublicNetworkAccess); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public KubernetesOnlineDeployment withDataCollector(DataCollector dataCollector) { - super.withDataCollector(dataCollector); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public KubernetesOnlineDeployment withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public KubernetesOnlineDeployment withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public KubernetesOnlineDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public KubernetesOnlineDeployment withEnvironmentId(String environmentId) { - super.withEnvironmentId(environmentId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public KubernetesOnlineDeployment withEnvironmentVariables(Map environmentVariables) { - super.withEnvironmentVariables(environmentVariables); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (containerResourceRequirements() != null) { - containerResourceRequirements().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("codeConfiguration", codeConfiguration()); - jsonWriter.writeStringField("environmentId", environmentId()); - jsonWriter.writeMapField("environmentVariables", environmentVariables(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("scaleSettings", scaleSettings()); - jsonWriter.writeJsonField("requestSettings", requestSettings()); - jsonWriter.writeStringField("modelMountPath", modelMountPath()); - jsonWriter.writeBooleanField("appInsightsEnabled", appInsightsEnabled()); - jsonWriter.writeJsonField("livenessProbe", livenessProbe()); - jsonWriter.writeJsonField("readinessProbe", readinessProbe()); - jsonWriter.writeStringField("instanceType", instanceType()); - jsonWriter.writeStringField("model", model()); - jsonWriter.writeStringField("egressPublicNetworkAccess", - egressPublicNetworkAccess() == null ? null : egressPublicNetworkAccess().toString()); - jsonWriter.writeJsonField("dataCollector", dataCollector()); - jsonWriter.writeStringField("endpointComputeType", - this.endpointComputeType == null ? null : this.endpointComputeType.toString()); - jsonWriter.writeJsonField("containerResourceRequirements", this.containerResourceRequirements); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of KubernetesOnlineDeployment from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of KubernetesOnlineDeployment if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the KubernetesOnlineDeployment. - */ - public static KubernetesOnlineDeployment fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - KubernetesOnlineDeployment deserializedKubernetesOnlineDeployment = new KubernetesOnlineDeployment(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withDescription(reader.getString()); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedKubernetesOnlineDeployment.withProperties(properties); - } else if ("codeConfiguration".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withCodeConfiguration(CodeConfiguration.fromJson(reader)); - } else if ("environmentId".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withEnvironmentId(reader.getString()); - } else if ("environmentVariables".equals(fieldName)) { - Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); - deserializedKubernetesOnlineDeployment.withEnvironmentVariables(environmentVariables); - } else if ("scaleSettings".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withScaleSettings(OnlineScaleSettings.fromJson(reader)); - } else if ("requestSettings".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withRequestSettings(OnlineRequestSettings.fromJson(reader)); - } else if ("modelMountPath".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withModelMountPath(reader.getString()); - } else if ("appInsightsEnabled".equals(fieldName)) { - deserializedKubernetesOnlineDeployment - .withAppInsightsEnabled(reader.getNullable(JsonReader::getBoolean)); - } else if ("livenessProbe".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withLivenessProbe(ProbeSettings.fromJson(reader)); - } else if ("readinessProbe".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withReadinessProbe(ProbeSettings.fromJson(reader)); - } else if ("provisioningState".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.provisioningState - = DeploymentProvisioningState.fromString(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withInstanceType(reader.getString()); - } else if ("model".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withModel(reader.getString()); - } else if ("egressPublicNetworkAccess".equals(fieldName)) { - deserializedKubernetesOnlineDeployment - .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.fromString(reader.getString())); - } else if ("dataCollector".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withDataCollector(DataCollector.fromJson(reader)); - } else if ("endpointComputeType".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.endpointComputeType - = EndpointComputeType.fromString(reader.getString()); - } else if ("containerResourceRequirements".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.containerResourceRequirements - = ContainerResourceRequirements.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedKubernetesOnlineDeployment; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java deleted file mode 100644 index 55437affe3b8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Kubernetes properties. - */ -@Fluent -public final class KubernetesProperties implements JsonSerializable { - /* - * Relay connection string. - */ - private String relayConnectionString; - - /* - * ServiceBus connection string. - */ - private String serviceBusConnectionString; - - /* - * Extension principal-id. - */ - private String extensionPrincipalId; - - /* - * Extension instance release train. - */ - private String extensionInstanceReleaseTrain; - - /* - * VC name. - */ - private String vcName; - - /* - * Compute namespace - */ - private String namespace; - - /* - * Default instance type - */ - private String defaultInstanceType; - - /* - * Instance Type Schema - */ - private Map instanceTypes; - - /** - * Creates an instance of KubernetesProperties class. - */ - public KubernetesProperties() { - } - - /** - * Get the relayConnectionString property: Relay connection string. - * - * @return the relayConnectionString value. - */ - public String relayConnectionString() { - return this.relayConnectionString; - } - - /** - * Set the relayConnectionString property: Relay connection string. - * - * @param relayConnectionString the relayConnectionString value to set. - * @return the KubernetesProperties object itself. - */ - public KubernetesProperties withRelayConnectionString(String relayConnectionString) { - this.relayConnectionString = relayConnectionString; - return this; - } - - /** - * Get the serviceBusConnectionString property: ServiceBus connection string. - * - * @return the serviceBusConnectionString value. - */ - public String serviceBusConnectionString() { - return this.serviceBusConnectionString; - } - - /** - * Set the serviceBusConnectionString property: ServiceBus connection string. - * - * @param serviceBusConnectionString the serviceBusConnectionString value to set. - * @return the KubernetesProperties object itself. - */ - public KubernetesProperties withServiceBusConnectionString(String serviceBusConnectionString) { - this.serviceBusConnectionString = serviceBusConnectionString; - return this; - } - - /** - * Get the extensionPrincipalId property: Extension principal-id. - * - * @return the extensionPrincipalId value. - */ - public String extensionPrincipalId() { - return this.extensionPrincipalId; - } - - /** - * Set the extensionPrincipalId property: Extension principal-id. - * - * @param extensionPrincipalId the extensionPrincipalId value to set. - * @return the KubernetesProperties object itself. - */ - public KubernetesProperties withExtensionPrincipalId(String extensionPrincipalId) { - this.extensionPrincipalId = extensionPrincipalId; - return this; - } - - /** - * Get the extensionInstanceReleaseTrain property: Extension instance release train. - * - * @return the extensionInstanceReleaseTrain value. - */ - public String extensionInstanceReleaseTrain() { - return this.extensionInstanceReleaseTrain; - } - - /** - * Set the extensionInstanceReleaseTrain property: Extension instance release train. - * - * @param extensionInstanceReleaseTrain the extensionInstanceReleaseTrain value to set. - * @return the KubernetesProperties object itself. - */ - public KubernetesProperties withExtensionInstanceReleaseTrain(String extensionInstanceReleaseTrain) { - this.extensionInstanceReleaseTrain = extensionInstanceReleaseTrain; - return this; - } - - /** - * Get the vcName property: VC name. - * - * @return the vcName value. - */ - public String vcName() { - return this.vcName; - } - - /** - * Set the vcName property: VC name. - * - * @param vcName the vcName value to set. - * @return the KubernetesProperties object itself. - */ - public KubernetesProperties withVcName(String vcName) { - this.vcName = vcName; - return this; - } - - /** - * Get the namespace property: Compute namespace. - * - * @return the namespace value. - */ - public String namespace() { - return this.namespace; - } - - /** - * Set the namespace property: Compute namespace. - * - * @param namespace the namespace value to set. - * @return the KubernetesProperties object itself. - */ - public KubernetesProperties withNamespace(String namespace) { - this.namespace = namespace; - return this; - } - - /** - * Get the defaultInstanceType property: Default instance type. - * - * @return the defaultInstanceType value. - */ - public String defaultInstanceType() { - return this.defaultInstanceType; - } - - /** - * Set the defaultInstanceType property: Default instance type. - * - * @param defaultInstanceType the defaultInstanceType value to set. - * @return the KubernetesProperties object itself. - */ - public KubernetesProperties withDefaultInstanceType(String defaultInstanceType) { - this.defaultInstanceType = defaultInstanceType; - return this; - } - - /** - * Get the instanceTypes property: Instance Type Schema. - * - * @return the instanceTypes value. - */ - public Map instanceTypes() { - return this.instanceTypes; - } - - /** - * Set the instanceTypes property: Instance Type Schema. - * - * @param instanceTypes the instanceTypes value to set. - * @return the KubernetesProperties object itself. - */ - public KubernetesProperties withInstanceTypes(Map instanceTypes) { - this.instanceTypes = instanceTypes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (instanceTypes() != null) { - instanceTypes().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("relayConnectionString", this.relayConnectionString); - jsonWriter.writeStringField("serviceBusConnectionString", this.serviceBusConnectionString); - jsonWriter.writeStringField("extensionPrincipalId", this.extensionPrincipalId); - jsonWriter.writeStringField("extensionInstanceReleaseTrain", this.extensionInstanceReleaseTrain); - jsonWriter.writeStringField("vcName", this.vcName); - jsonWriter.writeStringField("namespace", this.namespace); - jsonWriter.writeStringField("defaultInstanceType", this.defaultInstanceType); - jsonWriter.writeMapField("instanceTypes", this.instanceTypes, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of KubernetesProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of KubernetesProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the KubernetesProperties. - */ - public static KubernetesProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - KubernetesProperties deserializedKubernetesProperties = new KubernetesProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("relayConnectionString".equals(fieldName)) { - deserializedKubernetesProperties.relayConnectionString = reader.getString(); - } else if ("serviceBusConnectionString".equals(fieldName)) { - deserializedKubernetesProperties.serviceBusConnectionString = reader.getString(); - } else if ("extensionPrincipalId".equals(fieldName)) { - deserializedKubernetesProperties.extensionPrincipalId = reader.getString(); - } else if ("extensionInstanceReleaseTrain".equals(fieldName)) { - deserializedKubernetesProperties.extensionInstanceReleaseTrain = reader.getString(); - } else if ("vcName".equals(fieldName)) { - deserializedKubernetesProperties.vcName = reader.getString(); - } else if ("namespace".equals(fieldName)) { - deserializedKubernetesProperties.namespace = reader.getString(); - } else if ("defaultInstanceType".equals(fieldName)) { - deserializedKubernetesProperties.defaultInstanceType = reader.getString(); - } else if ("instanceTypes".equals(fieldName)) { - Map instanceTypes - = reader.readMap(reader1 -> InstanceTypeSchema.fromJson(reader1)); - deserializedKubernetesProperties.instanceTypes = instanceTypes; - } else { - reader.skipChildren(); - } - } - - return deserializedKubernetesProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesSchema.java deleted file mode 100644 index 1466829889c5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesSchema.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Kubernetes Compute Schema. - */ -@Fluent -public class KubernetesSchema implements JsonSerializable { - /* - * Properties of Kubernetes - */ - private KubernetesProperties properties; - - /** - * Creates an instance of KubernetesSchema class. - */ - public KubernetesSchema() { - } - - /** - * Get the properties property: Properties of Kubernetes. - * - * @return the properties value. - */ - public KubernetesProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of Kubernetes. - * - * @param properties the properties value to set. - * @return the KubernetesSchema object itself. - */ - public KubernetesSchema withProperties(KubernetesProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of KubernetesSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of KubernetesSchema if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the KubernetesSchema. - */ - public static KubernetesSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - KubernetesSchema deserializedKubernetesSchema = new KubernetesSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedKubernetesSchema.properties = KubernetesProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedKubernetesSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LakeHouseArtifact.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LakeHouseArtifact.java deleted file mode 100644 index 3d32d196877c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LakeHouseArtifact.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The LakeHouseArtifact model. - */ -@Fluent -public final class LakeHouseArtifact extends OneLakeArtifact { - /* - * [Required] OneLake artifact type - */ - private OneLakeArtifactType artifactType = OneLakeArtifactType.LAKE_HOUSE; - - /** - * Creates an instance of LakeHouseArtifact class. - */ - public LakeHouseArtifact() { - } - - /** - * Get the artifactType property: [Required] OneLake artifact type. - * - * @return the artifactType value. - */ - @Override - public OneLakeArtifactType artifactType() { - return this.artifactType; - } - - /** - * {@inheritDoc} - */ - @Override - public LakeHouseArtifact withArtifactName(String artifactName) { - super.withArtifactName(artifactName); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("artifactName", artifactName()); - jsonWriter.writeStringField("artifactType", this.artifactType == null ? null : this.artifactType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LakeHouseArtifact from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LakeHouseArtifact if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LakeHouseArtifact. - */ - public static LakeHouseArtifact fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LakeHouseArtifact deserializedLakeHouseArtifact = new LakeHouseArtifact(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("artifactName".equals(fieldName)) { - deserializedLakeHouseArtifact.withArtifactName(reader.getString()); - } else if ("artifactType".equals(fieldName)) { - deserializedLakeHouseArtifact.artifactType = OneLakeArtifactType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedLakeHouseArtifact; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.java deleted file mode 100644 index ddd62a953a6a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Learning rate scheduler enum. - */ -public final class LearningRateScheduler extends ExpandableStringEnum { - /** - * Static value None for LearningRateScheduler. - */ - public static final LearningRateScheduler NONE = fromString("None"); - - /** - * Static value WarmupCosine for LearningRateScheduler. - */ - public static final LearningRateScheduler WARMUP_COSINE = fromString("WarmupCosine"); - - /** - * Static value Step for LearningRateScheduler. - */ - public static final LearningRateScheduler STEP = fromString("Step"); - - /** - * Creates a new instance of LearningRateScheduler value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LearningRateScheduler() { - } - - /** - * Creates or finds a LearningRateScheduler from its string representation. - * - * @param name a name to look for. - * @return the corresponding LearningRateScheduler. - */ - public static LearningRateScheduler fromString(String name) { - return fromString(name, LearningRateScheduler.class); - } - - /** - * Gets known LearningRateScheduler values. - * - * @return known LearningRateScheduler values. - */ - public static Collection values() { - return values(LearningRateScheduler.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListAmlUserFeatureResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListAmlUserFeatureResult.java deleted file mode 100644 index 5be8fc567662..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListAmlUserFeatureResult.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner; -import java.io.IOException; -import java.util.List; - -/** - * The List Aml user feature operation response. - */ -@Immutable -public final class ListAmlUserFeatureResult implements JsonSerializable { - /* - * The list of AML user facing features. - */ - private List value; - - /* - * The URI to fetch the next page of AML user features information. Call ListNext() with this to fetch the next page - * of AML user features information. - */ - private String nextLink; - - /** - * Creates an instance of ListAmlUserFeatureResult class. - */ - public ListAmlUserFeatureResult() { - } - - /** - * Get the value property: The list of AML user facing features. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI to fetch the next page of AML user features information. Call ListNext() with - * this to fetch the next page of AML user features information. - * - * @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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ListAmlUserFeatureResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ListAmlUserFeatureResult if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ListAmlUserFeatureResult. - */ - public static ListAmlUserFeatureResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ListAmlUserFeatureResult deserializedListAmlUserFeatureResult = new ListAmlUserFeatureResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> AmlUserFeatureInner.fromJson(reader1)); - deserializedListAmlUserFeatureResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedListAmlUserFeatureResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedListAmlUserFeatureResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListNotebookKeysResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListNotebookKeysResult.java deleted file mode 100644 index 5c1b85f07b18..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListNotebookKeysResult.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.ListNotebookKeysResultInner; - -/** - * An immutable client-side representation of ListNotebookKeysResult. - */ -public interface ListNotebookKeysResult { - /** - * Gets the primaryAccessKey property: The primaryAccessKey property. - * - * @return the primaryAccessKey value. - */ - String primaryAccessKey(); - - /** - * Gets the secondaryAccessKey property: The secondaryAccessKey property. - * - * @return the secondaryAccessKey value. - */ - String secondaryAccessKey(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ListNotebookKeysResultInner object. - * - * @return the inner object. - */ - ListNotebookKeysResultInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListStorageAccountKeysResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListStorageAccountKeysResult.java deleted file mode 100644 index e730c56ef0d4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListStorageAccountKeysResult.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.ListStorageAccountKeysResultInner; - -/** - * An immutable client-side representation of ListStorageAccountKeysResult. - */ -public interface ListStorageAccountKeysResult { - /** - * Gets the userStorageKey property: The userStorageKey property. - * - * @return the userStorageKey value. - */ - String userStorageKey(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ListStorageAccountKeysResultInner object. - * - * @return the inner object. - */ - ListStorageAccountKeysResultInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListUsagesResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListUsagesResult.java deleted file mode 100644 index b6bc66cf0c61..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListUsagesResult.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.UsageInner; -import java.io.IOException; -import java.util.List; - -/** - * The List Usages operation response. - */ -@Immutable -public final class ListUsagesResult implements JsonSerializable { - /* - * The list of AML resource usages. - */ - private List value; - - /* - * The URI to fetch the next page of AML resource usage information. Call ListNext() with this to fetch the next - * page of AML resource usage information. - */ - private String nextLink; - - /** - * Creates an instance of ListUsagesResult class. - */ - public ListUsagesResult() { - } - - /** - * Get the value property: The list of AML resource usages. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI to fetch the next page of AML resource usage information. Call ListNext() with - * this to fetch the next page of AML resource usage information. - * - * @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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ListUsagesResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ListUsagesResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ListUsagesResult. - */ - public static ListUsagesResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ListUsagesResult deserializedListUsagesResult = new ListUsagesResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> UsageInner.fromJson(reader1)); - deserializedListUsagesResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedListUsagesResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedListUsagesResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListViewType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListViewType.java deleted file mode 100644 index 2ca4088002d8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListViewType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for ListViewType. - */ -public final class ListViewType extends ExpandableStringEnum { - /** - * Static value ActiveOnly for ListViewType. - */ - public static final ListViewType ACTIVE_ONLY = fromString("ActiveOnly"); - - /** - * Static value ArchivedOnly for ListViewType. - */ - public static final ListViewType ARCHIVED_ONLY = fromString("ArchivedOnly"); - - /** - * Static value All for ListViewType. - */ - public static final ListViewType ALL = fromString("All"); - - /** - * Creates a new instance of ListViewType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ListViewType() { - } - - /** - * Creates or finds a ListViewType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ListViewType. - */ - public static ListViewType fromString(String name) { - return fromString(name, ListViewType.class); - } - - /** - * Gets known ListViewType values. - * - * @return known ListViewType values. - */ - public static Collection values() { - return values(ListViewType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceKeysResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceKeysResult.java deleted file mode 100644 index f66447f27bbf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceKeysResult.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.ListWorkspaceKeysResultInner; - -/** - * An immutable client-side representation of ListWorkspaceKeysResult. - */ -public interface ListWorkspaceKeysResult { - /** - * Gets the userStorageKey property: The userStorageKey property. - * - * @return the userStorageKey value. - */ - String userStorageKey(); - - /** - * Gets the userStorageResourceId property: The userStorageResourceId property. - * - * @return the userStorageResourceId value. - */ - String userStorageResourceId(); - - /** - * Gets the appInsightsInstrumentationKey property: The appInsightsInstrumentationKey property. - * - * @return the appInsightsInstrumentationKey value. - */ - String appInsightsInstrumentationKey(); - - /** - * Gets the containerRegistryCredentials property: The containerRegistryCredentials property. - * - * @return the containerRegistryCredentials value. - */ - RegistryListCredentialsResult containerRegistryCredentials(); - - /** - * Gets the notebookAccessKeys property: The notebookAccessKeys property. - * - * @return the notebookAccessKeys value. - */ - ListNotebookKeysResult notebookAccessKeys(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ListWorkspaceKeysResultInner object. - * - * @return the inner object. - */ - ListWorkspaceKeysResultInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceQuotas.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceQuotas.java deleted file mode 100644 index fd651f77c407..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceQuotas.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner; -import java.io.IOException; -import java.util.List; - -/** - * The List WorkspaceQuotasByVMFamily operation response. - */ -@Immutable -public final class ListWorkspaceQuotas implements JsonSerializable { - /* - * The list of Workspace Quotas by VM Family - */ - private List value; - - /* - * The URI to fetch the next page of workspace quota information by VM Family. Call ListNext() with this to fetch - * the next page of Workspace Quota information. - */ - private String nextLink; - - /** - * Creates an instance of ListWorkspaceQuotas class. - */ - public ListWorkspaceQuotas() { - } - - /** - * Get the value property: The list of Workspace Quotas by VM Family. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI to fetch the next page of workspace quota information by VM Family. Call - * ListNext() with this to fetch the next page of Workspace Quota information. - * - * @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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ListWorkspaceQuotas from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ListWorkspaceQuotas if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ListWorkspaceQuotas. - */ - public static ListWorkspaceQuotas fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ListWorkspaceQuotas deserializedListWorkspaceQuotas = new ListWorkspaceQuotas(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ResourceQuotaInner.fromJson(reader1)); - deserializedListWorkspaceQuotas.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedListWorkspaceQuotas.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedListWorkspaceQuotas; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LiteralJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LiteralJobInput.java deleted file mode 100644 index f1deadd6f7c1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LiteralJobInput.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Literal input type. - */ -@Fluent -public final class LiteralJobInput extends JobInput { - /* - * [Required] Specifies the type of job. - */ - private JobInputType jobInputType = JobInputType.LITERAL; - - /* - * [Required] Literal value for the input. - */ - private String value; - - /** - * Creates an instance of LiteralJobInput class. - */ - public LiteralJobInput() { - } - - /** - * Get the jobInputType property: [Required] Specifies the type of job. - * - * @return the jobInputType value. - */ - @Override - public JobInputType jobInputType() { - return this.jobInputType; - } - - /** - * Get the value property: [Required] Literal value for the input. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: [Required] Literal value for the input. - * - * @param value the value value to set. - * @return the LiteralJobInput object itself. - */ - public LiteralJobInput withValue(String value) { - this.value = value; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public LiteralJobInput withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model LiteralJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(LiteralJobInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("value", this.value); - jsonWriter.writeStringField("jobInputType", this.jobInputType == null ? null : this.jobInputType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LiteralJobInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LiteralJobInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LiteralJobInput. - */ - public static LiteralJobInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LiteralJobInput deserializedLiteralJobInput = new LiteralJobInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedLiteralJobInput.withDescription(reader.getString()); - } else if ("value".equals(fieldName)) { - deserializedLiteralJobInput.value = reader.getString(); - } else if ("jobInputType".equals(fieldName)) { - deserializedLiteralJobInput.jobInputType = JobInputType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedLiteralJobInput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.java deleted file mode 100644 index badce22c4f01..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Load Balancer Type. - */ -public final class LoadBalancerType extends ExpandableStringEnum { - /** - * Static value PublicIp for LoadBalancerType. - */ - public static final LoadBalancerType PUBLIC_IP = fromString("PublicIp"); - - /** - * Static value InternalLoadBalancer for LoadBalancerType. - */ - public static final LoadBalancerType INTERNAL_LOAD_BALANCER = fromString("InternalLoadBalancer"); - - /** - * Creates a new instance of LoadBalancerType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LoadBalancerType() { - } - - /** - * Creates or finds a LoadBalancerType from its string representation. - * - * @param name a name to look for. - * @return the corresponding LoadBalancerType. - */ - public static LoadBalancerType fromString(String name) { - return fromString(name, LoadBalancerType.class); - } - - /** - * Gets known LoadBalancerType values. - * - * @return known LoadBalancerType values. - */ - public static Collection values() { - return values(LoadBalancerType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.java deleted file mode 100644 index 2e95e895cf83..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum for setting log verbosity. - */ -public final class LogVerbosity extends ExpandableStringEnum { - /** - * Static value NotSet for LogVerbosity. - */ - public static final LogVerbosity NOT_SET = fromString("NotSet"); - - /** - * Static value Debug for LogVerbosity. - */ - public static final LogVerbosity DEBUG = fromString("Debug"); - - /** - * Static value Info for LogVerbosity. - */ - public static final LogVerbosity INFO = fromString("Info"); - - /** - * Static value Warning for LogVerbosity. - */ - public static final LogVerbosity WARNING = fromString("Warning"); - - /** - * Static value Error for LogVerbosity. - */ - public static final LogVerbosity ERROR = fromString("Error"); - - /** - * Static value Critical for LogVerbosity. - */ - public static final LogVerbosity CRITICAL = fromString("Critical"); - - /** - * Creates a new instance of LogVerbosity value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LogVerbosity() { - } - - /** - * Creates or finds a LogVerbosity from its string representation. - * - * @param name a name to look for. - * @return the corresponding LogVerbosity. - */ - public static LogVerbosity fromString(String name) { - return fromString(name, LogVerbosity.class); - } - - /** - * Gets known LogVerbosity values. - * - * @return known LogVerbosity values. - */ - public static Collection values() { - return values(LogVerbosity.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobInput.java deleted file mode 100644 index cd49028d2ff7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobInput.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The MLFlowModelJobInput model. - */ -@Fluent -public final class MLFlowModelJobInput extends JobInput { - /* - * [Required] Specifies the type of job. - */ - private JobInputType jobInputType = JobInputType.MLFLOW_MODEL; - - /* - * [Required] Input Asset URI. - */ - private String uri; - - /* - * Input Asset Delivery Mode. - */ - private InputDeliveryMode mode; - - /** - * Creates an instance of MLFlowModelJobInput class. - */ - public MLFlowModelJobInput() { - } - - /** - * Get the jobInputType property: [Required] Specifies the type of job. - * - * @return the jobInputType value. - */ - @Override - public JobInputType jobInputType() { - return this.jobInputType; - } - - /** - * Get the uri property: [Required] Input Asset URI. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: [Required] Input Asset URI. - * - * @param uri the uri value to set. - * @return the MLFlowModelJobInput object itself. - */ - public MLFlowModelJobInput withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the mode property: Input Asset Delivery Mode. - * - * @return the mode value. - */ - public InputDeliveryMode mode() { - return this.mode; - } - - /** - * Set the mode property: Input Asset Delivery Mode. - * - * @param mode the mode value to set. - * @return the MLFlowModelJobInput object itself. - */ - public MLFlowModelJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MLFlowModelJobInput withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model MLFlowModelJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MLFlowModelJobInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("jobInputType", this.jobInputType == null ? null : this.jobInputType.toString()); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MLFlowModelJobInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MLFlowModelJobInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MLFlowModelJobInput. - */ - public static MLFlowModelJobInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MLFlowModelJobInput deserializedMLFlowModelJobInput = new MLFlowModelJobInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedMLFlowModelJobInput.withDescription(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedMLFlowModelJobInput.uri = reader.getString(); - } else if ("jobInputType".equals(fieldName)) { - deserializedMLFlowModelJobInput.jobInputType = JobInputType.fromString(reader.getString()); - } else if ("mode".equals(fieldName)) { - deserializedMLFlowModelJobInput.mode = InputDeliveryMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMLFlowModelJobInput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobOutput.java deleted file mode 100644 index 3a50f2938818..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobOutput.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The MLFlowModelJobOutput model. - */ -@Fluent -public final class MLFlowModelJobOutput extends JobOutput { - /* - * [Required] Specifies the type of job. - */ - private JobOutputType jobOutputType = JobOutputType.MLFLOW_MODEL; - - /* - * Output Asset URI. - */ - private String uri; - - /* - * Output Asset Delivery Mode. - */ - private OutputDeliveryMode mode; - - /** - * Creates an instance of MLFlowModelJobOutput class. - */ - public MLFlowModelJobOutput() { - } - - /** - * Get the jobOutputType property: [Required] Specifies the type of job. - * - * @return the jobOutputType value. - */ - @Override - public JobOutputType jobOutputType() { - return this.jobOutputType; - } - - /** - * Get the uri property: Output Asset URI. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: Output Asset URI. - * - * @param uri the uri value to set. - * @return the MLFlowModelJobOutput object itself. - */ - public MLFlowModelJobOutput withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the mode property: Output Asset Delivery Mode. - * - * @return the mode value. - */ - public OutputDeliveryMode mode() { - return this.mode; - } - - /** - * Set the mode property: Output Asset Delivery Mode. - * - * @param mode the mode value to set. - * @return the MLFlowModelJobOutput object itself. - */ - public MLFlowModelJobOutput withMode(OutputDeliveryMode mode) { - this.mode = mode; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MLFlowModelJobOutput withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MLFlowModelJobOutput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MLFlowModelJobOutput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the MLFlowModelJobOutput. - */ - public static MLFlowModelJobOutput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MLFlowModelJobOutput deserializedMLFlowModelJobOutput = new MLFlowModelJobOutput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedMLFlowModelJobOutput.withDescription(reader.getString()); - } else if ("jobOutputType".equals(fieldName)) { - deserializedMLFlowModelJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedMLFlowModelJobOutput.uri = reader.getString(); - } else if ("mode".equals(fieldName)) { - deserializedMLFlowModelJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMLFlowModelJobOutput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableData.java deleted file mode 100644 index 3701ebc2a3dc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableData.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * MLTable data definition. - */ -@Fluent -public final class MLTableData extends DataVersionBaseProperties { - /* - * [Required] Specifies the type of data. - */ - private DataType dataType = DataType.MLTABLE; - - /* - * Uris referenced in the MLTable definition (required for lineage) - */ - private List referencedUris; - - /** - * Creates an instance of MLTableData class. - */ - public MLTableData() { - } - - /** - * Get the dataType property: [Required] Specifies the type of data. - * - * @return the dataType value. - */ - @Override - public DataType dataType() { - return this.dataType; - } - - /** - * Get the referencedUris property: Uris referenced in the MLTable definition (required for lineage). - * - * @return the referencedUris value. - */ - public List referencedUris() { - return this.referencedUris; - } - - /** - * Set the referencedUris property: Uris referenced in the MLTable definition (required for lineage). - * - * @param referencedUris the referencedUris value to set. - * @return the MLTableData object itself. - */ - public MLTableData withReferencedUris(List referencedUris) { - this.referencedUris = referencedUris; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MLTableData withDataUri(String dataUri) { - super.withDataUri(dataUri); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MLTableData withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MLTableData withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MLTableData withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MLTableData withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MLTableData withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataUri", dataUri()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); - jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); - jsonWriter.writeArrayField("referencedUris", this.referencedUris, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MLTableData from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MLTableData if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MLTableData. - */ - public static MLTableData fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MLTableData deserializedMLTableData = new MLTableData(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("dataUri".equals(fieldName)) { - deserializedMLTableData.withDataUri(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedMLTableData.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedMLTableData.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedMLTableData.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedMLTableData.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("isAnonymous".equals(fieldName)) { - deserializedMLTableData.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); - } else if ("dataType".equals(fieldName)) { - deserializedMLTableData.dataType = DataType.fromString(reader.getString()); - } else if ("referencedUris".equals(fieldName)) { - List referencedUris = reader.readArray(reader1 -> reader1.getString()); - deserializedMLTableData.referencedUris = referencedUris; - } else { - reader.skipChildren(); - } - } - - return deserializedMLTableData; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobInput.java deleted file mode 100644 index 404a4a1adb18..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobInput.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The MLTableJobInput model. - */ -@Fluent -public final class MLTableJobInput extends JobInput { - /* - * [Required] Specifies the type of job. - */ - private JobInputType jobInputType = JobInputType.MLTABLE; - - /* - * [Required] Input Asset URI. - */ - private String uri; - - /* - * Input Asset Delivery Mode. - */ - private InputDeliveryMode mode; - - /** - * Creates an instance of MLTableJobInput class. - */ - public MLTableJobInput() { - } - - /** - * Get the jobInputType property: [Required] Specifies the type of job. - * - * @return the jobInputType value. - */ - @Override - public JobInputType jobInputType() { - return this.jobInputType; - } - - /** - * Get the uri property: [Required] Input Asset URI. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: [Required] Input Asset URI. - * - * @param uri the uri value to set. - * @return the MLTableJobInput object itself. - */ - public MLTableJobInput withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the mode property: Input Asset Delivery Mode. - * - * @return the mode value. - */ - public InputDeliveryMode mode() { - return this.mode; - } - - /** - * Set the mode property: Input Asset Delivery Mode. - * - * @param mode the mode value to set. - * @return the MLTableJobInput object itself. - */ - public MLTableJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MLTableJobInput withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model MLTableJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MLTableJobInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("jobInputType", this.jobInputType == null ? null : this.jobInputType.toString()); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MLTableJobInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MLTableJobInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MLTableJobInput. - */ - public static MLTableJobInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MLTableJobInput deserializedMLTableJobInput = new MLTableJobInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedMLTableJobInput.withDescription(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedMLTableJobInput.uri = reader.getString(); - } else if ("jobInputType".equals(fieldName)) { - deserializedMLTableJobInput.jobInputType = JobInputType.fromString(reader.getString()); - } else if ("mode".equals(fieldName)) { - deserializedMLTableJobInput.mode = InputDeliveryMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMLTableJobInput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobOutput.java deleted file mode 100644 index 3d3313ef481d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobOutput.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The MLTableJobOutput model. - */ -@Fluent -public final class MLTableJobOutput extends JobOutput { - /* - * [Required] Specifies the type of job. - */ - private JobOutputType jobOutputType = JobOutputType.MLTABLE; - - /* - * Output Asset URI. - */ - private String uri; - - /* - * Output Asset Delivery Mode. - */ - private OutputDeliveryMode mode; - - /** - * Creates an instance of MLTableJobOutput class. - */ - public MLTableJobOutput() { - } - - /** - * Get the jobOutputType property: [Required] Specifies the type of job. - * - * @return the jobOutputType value. - */ - @Override - public JobOutputType jobOutputType() { - return this.jobOutputType; - } - - /** - * Get the uri property: Output Asset URI. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: Output Asset URI. - * - * @param uri the uri value to set. - * @return the MLTableJobOutput object itself. - */ - public MLTableJobOutput withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the mode property: Output Asset Delivery Mode. - * - * @return the mode value. - */ - public OutputDeliveryMode mode() { - return this.mode; - } - - /** - * Set the mode property: Output Asset Delivery Mode. - * - * @param mode the mode value to set. - * @return the MLTableJobOutput object itself. - */ - public MLTableJobOutput withMode(OutputDeliveryMode mode) { - this.mode = mode; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MLTableJobOutput withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MLTableJobOutput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MLTableJobOutput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the MLTableJobOutput. - */ - public static MLTableJobOutput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MLTableJobOutput deserializedMLTableJobOutput = new MLTableJobOutput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedMLTableJobOutput.withDescription(reader.getString()); - } else if ("jobOutputType".equals(fieldName)) { - deserializedMLTableJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedMLTableJobOutput.uri = reader.getString(); - } else if ("mode".equals(fieldName)) { - deserializedMLTableJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMLTableJobOutput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedComputeIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedComputeIdentity.java deleted file mode 100644 index dc253a8faae2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedComputeIdentity.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Managed compute identity definition. - */ -@Fluent -public final class ManagedComputeIdentity extends MonitorComputeIdentityBase { - /* - * [Required] Specifies the type of identity to use within the monitoring jobs. - */ - private MonitorComputeIdentityType computeIdentityType = MonitorComputeIdentityType.MANAGED_IDENTITY; - - /* - * The identity which will be leveraged by the monitoring jobs. - */ - private ManagedServiceIdentity identity; - - /** - * Creates an instance of ManagedComputeIdentity class. - */ - public ManagedComputeIdentity() { - } - - /** - * Get the computeIdentityType property: [Required] Specifies the type of identity to use within the monitoring - * jobs. - * - * @return the computeIdentityType value. - */ - @Override - public MonitorComputeIdentityType computeIdentityType() { - return this.computeIdentityType; - } - - /** - * Get the identity property: The identity which will be leveraged by the monitoring jobs. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity which will be leveraged by the monitoring jobs. - * - * @param identity the identity value to set. - * @return the ManagedComputeIdentity object itself. - */ - public ManagedComputeIdentity withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (identity() != null) { - identity().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeIdentityType", - this.computeIdentityType == null ? null : this.computeIdentityType.toString()); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedComputeIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedComputeIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedComputeIdentity. - */ - public static ManagedComputeIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedComputeIdentity deserializedManagedComputeIdentity = new ManagedComputeIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeIdentityType".equals(fieldName)) { - deserializedManagedComputeIdentity.computeIdentityType - = MonitorComputeIdentityType.fromString(reader.getString()); - } else if ("identity".equals(fieldName)) { - deserializedManagedComputeIdentity.identity = ManagedServiceIdentity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedComputeIdentity; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentity.java deleted file mode 100644 index 6bff81da5778..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentity.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Objects; -import java.util.UUID; - -/** - * Managed identity configuration. - */ -@Fluent -public final class ManagedIdentity extends IdentityConfiguration { - /* - * [Required] Specifies the type of identity framework. - */ - private IdentityConfigurationType identityType = IdentityConfigurationType.MANAGED; - - /* - * Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. - */ - private UUID clientId; - - /* - * Specifies a user-assigned identity by object ID. For system-assigned, do not set this field. - */ - private UUID objectId; - - /* - * Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field. - */ - private String resourceId; - - /** - * Creates an instance of ManagedIdentity class. - */ - public ManagedIdentity() { - } - - /** - * Get the identityType property: [Required] Specifies the type of identity framework. - * - * @return the identityType value. - */ - @Override - public IdentityConfigurationType identityType() { - return this.identityType; - } - - /** - * Get the clientId property: Specifies a user-assigned identity by client ID. For system-assigned, do not set this - * field. - * - * @return the clientId value. - */ - public UUID clientId() { - return this.clientId; - } - - /** - * Set the clientId property: Specifies a user-assigned identity by client ID. For system-assigned, do not set this - * field. - * - * @param clientId the clientId value to set. - * @return the ManagedIdentity object itself. - */ - public ManagedIdentity withClientId(UUID clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the objectId property: Specifies a user-assigned identity by object ID. For system-assigned, do not set this - * field. - * - * @return the objectId value. - */ - public UUID objectId() { - return this.objectId; - } - - /** - * Set the objectId property: Specifies a user-assigned identity by object ID. For system-assigned, do not set this - * field. - * - * @param objectId the objectId value to set. - * @return the ManagedIdentity object itself. - */ - public ManagedIdentity withObjectId(UUID objectId) { - this.objectId = objectId; - return this; - } - - /** - * Get the resourceId property: Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not - * set this field. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not - * set this field. - * - * @param resourceId the resourceId value to set. - * @return the ManagedIdentity object itself. - */ - public ManagedIdentity withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("identityType", this.identityType == null ? null : this.identityType.toString()); - jsonWriter.writeStringField("clientId", Objects.toString(this.clientId, null)); - jsonWriter.writeStringField("objectId", Objects.toString(this.objectId, null)); - jsonWriter.writeStringField("resourceId", this.resourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedIdentity if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedIdentity. - */ - public static ManagedIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedIdentity deserializedManagedIdentity = new ManagedIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("identityType".equals(fieldName)) { - deserializedManagedIdentity.identityType = IdentityConfigurationType.fromString(reader.getString()); - } else if ("clientId".equals(fieldName)) { - deserializedManagedIdentity.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("objectId".equals(fieldName)) { - deserializedManagedIdentity.objectId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("resourceId".equals(fieldName)) { - deserializedManagedIdentity.resourceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedIdentity; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java deleted file mode 100644 index 5023b0d28125..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; - -/** - * The ManagedIdentityAuthTypeWorkspaceConnectionProperties model. - */ -@Fluent -public final class ManagedIdentityAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /* - * Authentication type of the connection target - */ - private ConnectionAuthType authType = ConnectionAuthType.MANAGED_IDENTITY; - - /* - * The credentials property. - */ - private WorkspaceConnectionManagedIdentity credentials; - - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - - /** - * Creates an instance of ManagedIdentityAuthTypeWorkspaceConnectionProperties class. - */ - public ManagedIdentityAuthTypeWorkspaceConnectionProperties() { - } - - /** - * Get the authType property: Authentication type of the connection target. - * - * @return the authType value. - */ - @Override - public ConnectionAuthType authType() { - return this.authType; - } - - /** - * Get the credentials property: The credentials property. - * - * @return the credentials value. - */ - public WorkspaceConnectionManagedIdentity credentials() { - return this.credentials; - } - - /** - * Set the credentials property: The credentials property. - * - * @param credentials the credentials value to set. - * @return the ManagedIdentityAuthTypeWorkspaceConnectionProperties object itself. - */ - public ManagedIdentityAuthTypeWorkspaceConnectionProperties - withCredentials(WorkspaceConnectionManagedIdentity credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. - */ - @Override - public ConnectionGroup group() { - return this.group; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { - super.withSharedUserList(sharedUserList); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", category() == null ? null : category().toString()); - jsonWriter.writeStringField("expiryTime", - expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); - jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); - jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("sharedUserList", sharedUserList(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeJsonField("credentials", this.credentials); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedIdentityAuthTypeWorkspaceConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedIdentityAuthTypeWorkspaceConnectionProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedIdentityAuthTypeWorkspaceConnectionProperties. - */ - public static ManagedIdentityAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ManagedIdentityAuthTypeWorkspaceConnectionProperties deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties - = new ManagedIdentityAuthTypeWorkspaceConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties - .withCategory(ConnectionCategory.fromString(reader.getString())); - } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); - } else if ("expiryTime".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("group".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); - } else if ("isSharedToAll".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties - .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); - } else if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); - } else if ("sharedUserList".equals(fieldName)) { - List sharedUserList = reader.readArray(reader1 -> reader1.getString()); - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.authType - = ConnectionAuthType.fromString(reader.getString()); - } else if ("credentials".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.credentials - = WorkspaceConnectionManagedIdentity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityCredential.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityCredential.java deleted file mode 100644 index 0727fbe15ade..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityCredential.java +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Credential for user managed identity. - */ -@Fluent -public final class ManagedIdentityCredential extends DataReferenceCredential { - /* - * [Required] Credential type used to authentication with storage. - */ - private DataReferenceCredentialType credentialType = DataReferenceCredentialType.MANAGED_IDENTITY; - - /* - * ManagedIdentityCredential identity type - */ - private String managedIdentityType; - - /* - * Full arm scope for the Id. For ManagedIdentityType = SystemManaged, this field is null. - */ - private String userManagedIdentityResourceId; - - /* - * ClientId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. - */ - private String userManagedIdentityClientId; - - /* - * PrincipalId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. - */ - private String userManagedIdentityPrincipalId; - - /* - * TenantId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. - */ - private String userManagedIdentityTenantId; - - /** - * Creates an instance of ManagedIdentityCredential class. - */ - public ManagedIdentityCredential() { - } - - /** - * Get the credentialType property: [Required] Credential type used to authentication with storage. - * - * @return the credentialType value. - */ - @Override - public DataReferenceCredentialType credentialType() { - return this.credentialType; - } - - /** - * Get the managedIdentityType property: ManagedIdentityCredential identity type. - * - * @return the managedIdentityType value. - */ - public String managedIdentityType() { - return this.managedIdentityType; - } - - /** - * Set the managedIdentityType property: ManagedIdentityCredential identity type. - * - * @param managedIdentityType the managedIdentityType value to set. - * @return the ManagedIdentityCredential object itself. - */ - public ManagedIdentityCredential withManagedIdentityType(String managedIdentityType) { - this.managedIdentityType = managedIdentityType; - return this; - } - - /** - * Get the userManagedIdentityResourceId property: Full arm scope for the Id. For ManagedIdentityType = - * SystemManaged, this field is null. - * - * @return the userManagedIdentityResourceId value. - */ - public String userManagedIdentityResourceId() { - return this.userManagedIdentityResourceId; - } - - /** - * Set the userManagedIdentityResourceId property: Full arm scope for the Id. For ManagedIdentityType = - * SystemManaged, this field is null. - * - * @param userManagedIdentityResourceId the userManagedIdentityResourceId value to set. - * @return the ManagedIdentityCredential object itself. - */ - public ManagedIdentityCredential withUserManagedIdentityResourceId(String userManagedIdentityResourceId) { - this.userManagedIdentityResourceId = userManagedIdentityResourceId; - return this; - } - - /** - * Get the userManagedIdentityClientId property: ClientId for the UAMI. For ManagedIdentityType = SystemManaged, - * this field is null. - * - * @return the userManagedIdentityClientId value. - */ - public String userManagedIdentityClientId() { - return this.userManagedIdentityClientId; - } - - /** - * Set the userManagedIdentityClientId property: ClientId for the UAMI. For ManagedIdentityType = SystemManaged, - * this field is null. - * - * @param userManagedIdentityClientId the userManagedIdentityClientId value to set. - * @return the ManagedIdentityCredential object itself. - */ - public ManagedIdentityCredential withUserManagedIdentityClientId(String userManagedIdentityClientId) { - this.userManagedIdentityClientId = userManagedIdentityClientId; - return this; - } - - /** - * Get the userManagedIdentityPrincipalId property: PrincipalId for the UAMI. For ManagedIdentityType = - * SystemManaged, this field is null. - * - * @return the userManagedIdentityPrincipalId value. - */ - public String userManagedIdentityPrincipalId() { - return this.userManagedIdentityPrincipalId; - } - - /** - * Set the userManagedIdentityPrincipalId property: PrincipalId for the UAMI. For ManagedIdentityType = - * SystemManaged, this field is null. - * - * @param userManagedIdentityPrincipalId the userManagedIdentityPrincipalId value to set. - * @return the ManagedIdentityCredential object itself. - */ - public ManagedIdentityCredential withUserManagedIdentityPrincipalId(String userManagedIdentityPrincipalId) { - this.userManagedIdentityPrincipalId = userManagedIdentityPrincipalId; - return this; - } - - /** - * Get the userManagedIdentityTenantId property: TenantId for the UAMI. For ManagedIdentityType = SystemManaged, - * this field is null. - * - * @return the userManagedIdentityTenantId value. - */ - public String userManagedIdentityTenantId() { - return this.userManagedIdentityTenantId; - } - - /** - * Set the userManagedIdentityTenantId property: TenantId for the UAMI. For ManagedIdentityType = SystemManaged, - * this field is null. - * - * @param userManagedIdentityTenantId the userManagedIdentityTenantId value to set. - * @return the ManagedIdentityCredential object itself. - */ - public ManagedIdentityCredential withUserManagedIdentityTenantId(String userManagedIdentityTenantId) { - this.userManagedIdentityTenantId = userManagedIdentityTenantId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("credentialType", - this.credentialType == null ? null : this.credentialType.toString()); - jsonWriter.writeStringField("managedIdentityType", this.managedIdentityType); - jsonWriter.writeStringField("userManagedIdentityResourceId", this.userManagedIdentityResourceId); - jsonWriter.writeStringField("userManagedIdentityClientId", this.userManagedIdentityClientId); - jsonWriter.writeStringField("userManagedIdentityPrincipalId", this.userManagedIdentityPrincipalId); - jsonWriter.writeStringField("userManagedIdentityTenantId", this.userManagedIdentityTenantId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedIdentityCredential from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedIdentityCredential if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedIdentityCredential. - */ - public static ManagedIdentityCredential fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedIdentityCredential deserializedManagedIdentityCredential = new ManagedIdentityCredential(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("credentialType".equals(fieldName)) { - deserializedManagedIdentityCredential.credentialType - = DataReferenceCredentialType.fromString(reader.getString()); - } else if ("managedIdentityType".equals(fieldName)) { - deserializedManagedIdentityCredential.managedIdentityType = reader.getString(); - } else if ("userManagedIdentityResourceId".equals(fieldName)) { - deserializedManagedIdentityCredential.userManagedIdentityResourceId = reader.getString(); - } else if ("userManagedIdentityClientId".equals(fieldName)) { - deserializedManagedIdentityCredential.userManagedIdentityClientId = reader.getString(); - } else if ("userManagedIdentityPrincipalId".equals(fieldName)) { - deserializedManagedIdentityCredential.userManagedIdentityPrincipalId = reader.getString(); - } else if ("userManagedIdentityTenantId".equals(fieldName)) { - deserializedManagedIdentityCredential.userManagedIdentityTenantId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedIdentityCredential; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionOptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionOptions.java deleted file mode 100644 index 387a88418856..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionOptions.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Managed Network Provisioning options for managed network of a machine learning workspace. - */ -@Fluent -public final class ManagedNetworkProvisionOptions implements JsonSerializable { - /* - * The includeSpark property. - */ - private Boolean includeSpark; - - /** - * Creates an instance of ManagedNetworkProvisionOptions class. - */ - public ManagedNetworkProvisionOptions() { - } - - /** - * Get the includeSpark property: The includeSpark property. - * - * @return the includeSpark value. - */ - public Boolean includeSpark() { - return this.includeSpark; - } - - /** - * Set the includeSpark property: The includeSpark property. - * - * @param includeSpark the includeSpark value to set. - * @return the ManagedNetworkProvisionOptions object itself. - */ - public ManagedNetworkProvisionOptions withIncludeSpark(Boolean includeSpark) { - this.includeSpark = includeSpark; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("includeSpark", this.includeSpark); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedNetworkProvisionOptions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedNetworkProvisionOptions if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedNetworkProvisionOptions. - */ - public static ManagedNetworkProvisionOptions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedNetworkProvisionOptions deserializedManagedNetworkProvisionOptions - = new ManagedNetworkProvisionOptions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("includeSpark".equals(fieldName)) { - deserializedManagedNetworkProvisionOptions.includeSpark - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedNetworkProvisionOptions; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionStatus.java deleted file mode 100644 index 0a0f25111177..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionStatus.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; - -/** - * An immutable client-side representation of ManagedNetworkProvisionStatus. - */ -public interface ManagedNetworkProvisionStatus { - /** - * Gets the sparkReady property: The sparkReady property. - * - * @return the sparkReady value. - */ - Boolean sparkReady(); - - /** - * Gets the status property: Status for the managed network of a machine learning workspace. - * - * @return the status value. - */ - ManagedNetworkStatus status(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner object. - * - * @return the inner object. - */ - ManagedNetworkProvisionStatusInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisions.java deleted file mode 100644 index ec0e9d831858..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisions.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.machinelearning.models; - -import com.azure.core.util.Context; - -/** - * Resource collection API of ManagedNetworkProvisions. - */ -public interface ManagedNetworkProvisions { - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 status of the Provisioning for the managed network of a machine learning workspace. - */ - ManagedNetworkProvisionStatus provisionManagedNetwork(String resourceGroupName, String workspaceName); - - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param body Managed Network Provisioning Options for a machine learning workspace. - * @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 status of the Provisioning for the managed network of a machine learning workspace. - */ - ManagedNetworkProvisionStatus provisionManagedNetwork(String resourceGroupName, String workspaceName, - ManagedNetworkProvisionOptions body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettings.java deleted file mode 100644 index 52447f06592b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettings.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; -import java.util.Map; - -/** - * An immutable client-side representation of ManagedNetworkSettings. - */ -public interface ManagedNetworkSettings { - /** - * Gets the isolationMode property: Isolation mode for the managed network of a machine learning workspace. - * - * @return the isolationMode value. - */ - IsolationMode isolationMode(); - - /** - * Gets the networkId property: The networkId property. - * - * @return the networkId value. - */ - String networkId(); - - /** - * Gets the outboundRules property: Dictionary of <OutboundRule>. - * - * @return the outboundRules value. - */ - Map outboundRules(); - - /** - * Gets the status property: Status of the Provisioning for the managed network of a machine learning workspace. - * - * @return the status value. - */ - ManagedNetworkProvisionStatus status(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner object. - * - * @return the inner object. - */ - ManagedNetworkSettingsInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsRules.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsRules.java deleted file mode 100644 index 56d61089d4ca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsRules.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 ManagedNetworkSettingsRules. - */ -public interface ManagedNetworkSettingsRules { - /** - * Lists the managed network outbound rules for a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of outbound rules for the managed network of a machine learning workspace as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Lists the managed network outbound rules for a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of outbound rules for the managed network of a machine learning workspace as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String ruleName); - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String ruleName, Context context); - - /** - * Gets an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @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 an outbound rule from the managed network of a machine learning workspace along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String ruleName, - Context context); - - /** - * Gets an outbound rule from the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @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 an outbound rule from the managed network of a machine learning workspace. - */ - OutboundRuleBasicResource get(String resourceGroupName, String workspaceName, String ruleName); - - /** - * Gets an outbound rule from the managed network of a machine learning workspace. - * - * @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 an outbound rule from the managed network of a machine learning workspace along with {@link Response}. - */ - OutboundRuleBasicResource getById(String id); - - /** - * Gets an outbound rule from the managed network of a machine learning workspace. - * - * @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 an outbound rule from the managed network of a machine learning workspace along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @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. - */ - void deleteById(String id); - - /** - * Deletes an outbound rule from the managed network of a machine learning workspace. - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new OutboundRuleBasicResource resource. - * - * @param name resource name. - * @return the first stage of the new OutboundRuleBasicResource definition. - */ - OutboundRuleBasicResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkStatus.java deleted file mode 100644 index ed7ff73885ae..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkStatus.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Status for the managed network of a machine learning workspace. - */ -public final class ManagedNetworkStatus extends ExpandableStringEnum { - /** - * Static value Inactive for ManagedNetworkStatus. - */ - public static final ManagedNetworkStatus INACTIVE = fromString("Inactive"); - - /** - * Static value Active for ManagedNetworkStatus. - */ - public static final ManagedNetworkStatus ACTIVE = fromString("Active"); - - /** - * Creates a new instance of ManagedNetworkStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedNetworkStatus() { - } - - /** - * Creates or finds a ManagedNetworkStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedNetworkStatus. - */ - public static ManagedNetworkStatus fromString(String name) { - return fromString(name, ManagedNetworkStatus.class); - } - - /** - * Gets known ManagedNetworkStatus values. - * - * @return known ManagedNetworkStatus values. - */ - public static Collection values() { - return values(ManagedNetworkStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineDeployment.java deleted file mode 100644 index 12e1a1d0e4a7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineDeployment.java +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Properties specific to a ManagedOnlineDeployment. - */ -@Fluent -public final class ManagedOnlineDeployment extends OnlineDeploymentProperties { - /* - * [Required] The compute type of the endpoint. - */ - private EndpointComputeType endpointComputeType = EndpointComputeType.MANAGED; - - /* - * Provisioning state for the endpoint deployment. - */ - private DeploymentProvisioningState provisioningState; - - /** - * Creates an instance of ManagedOnlineDeployment class. - */ - public ManagedOnlineDeployment() { - } - - /** - * Get the endpointComputeType property: [Required] The compute type of the endpoint. - * - * @return the endpointComputeType value. - */ - @Override - public EndpointComputeType endpointComputeType() { - return this.endpointComputeType; - } - - /** - * Get the provisioningState property: Provisioning state for the endpoint deployment. - * - * @return the provisioningState value. - */ - @Override - public DeploymentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { - super.withScaleSettings(scaleSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { - super.withRequestSettings(requestSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedOnlineDeployment withModelMountPath(String modelMountPath) { - super.withModelMountPath(modelMountPath); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { - super.withAppInsightsEnabled(appInsightsEnabled); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedOnlineDeployment withLivenessProbe(ProbeSettings livenessProbe) { - super.withLivenessProbe(livenessProbe); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { - super.withReadinessProbe(readinessProbe); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedOnlineDeployment withInstanceType(String instanceType) { - super.withInstanceType(instanceType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedOnlineDeployment withModel(String model) { - super.withModel(model); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedOnlineDeployment - withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { - super.withEgressPublicNetworkAccess(egressPublicNetworkAccess); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedOnlineDeployment withDataCollector(DataCollector dataCollector) { - super.withDataCollector(dataCollector); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedOnlineDeployment withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedOnlineDeployment withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedOnlineDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedOnlineDeployment withEnvironmentId(String environmentId) { - super.withEnvironmentId(environmentId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedOnlineDeployment withEnvironmentVariables(Map environmentVariables) { - super.withEnvironmentVariables(environmentVariables); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("codeConfiguration", codeConfiguration()); - jsonWriter.writeStringField("environmentId", environmentId()); - jsonWriter.writeMapField("environmentVariables", environmentVariables(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("scaleSettings", scaleSettings()); - jsonWriter.writeJsonField("requestSettings", requestSettings()); - jsonWriter.writeStringField("modelMountPath", modelMountPath()); - jsonWriter.writeBooleanField("appInsightsEnabled", appInsightsEnabled()); - jsonWriter.writeJsonField("livenessProbe", livenessProbe()); - jsonWriter.writeJsonField("readinessProbe", readinessProbe()); - jsonWriter.writeStringField("instanceType", instanceType()); - jsonWriter.writeStringField("model", model()); - jsonWriter.writeStringField("egressPublicNetworkAccess", - egressPublicNetworkAccess() == null ? null : egressPublicNetworkAccess().toString()); - jsonWriter.writeJsonField("dataCollector", dataCollector()); - jsonWriter.writeStringField("endpointComputeType", - this.endpointComputeType == null ? null : this.endpointComputeType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedOnlineDeployment from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedOnlineDeployment if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedOnlineDeployment. - */ - public static ManagedOnlineDeployment fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedOnlineDeployment deserializedManagedOnlineDeployment = new ManagedOnlineDeployment(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedManagedOnlineDeployment.withDescription(reader.getString()); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedOnlineDeployment.withProperties(properties); - } else if ("codeConfiguration".equals(fieldName)) { - deserializedManagedOnlineDeployment.withCodeConfiguration(CodeConfiguration.fromJson(reader)); - } else if ("environmentId".equals(fieldName)) { - deserializedManagedOnlineDeployment.withEnvironmentId(reader.getString()); - } else if ("environmentVariables".equals(fieldName)) { - Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedOnlineDeployment.withEnvironmentVariables(environmentVariables); - } else if ("scaleSettings".equals(fieldName)) { - deserializedManagedOnlineDeployment.withScaleSettings(OnlineScaleSettings.fromJson(reader)); - } else if ("requestSettings".equals(fieldName)) { - deserializedManagedOnlineDeployment.withRequestSettings(OnlineRequestSettings.fromJson(reader)); - } else if ("modelMountPath".equals(fieldName)) { - deserializedManagedOnlineDeployment.withModelMountPath(reader.getString()); - } else if ("appInsightsEnabled".equals(fieldName)) { - deserializedManagedOnlineDeployment - .withAppInsightsEnabled(reader.getNullable(JsonReader::getBoolean)); - } else if ("livenessProbe".equals(fieldName)) { - deserializedManagedOnlineDeployment.withLivenessProbe(ProbeSettings.fromJson(reader)); - } else if ("readinessProbe".equals(fieldName)) { - deserializedManagedOnlineDeployment.withReadinessProbe(ProbeSettings.fromJson(reader)); - } else if ("provisioningState".equals(fieldName)) { - deserializedManagedOnlineDeployment.provisioningState - = DeploymentProvisioningState.fromString(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedManagedOnlineDeployment.withInstanceType(reader.getString()); - } else if ("model".equals(fieldName)) { - deserializedManagedOnlineDeployment.withModel(reader.getString()); - } else if ("egressPublicNetworkAccess".equals(fieldName)) { - deserializedManagedOnlineDeployment - .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.fromString(reader.getString())); - } else if ("dataCollector".equals(fieldName)) { - deserializedManagedOnlineDeployment.withDataCollector(DataCollector.fromJson(reader)); - } else if ("endpointComputeType".equals(fieldName)) { - deserializedManagedOnlineDeployment.endpointComputeType - = EndpointComputeType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedOnlineDeployment; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentity.java deleted file mode 100644 index 28cfe427d69f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentity.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; -import java.util.UUID; - -/** - * Managed service identity (system assigned and/or user assigned identities). - */ -@Fluent -public class ManagedServiceIdentity implements JsonSerializable { - /* - * The service principal ID of the system assigned identity. This property will only be provided for a system - * assigned identity. - */ - private UUID principalId; - - /* - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned - * identity. - */ - private UUID tenantId; - - /* - * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - */ - 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. - */ - 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; - } - - /** - * Set the principalId property: The service principal ID of the system assigned identity. This property will only - * be provided for a system assigned identity. - * - * @param principalId the principalId value to set. - * @return the ManagedServiceIdentity object itself. - */ - ManagedServiceIdentity withPrincipalId(UUID principalId) { - this.principalId = principalId; - return this; - } - - /** - * 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; - } - - /** - * Set the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for - * a system assigned identity. - * - * @param tenantId the tenantId value to set. - * @return the ManagedServiceIdentity object itself. - */ - ManagedServiceIdentity withTenantId(UUID tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * 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.atError() - .log(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); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedServiceIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedServiceIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedServiceIdentity. - */ - public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedServiceIdentity deserializedManagedServiceIdentity = new ManagedServiceIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); - } else if ("principalId".equals(fieldName)) { - deserializedManagedServiceIdentity.principalId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("tenantId".equals(fieldName)) { - deserializedManagedServiceIdentity.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("userAssignedIdentities".equals(fieldName)) { - Map userAssignedIdentities - = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); - deserializedManagedServiceIdentity.userAssignedIdentities = userAssignedIdentities; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedServiceIdentity; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.java deleted file mode 100644 index d848e98fabe1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -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 a new instance of ManagedServiceIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedServiceIdentityType() { - } - - /** - * Creates or finds a ManagedServiceIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedServiceIdentityType. - */ - 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplacePlan.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplacePlan.java deleted file mode 100644 index 2b53cae773b4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplacePlan.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The MarketplacePlan model. - */ -@Immutable -public final class MarketplacePlan implements JsonSerializable { - /* - * The identifying name of the Publisher of the Marketplace Plan. - */ - private String publisherId; - - /* - * The identifying name of the Offer of the Marketplace Plan. - */ - private String offerId; - - /* - * The identifying name of the Plan of the Marketplace Plan. - */ - private String planId; - - /** - * Creates an instance of MarketplacePlan class. - */ - public MarketplacePlan() { - } - - /** - * Get the publisherId property: The identifying name of the Publisher of the Marketplace Plan. - * - * @return the publisherId value. - */ - public String publisherId() { - return this.publisherId; - } - - /** - * Get the offerId property: The identifying name of the Offer of the Marketplace Plan. - * - * @return the offerId value. - */ - public String offerId() { - return this.offerId; - } - - /** - * Get the planId property: The identifying name of the Plan of the Marketplace Plan. - * - * @return the planId value. - */ - public String planId() { - return this.planId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MarketplacePlan from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MarketplacePlan if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the MarketplacePlan. - */ - public static MarketplacePlan fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MarketplacePlan deserializedMarketplacePlan = new MarketplacePlan(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("publisherId".equals(fieldName)) { - deserializedMarketplacePlan.publisherId = reader.getString(); - } else if ("offerId".equals(fieldName)) { - deserializedMarketplacePlan.offerId = reader.getString(); - } else if ("planId".equals(fieldName)) { - deserializedMarketplacePlan.planId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMarketplacePlan; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscription.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscription.java deleted file mode 100644 index 6ce854789abe..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscription.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.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.MarketplaceSubscriptionInner; - -/** - * An immutable client-side representation of MarketplaceSubscription. - */ -public interface MarketplaceSubscription { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - MarketplaceSubscriptionProperties 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.machinelearning.fluent.models.MarketplaceSubscriptionInner object. - * - * @return the inner object. - */ - MarketplaceSubscriptionInner innerModel(); - - /** - * The entirety of the MarketplaceSubscription definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The MarketplaceSubscription definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the MarketplaceSubscription definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the MarketplaceSubscription definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the MarketplaceSubscription definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(MarketplaceSubscriptionProperties properties); - } - - /** - * The stage of the MarketplaceSubscription 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - MarketplaceSubscription create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - MarketplaceSubscription create(Context context); - } - } - - /** - * Begins update for the MarketplaceSubscription resource. - * - * @return the stage of resource update. - */ - MarketplaceSubscription.Update update(); - - /** - * The template for MarketplaceSubscription update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - MarketplaceSubscription apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - MarketplaceSubscription apply(Context context); - } - - /** - * The MarketplaceSubscription update stages. - */ - interface UpdateStages { - /** - * The stage of the MarketplaceSubscription update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(MarketplaceSubscriptionProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - MarketplaceSubscription refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - MarketplaceSubscription refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProperties.java deleted file mode 100644 index 99bc5ab04a03..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The MarketplaceSubscriptionProperties model. - */ -@Fluent -public final class MarketplaceSubscriptionProperties implements JsonSerializable { - /* - * [Required] Target Marketplace Model ID to create a Marketplace Subscription for. - */ - private String modelId; - - /* - * Marketplace Plan associated with the Marketplace Subscription. - */ - private MarketplacePlan marketplacePlan; - - /* - * Current status of the Marketplace Subscription. - */ - private MarketplaceSubscriptionStatus marketplaceSubscriptionStatus; - - /* - * Provisioning State of the Marketplace Subscription. - */ - private MarketplaceSubscriptionProvisioningState provisioningState; - - /** - * Creates an instance of MarketplaceSubscriptionProperties class. - */ - public MarketplaceSubscriptionProperties() { - } - - /** - * Get the modelId property: [Required] Target Marketplace Model ID to create a Marketplace Subscription for. - * - * @return the modelId value. - */ - public String modelId() { - return this.modelId; - } - - /** - * Set the modelId property: [Required] Target Marketplace Model ID to create a Marketplace Subscription for. - * - * @param modelId the modelId value to set. - * @return the MarketplaceSubscriptionProperties object itself. - */ - public MarketplaceSubscriptionProperties withModelId(String modelId) { - this.modelId = modelId; - return this; - } - - /** - * Get the marketplacePlan property: Marketplace Plan associated with the Marketplace Subscription. - * - * @return the marketplacePlan value. - */ - public MarketplacePlan marketplacePlan() { - return this.marketplacePlan; - } - - /** - * Get the marketplaceSubscriptionStatus property: Current status of the Marketplace Subscription. - * - * @return the marketplaceSubscriptionStatus value. - */ - public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { - return this.marketplaceSubscriptionStatus; - } - - /** - * Get the provisioningState property: Provisioning State of the Marketplace Subscription. - * - * @return the provisioningState value. - */ - public MarketplaceSubscriptionProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (modelId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property modelId in model MarketplaceSubscriptionProperties")); - } - if (marketplacePlan() != null) { - marketplacePlan().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MarketplaceSubscriptionProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("modelId", this.modelId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MarketplaceSubscriptionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MarketplaceSubscriptionProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MarketplaceSubscriptionProperties. - */ - public static MarketplaceSubscriptionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MarketplaceSubscriptionProperties deserializedMarketplaceSubscriptionProperties - = new MarketplaceSubscriptionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("modelId".equals(fieldName)) { - deserializedMarketplaceSubscriptionProperties.modelId = reader.getString(); - } else if ("marketplacePlan".equals(fieldName)) { - deserializedMarketplaceSubscriptionProperties.marketplacePlan = MarketplacePlan.fromJson(reader); - } else if ("marketplaceSubscriptionStatus".equals(fieldName)) { - deserializedMarketplaceSubscriptionProperties.marketplaceSubscriptionStatus - = MarketplaceSubscriptionStatus.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedMarketplaceSubscriptionProperties.provisioningState - = MarketplaceSubscriptionProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMarketplaceSubscriptionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProvisioningState.java deleted file mode 100644 index 02e4f541478d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProvisioningState.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for MarketplaceSubscriptionProvisioningState. - */ -public final class MarketplaceSubscriptionProvisioningState - extends ExpandableStringEnum { - /** - * Static value Creating for MarketplaceSubscriptionProvisioningState. - */ - public static final MarketplaceSubscriptionProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Deleting for MarketplaceSubscriptionProvisioningState. - */ - public static final MarketplaceSubscriptionProvisioningState DELETING = fromString("Deleting"); - - /** - * Static value Succeeded for MarketplaceSubscriptionProvisioningState. - */ - public static final MarketplaceSubscriptionProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for MarketplaceSubscriptionProvisioningState. - */ - public static final MarketplaceSubscriptionProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Updating for MarketplaceSubscriptionProvisioningState. - */ - public static final MarketplaceSubscriptionProvisioningState UPDATING = fromString("Updating"); - - /** - * Static value Canceled for MarketplaceSubscriptionProvisioningState. - */ - public static final MarketplaceSubscriptionProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of MarketplaceSubscriptionProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MarketplaceSubscriptionProvisioningState() { - } - - /** - * Creates or finds a MarketplaceSubscriptionProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding MarketplaceSubscriptionProvisioningState. - */ - public static MarketplaceSubscriptionProvisioningState fromString(String name) { - return fromString(name, MarketplaceSubscriptionProvisioningState.class); - } - - /** - * Gets known MarketplaceSubscriptionProvisioningState values. - * - * @return known MarketplaceSubscriptionProvisioningState values. - */ - public static Collection values() { - return values(MarketplaceSubscriptionProvisioningState.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionResourceArmPaginatedResult.java deleted file mode 100644 index 2c9a7bb73b66..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionResourceArmPaginatedResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.MarketplaceSubscriptionInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of MarketplaceSubscription entities. - */ -@Fluent -public final class MarketplaceSubscriptionResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type MarketplaceSubscription. - */ - private List value; - - /* - * The link to the next page of MarketplaceSubscription objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of MarketplaceSubscriptionResourceArmPaginatedResult class. - */ - public MarketplaceSubscriptionResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type MarketplaceSubscription. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type MarketplaceSubscription. - * - * @param value the value value to set. - * @return the MarketplaceSubscriptionResourceArmPaginatedResult object itself. - */ - public MarketplaceSubscriptionResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of MarketplaceSubscription objects. If null, there are no - * additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of MarketplaceSubscription objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the MarketplaceSubscriptionResourceArmPaginatedResult object itself. - */ - public MarketplaceSubscriptionResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MarketplaceSubscriptionResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MarketplaceSubscriptionResourceArmPaginatedResult if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MarketplaceSubscriptionResourceArmPaginatedResult. - */ - public static MarketplaceSubscriptionResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MarketplaceSubscriptionResourceArmPaginatedResult deserializedMarketplaceSubscriptionResourceArmPaginatedResult - = new MarketplaceSubscriptionResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> MarketplaceSubscriptionInner.fromJson(reader1)); - deserializedMarketplaceSubscriptionResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedMarketplaceSubscriptionResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMarketplaceSubscriptionResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionStatus.java deleted file mode 100644 index b4b81c8b3875..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionStatus.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for MarketplaceSubscriptionStatus. - */ -public final class MarketplaceSubscriptionStatus extends ExpandableStringEnum { - /** - * Static value Subscribed for MarketplaceSubscriptionStatus. - */ - public static final MarketplaceSubscriptionStatus SUBSCRIBED = fromString("Subscribed"); - - /** - * Static value Suspended for MarketplaceSubscriptionStatus. - */ - public static final MarketplaceSubscriptionStatus SUSPENDED = fromString("Suspended"); - - /** - * Static value Unsubscribed for MarketplaceSubscriptionStatus. - */ - public static final MarketplaceSubscriptionStatus UNSUBSCRIBED = fromString("Unsubscribed"); - - /** - * Creates a new instance of MarketplaceSubscriptionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MarketplaceSubscriptionStatus() { - } - - /** - * Creates or finds a MarketplaceSubscriptionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding MarketplaceSubscriptionStatus. - */ - public static MarketplaceSubscriptionStatus fromString(String name) { - return fromString(name, MarketplaceSubscriptionStatus.class); - } - - /** - * Gets known MarketplaceSubscriptionStatus values. - * - * @return known MarketplaceSubscriptionStatus values. - */ - public static Collection values() { - return values(MarketplaceSubscriptionStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptions.java deleted file mode 100644 index ef3e61d60773..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptions.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 MarketplaceSubscriptions. - */ -public interface MarketplaceSubscriptions { - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context); - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @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 container. - */ - MarketplaceSubscription get(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @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 container along with {@link Response}. - */ - MarketplaceSubscription getById(String id); - - /** - * Get container. - * - * @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 container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @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. - */ - void deleteById(String id); - - /** - * Delete Marketplace Subscription (asynchronous). - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new MarketplaceSubscription resource. - * - * @param name resource name. - * @return the first stage of the new MarketplaceSubscription definition. - */ - MarketplaceSubscription.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationComputeResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationComputeResource.java deleted file mode 100644 index 3ef07ac06f9d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationComputeResource.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * DTO object representing compute resource. - */ -@Fluent -public final class MaterializationComputeResource implements JsonSerializable { - /* - * Specifies the instance type - */ - private String instanceType; - - /** - * Creates an instance of MaterializationComputeResource class. - */ - public MaterializationComputeResource() { - } - - /** - * Get the instanceType property: Specifies the instance type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Set the instanceType property: Specifies the instance type. - * - * @param instanceType the instanceType value to set. - * @return the MaterializationComputeResource object itself. - */ - public MaterializationComputeResource withInstanceType(String instanceType) { - this.instanceType = instanceType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MaterializationComputeResource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MaterializationComputeResource if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MaterializationComputeResource. - */ - public static MaterializationComputeResource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MaterializationComputeResource deserializedMaterializationComputeResource - = new MaterializationComputeResource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedMaterializationComputeResource.instanceType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMaterializationComputeResource; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationSettings.java deleted file mode 100644 index bf2062a00f75..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationSettings.java +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The MaterializationSettings model. - */ -@Fluent -public final class MaterializationSettings implements JsonSerializable { - /* - * Specifies the stores to which materialization should happen - */ - private MaterializationStoreType storeType; - - /* - * Specifies the schedule details - */ - private RecurrenceTrigger schedule; - - /* - * Specifies the notification details - */ - private NotificationSetting notification; - - /* - * Specifies the compute resource settings - */ - private MaterializationComputeResource resource; - - /* - * Specifies the spark compute settings - */ - private Map sparkConfiguration; - - /** - * Creates an instance of MaterializationSettings class. - */ - public MaterializationSettings() { - } - - /** - * Get the storeType property: Specifies the stores to which materialization should happen. - * - * @return the storeType value. - */ - public MaterializationStoreType storeType() { - return this.storeType; - } - - /** - * Set the storeType property: Specifies the stores to which materialization should happen. - * - * @param storeType the storeType value to set. - * @return the MaterializationSettings object itself. - */ - public MaterializationSettings withStoreType(MaterializationStoreType storeType) { - this.storeType = storeType; - return this; - } - - /** - * Get the schedule property: Specifies the schedule details. - * - * @return the schedule value. - */ - public RecurrenceTrigger schedule() { - return this.schedule; - } - - /** - * Set the schedule property: Specifies the schedule details. - * - * @param schedule the schedule value to set. - * @return the MaterializationSettings object itself. - */ - public MaterializationSettings withSchedule(RecurrenceTrigger schedule) { - this.schedule = schedule; - return this; - } - - /** - * Get the notification property: Specifies the notification details. - * - * @return the notification value. - */ - public NotificationSetting notification() { - return this.notification; - } - - /** - * Set the notification property: Specifies the notification details. - * - * @param notification the notification value to set. - * @return the MaterializationSettings object itself. - */ - public MaterializationSettings withNotification(NotificationSetting notification) { - this.notification = notification; - return this; - } - - /** - * Get the resource property: Specifies the compute resource settings. - * - * @return the resource value. - */ - public MaterializationComputeResource resource() { - return this.resource; - } - - /** - * Set the resource property: Specifies the compute resource settings. - * - * @param resource the resource value to set. - * @return the MaterializationSettings object itself. - */ - public MaterializationSettings withResource(MaterializationComputeResource resource) { - this.resource = resource; - return this; - } - - /** - * Get the sparkConfiguration property: Specifies the spark compute settings. - * - * @return the sparkConfiguration value. - */ - public Map sparkConfiguration() { - return this.sparkConfiguration; - } - - /** - * Set the sparkConfiguration property: Specifies the spark compute settings. - * - * @param sparkConfiguration the sparkConfiguration value to set. - * @return the MaterializationSettings object itself. - */ - public MaterializationSettings withSparkConfiguration(Map sparkConfiguration) { - this.sparkConfiguration = sparkConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (schedule() != null) { - schedule().validate(); - } - if (notification() != null) { - notification().validate(); - } - if (resource() != null) { - resource().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("storeType", this.storeType == null ? null : this.storeType.toString()); - jsonWriter.writeJsonField("schedule", this.schedule); - jsonWriter.writeJsonField("notification", this.notification); - jsonWriter.writeJsonField("resource", this.resource); - jsonWriter.writeMapField("sparkConfiguration", this.sparkConfiguration, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MaterializationSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MaterializationSettings if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the MaterializationSettings. - */ - public static MaterializationSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MaterializationSettings deserializedMaterializationSettings = new MaterializationSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("storeType".equals(fieldName)) { - deserializedMaterializationSettings.storeType - = MaterializationStoreType.fromString(reader.getString()); - } else if ("schedule".equals(fieldName)) { - deserializedMaterializationSettings.schedule = RecurrenceTrigger.fromJson(reader); - } else if ("notification".equals(fieldName)) { - deserializedMaterializationSettings.notification = NotificationSetting.fromJson(reader); - } else if ("resource".equals(fieldName)) { - deserializedMaterializationSettings.resource = MaterializationComputeResource.fromJson(reader); - } else if ("sparkConfiguration".equals(fieldName)) { - Map sparkConfiguration = reader.readMap(reader1 -> reader1.getString()); - deserializedMaterializationSettings.sparkConfiguration = sparkConfiguration; - } else { - reader.skipChildren(); - } - } - - return deserializedMaterializationSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationStoreType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationStoreType.java deleted file mode 100644 index 43f7debbfb3e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationStoreType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for MaterializationStoreType. - */ -public final class MaterializationStoreType extends ExpandableStringEnum { - /** - * Static value None for MaterializationStoreType. - */ - public static final MaterializationStoreType NONE = fromString("None"); - - /** - * Static value Online for MaterializationStoreType. - */ - public static final MaterializationStoreType ONLINE = fromString("Online"); - - /** - * Static value Offline for MaterializationStoreType. - */ - public static final MaterializationStoreType OFFLINE = fromString("Offline"); - - /** - * Static value OnlineAndOffline for MaterializationStoreType. - */ - public static final MaterializationStoreType ONLINE_AND_OFFLINE = fromString("OnlineAndOffline"); - - /** - * Creates a new instance of MaterializationStoreType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MaterializationStoreType() { - } - - /** - * Creates or finds a MaterializationStoreType from its string representation. - * - * @param name a name to look for. - * @return the corresponding MaterializationStoreType. - */ - public static MaterializationStoreType fromString(String name) { - return fromString(name, MaterializationStoreType.class); - } - - /** - * Gets known MaterializationStoreType values. - * - * @return known MaterializationStoreType values. - */ - public static Collection values() { - return values(MaterializationStoreType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.java deleted file mode 100644 index dc27f903d2f3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines an early termination policy based on running averages of the primary metric of all runs. - */ -@Fluent -public final class MedianStoppingPolicy extends EarlyTerminationPolicy { - /* - * [Required] Name of policy configuration - */ - private EarlyTerminationPolicyType policyType = EarlyTerminationPolicyType.MEDIAN_STOPPING; - - /** - * Creates an instance of MedianStoppingPolicy class. - */ - public MedianStoppingPolicy() { - } - - /** - * Get the policyType property: [Required] Name of policy configuration. - * - * @return the policyType value. - */ - @Override - public EarlyTerminationPolicyType policyType() { - return this.policyType; - } - - /** - * {@inheritDoc} - */ - @Override - public MedianStoppingPolicy withEvaluationInterval(Integer evaluationInterval) { - super.withEvaluationInterval(evaluationInterval); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MedianStoppingPolicy withDelayEvaluation(Integer delayEvaluation) { - super.withDelayEvaluation(delayEvaluation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("evaluationInterval", evaluationInterval()); - jsonWriter.writeNumberField("delayEvaluation", delayEvaluation()); - jsonWriter.writeStringField("policyType", this.policyType == null ? null : this.policyType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MedianStoppingPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MedianStoppingPolicy if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the MedianStoppingPolicy. - */ - public static MedianStoppingPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MedianStoppingPolicy deserializedMedianStoppingPolicy = new MedianStoppingPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("evaluationInterval".equals(fieldName)) { - deserializedMedianStoppingPolicy.withEvaluationInterval(reader.getNullable(JsonReader::getInt)); - } else if ("delayEvaluation".equals(fieldName)) { - deserializedMedianStoppingPolicy.withDelayEvaluation(reader.getNullable(JsonReader::getInt)); - } else if ("policyType".equals(fieldName)) { - deserializedMedianStoppingPolicy.policyType - = EarlyTerminationPolicyType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMedianStoppingPolicy; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java deleted file mode 100644 index 2684f3c46669..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.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.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; - -/** - * An immutable client-side representation of ModelContainer. - */ -public interface ModelContainer { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - ModelContainerProperties 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.machinelearning.fluent.models.ModelContainerInner object. - * - * @return the inner object. - */ - ModelContainerInner innerModel(); - - /** - * The entirety of the ModelContainer definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The ModelContainer definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ModelContainer definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ModelContainer definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the ModelContainer definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(ModelContainerProperties properties); - } - - /** - * The stage of the ModelContainer 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - ModelContainer create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ModelContainer create(Context context); - } - } - - /** - * Begins update for the ModelContainer resource. - * - * @return the stage of resource update. - */ - ModelContainer.Update update(); - - /** - * The template for ModelContainer update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ModelContainer apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ModelContainer apply(Context context); - } - - /** - * The ModelContainer update stages. - */ - interface UpdateStages { - /** - * The stage of the ModelContainer update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(ModelContainerProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ModelContainer refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ModelContainer refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java deleted file mode 100644 index bdaf4f96244c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The ModelContainerProperties model. - */ -@Fluent -public final class ModelContainerProperties extends AssetContainer { - /* - * Provisioning state for the model container. - */ - private AssetProvisioningState provisioningState; - - /* - * The latest version inside this container. - */ - private String latestVersion; - - /* - * The next auto incremental version - */ - private String nextVersion; - - /** - * Creates an instance of ModelContainerProperties class. - */ - public ModelContainerProperties() { - } - - /** - * Get the provisioningState property: Provisioning state for the model container. - * - * @return the provisioningState value. - */ - public AssetProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the latestVersion property: The latest version inside this container. - * - * @return the latestVersion value. - */ - @Override - public String latestVersion() { - return this.latestVersion; - } - - /** - * Get the nextVersion property: The next auto incremental version. - * - * @return the nextVersion value. - */ - @Override - public String nextVersion() { - return this.nextVersion; - } - - /** - * {@inheritDoc} - */ - @Override - public ModelContainerProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ModelContainerProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ModelContainerProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ModelContainerProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ModelContainerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ModelContainerProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ModelContainerProperties. - */ - public static ModelContainerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ModelContainerProperties deserializedModelContainerProperties = new ModelContainerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedModelContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedModelContainerProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedModelContainerProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedModelContainerProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("latestVersion".equals(fieldName)) { - deserializedModelContainerProperties.latestVersion = reader.getString(); - } else if ("nextVersion".equals(fieldName)) { - deserializedModelContainerProperties.nextVersion = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedModelContainerProperties.provisioningState - = AssetProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedModelContainerProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerResourceArmPaginatedResult.java deleted file mode 100644 index bb34f6608d07..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerResourceArmPaginatedResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of ModelContainer entities. - */ -@Fluent -public final class ModelContainerResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type ModelContainer. - */ - private List value; - - /* - * The link to the next page of ModelContainer objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of ModelContainerResourceArmPaginatedResult class. - */ - public ModelContainerResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type ModelContainer. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type ModelContainer. - * - * @param value the value value to set. - * @return the ModelContainerResourceArmPaginatedResult object itself. - */ - public ModelContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of ModelContainer objects. If null, there are no additional - * pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of ModelContainer objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the ModelContainerResourceArmPaginatedResult object itself. - */ - public ModelContainerResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ModelContainerResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ModelContainerResourceArmPaginatedResult if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ModelContainerResourceArmPaginatedResult. - */ - public static ModelContainerResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ModelContainerResourceArmPaginatedResult deserializedModelContainerResourceArmPaginatedResult - = new ModelContainerResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ModelContainerInner.fromJson(reader1)); - deserializedModelContainerResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedModelContainerResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedModelContainerResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainers.java deleted file mode 100644 index 2a2c4808ac0f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainers.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.machinelearning.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 ModelContainers. - */ -public interface ModelContainers { - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, - ListViewType listViewType, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container. - */ - ModelContainer get(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @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 container along with {@link Response}. - */ - ModelContainer getById(String id); - - /** - * Get container. - * - * @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 container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete container. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ModelContainer resource. - * - * @param name resource name. - * @return the first stage of the new ModelContainer definition. - */ - ModelContainer.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSettings.java deleted file mode 100644 index c0dcb4fd0a3d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSettings.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ModelSettings model. - */ -@Fluent -public final class ModelSettings implements JsonSerializable { - /* - * The unique model identifier that this ServerlessEndpoint should provision. - */ - private String modelId; - - /** - * Creates an instance of ModelSettings class. - */ - public ModelSettings() { - } - - /** - * Get the modelId property: The unique model identifier that this ServerlessEndpoint should provision. - * - * @return the modelId value. - */ - public String modelId() { - return this.modelId; - } - - /** - * Set the modelId property: The unique model identifier that this ServerlessEndpoint should provision. - * - * @param modelId the modelId value to set. - * @return the ModelSettings object itself. - */ - public ModelSettings withModelId(String modelId) { - this.modelId = modelId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("modelId", this.modelId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ModelSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ModelSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ModelSettings. - */ - public static ModelSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ModelSettings deserializedModelSettings = new ModelSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("modelId".equals(fieldName)) { - deserializedModelSettings.modelId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedModelSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java deleted file mode 100644 index c32502aa8bd1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Image model size. - */ -public final class ModelSize extends ExpandableStringEnum { - /** - * Static value None for ModelSize. - */ - public static final ModelSize NONE = fromString("None"); - - /** - * Static value Small for ModelSize. - */ - public static final ModelSize SMALL = fromString("Small"); - - /** - * Static value Medium for ModelSize. - */ - public static final ModelSize MEDIUM = fromString("Medium"); - - /** - * Static value Large for ModelSize. - */ - public static final ModelSize LARGE = fromString("Large"); - - /** - * Static value ExtraLarge for ModelSize. - */ - public static final ModelSize EXTRA_LARGE = fromString("ExtraLarge"); - - /** - * Creates a new instance of ModelSize value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ModelSize() { - } - - /** - * Creates or finds a ModelSize from its string representation. - * - * @param name a name to look for. - * @return the corresponding ModelSize. - */ - public static ModelSize fromString(String name) { - return fromString(name, ModelSize.class); - } - - /** - * Gets known ModelSize values. - * - * @return known ModelSize values. - */ - public static Collection values() { - return values(ModelSize.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelTaskType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelTaskType.java deleted file mode 100644 index 47f7534e2ebf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelTaskType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Model task type enum. - */ -public final class ModelTaskType extends ExpandableStringEnum { - /** - * Static value Classification for ModelTaskType. - */ - public static final ModelTaskType CLASSIFICATION = fromString("Classification"); - - /** - * Static value Regression for ModelTaskType. - */ - public static final ModelTaskType REGRESSION = fromString("Regression"); - - /** - * Creates a new instance of ModelTaskType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ModelTaskType() { - } - - /** - * Creates or finds a ModelTaskType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ModelTaskType. - */ - public static ModelTaskType fromString(String name) { - return fromString(name, ModelTaskType.class); - } - - /** - * Gets known ModelTaskType values. - * - * @return known ModelTaskType values. - */ - public static Collection values() { - return values(ModelTaskType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java deleted file mode 100644 index f3e6e5d0e2f1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; - -/** - * An immutable client-side representation of ModelVersion. - */ -public interface ModelVersion { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - ModelVersionProperties 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.machinelearning.fluent.models.ModelVersionInner object. - * - * @return the inner object. - */ - ModelVersionInner innerModel(); - - /** - * The entirety of the ModelVersion definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The ModelVersion definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ModelVersion definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ModelVersion definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @return the next definition stage. - */ - WithProperties withExistingModel(String resourceGroupName, String workspaceName, String name); - } - - /** - * The stage of the ModelVersion definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(ModelVersionProperties properties); - } - - /** - * The stage of the ModelVersion 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - ModelVersion create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ModelVersion create(Context context); - } - } - - /** - * Begins update for the ModelVersion resource. - * - * @return the stage of resource update. - */ - ModelVersion.Update update(); - - /** - * The template for ModelVersion update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ModelVersion apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ModelVersion apply(Context context); - } - - /** - * The ModelVersion update stages. - */ - interface UpdateStages { - /** - * The stage of the ModelVersion update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(ModelVersionProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ModelVersion refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ModelVersion refresh(Context context); - - /** - * Publish version asset into registry. - * - * @param body Destination registry info. - * @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. - */ - void publish(DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param body Destination registry info. - * @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. - */ - void publish(DestinationAsset body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java deleted file mode 100644 index 2c7b58910191..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Model asset version details. - */ -@Fluent -public final class ModelVersionProperties extends AssetBase { - /* - * Mapping of model flavors to their properties. - */ - private Map flavors; - - /* - * The storage format for this entity. Used for NCD. - */ - private String modelType; - - /* - * The URI path to the model contents. - */ - private String modelUri; - - /* - * Name of the training job which produced this model - */ - private String jobName; - - /* - * Provisioning state for the model version. - */ - private AssetProvisioningState provisioningState; - - /* - * Stage in the model lifecycle assigned to this model - */ - private String stage; - - /** - * Creates an instance of ModelVersionProperties class. - */ - public ModelVersionProperties() { - } - - /** - * Get the flavors property: Mapping of model flavors to their properties. - * - * @return the flavors value. - */ - public Map flavors() { - return this.flavors; - } - - /** - * Set the flavors property: Mapping of model flavors to their properties. - * - * @param flavors the flavors value to set. - * @return the ModelVersionProperties object itself. - */ - public ModelVersionProperties withFlavors(Map flavors) { - this.flavors = flavors; - return this; - } - - /** - * Get the modelType property: The storage format for this entity. Used for NCD. - * - * @return the modelType value. - */ - public String modelType() { - return this.modelType; - } - - /** - * Set the modelType property: The storage format for this entity. Used for NCD. - * - * @param modelType the modelType value to set. - * @return the ModelVersionProperties object itself. - */ - public ModelVersionProperties withModelType(String modelType) { - this.modelType = modelType; - return this; - } - - /** - * Get the modelUri property: The URI path to the model contents. - * - * @return the modelUri value. - */ - public String modelUri() { - return this.modelUri; - } - - /** - * Set the modelUri property: The URI path to the model contents. - * - * @param modelUri the modelUri value to set. - * @return the ModelVersionProperties object itself. - */ - public ModelVersionProperties withModelUri(String modelUri) { - this.modelUri = modelUri; - return this; - } - - /** - * Get the jobName property: Name of the training job which produced this model. - * - * @return the jobName value. - */ - public String jobName() { - return this.jobName; - } - - /** - * Set the jobName property: Name of the training job which produced this model. - * - * @param jobName the jobName value to set. - * @return the ModelVersionProperties object itself. - */ - public ModelVersionProperties withJobName(String jobName) { - this.jobName = jobName; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the model version. - * - * @return the provisioningState value. - */ - public AssetProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the stage property: Stage in the model lifecycle assigned to this model. - * - * @return the stage value. - */ - public String stage() { - return this.stage; - } - - /** - * Set the stage property: Stage in the model lifecycle assigned to this model. - * - * @param stage the stage value to set. - * @return the ModelVersionProperties object itself. - */ - public ModelVersionProperties withStage(String stage) { - this.stage = stage; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ModelVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ModelVersionProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ModelVersionProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ModelVersionProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ModelVersionProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (flavors() != null) { - flavors().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); - jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); - jsonWriter.writeMapField("flavors", this.flavors, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("modelType", this.modelType); - jsonWriter.writeStringField("modelUri", this.modelUri); - jsonWriter.writeStringField("jobName", this.jobName); - jsonWriter.writeStringField("stage", this.stage); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ModelVersionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ModelVersionProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ModelVersionProperties. - */ - public static ModelVersionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ModelVersionProperties deserializedModelVersionProperties = new ModelVersionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedModelVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedModelVersionProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedModelVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedModelVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("isAnonymous".equals(fieldName)) { - deserializedModelVersionProperties.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); - } else if ("flavors".equals(fieldName)) { - Map flavors = reader.readMap(reader1 -> FlavorData.fromJson(reader1)); - deserializedModelVersionProperties.flavors = flavors; - } else if ("modelType".equals(fieldName)) { - deserializedModelVersionProperties.modelType = reader.getString(); - } else if ("modelUri".equals(fieldName)) { - deserializedModelVersionProperties.modelUri = reader.getString(); - } else if ("jobName".equals(fieldName)) { - deserializedModelVersionProperties.jobName = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedModelVersionProperties.provisioningState - = AssetProvisioningState.fromString(reader.getString()); - } else if ("stage".equals(fieldName)) { - deserializedModelVersionProperties.stage = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedModelVersionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionResourceArmPaginatedResult.java deleted file mode 100644 index e25ce546e223..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionResourceArmPaginatedResult.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of ModelVersion entities. - */ -@Fluent -public final class ModelVersionResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type ModelVersion. - */ - private List value; - - /* - * The link to the next page of ModelVersion objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of ModelVersionResourceArmPaginatedResult class. - */ - public ModelVersionResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type ModelVersion. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type ModelVersion. - * - * @param value the value value to set. - * @return the ModelVersionResourceArmPaginatedResult object itself. - */ - public ModelVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of ModelVersion objects. If null, there are no additional - * pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of ModelVersion objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the ModelVersionResourceArmPaginatedResult object itself. - */ - public ModelVersionResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ModelVersionResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ModelVersionResourceArmPaginatedResult if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ModelVersionResourceArmPaginatedResult. - */ - public static ModelVersionResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ModelVersionResourceArmPaginatedResult deserializedModelVersionResourceArmPaginatedResult - = new ModelVersionResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ModelVersionInner.fromJson(reader1)); - deserializedModelVersionResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedModelVersionResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedModelVersionResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersions.java deleted file mode 100644 index 6c6324ae18b0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersions.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.machinelearning.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 ModelVersions. - */ -public interface ModelVersions { - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @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 a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, - String orderBy, Integer top, String version, String description, Integer offset, String tags, String properties, - String feed, ListViewType listViewType, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - ModelVersion get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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. - */ - void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, - Context context); - - /** - * Get version. - * - * @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 version along with {@link Response}. - */ - ModelVersion getById(String id); - - /** - * Get version. - * - * @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 version along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete version. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete version. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ModelVersion resource. - * - * @param name resource name. - * @return the first stage of the new ModelVersion definition. - */ - ModelVersion.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeConfigurationBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeConfigurationBase.java deleted file mode 100644 index bbf1d37b8c20..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeConfigurationBase.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Monitor compute configuration base definition. - */ -@Immutable -public class MonitorComputeConfigurationBase implements JsonSerializable { - /* - * [Required] Specifies the type of signal to monitor. - */ - private MonitorComputeType computeType = MonitorComputeType.fromString("MonitorComputeConfigurationBase"); - - /** - * Creates an instance of MonitorComputeConfigurationBase class. - */ - public MonitorComputeConfigurationBase() { - } - - /** - * Get the computeType property: [Required] Specifies the type of signal to monitor. - * - * @return the computeType value. - */ - public MonitorComputeType computeType() { - return this.computeType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MonitorComputeConfigurationBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MonitorComputeConfigurationBase if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MonitorComputeConfigurationBase. - */ - public static MonitorComputeConfigurationBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("computeType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("ServerlessSpark".equals(discriminatorValue)) { - return MonitorServerlessSparkCompute.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static MonitorComputeConfigurationBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MonitorComputeConfigurationBase deserializedMonitorComputeConfigurationBase - = new MonitorComputeConfigurationBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeType".equals(fieldName)) { - deserializedMonitorComputeConfigurationBase.computeType - = MonitorComputeType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMonitorComputeConfigurationBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityBase.java deleted file mode 100644 index 2f4cdfb68eb1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityBase.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Monitor compute identity base definition. - */ -@Immutable -public class MonitorComputeIdentityBase implements JsonSerializable { - /* - * [Required] Specifies the type of identity to use within the monitoring jobs. - */ - private MonitorComputeIdentityType computeIdentityType - = MonitorComputeIdentityType.fromString("MonitorComputeIdentityBase"); - - /** - * Creates an instance of MonitorComputeIdentityBase class. - */ - public MonitorComputeIdentityBase() { - } - - /** - * Get the computeIdentityType property: [Required] Specifies the type of identity to use within the monitoring - * jobs. - * - * @return the computeIdentityType value. - */ - public MonitorComputeIdentityType computeIdentityType() { - return this.computeIdentityType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeIdentityType", - this.computeIdentityType == null ? null : this.computeIdentityType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MonitorComputeIdentityBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MonitorComputeIdentityBase if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MonitorComputeIdentityBase. - */ - public static MonitorComputeIdentityBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("computeIdentityType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AmlToken".equals(discriminatorValue)) { - return AmlTokenComputeIdentity.fromJson(readerToUse.reset()); - } else if ("ManagedIdentity".equals(discriminatorValue)) { - return ManagedComputeIdentity.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static MonitorComputeIdentityBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MonitorComputeIdentityBase deserializedMonitorComputeIdentityBase = new MonitorComputeIdentityBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeIdentityType".equals(fieldName)) { - deserializedMonitorComputeIdentityBase.computeIdentityType - = MonitorComputeIdentityType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMonitorComputeIdentityBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityType.java deleted file mode 100644 index c13556b09de5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Monitor compute identity type enum. - */ -public final class MonitorComputeIdentityType extends ExpandableStringEnum { - /** - * Static value AmlToken for MonitorComputeIdentityType. - */ - public static final MonitorComputeIdentityType AML_TOKEN = fromString("AmlToken"); - - /** - * Static value ManagedIdentity for MonitorComputeIdentityType. - */ - public static final MonitorComputeIdentityType MANAGED_IDENTITY = fromString("ManagedIdentity"); - - /** - * Creates a new instance of MonitorComputeIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MonitorComputeIdentityType() { - } - - /** - * Creates or finds a MonitorComputeIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding MonitorComputeIdentityType. - */ - public static MonitorComputeIdentityType fromString(String name) { - return fromString(name, MonitorComputeIdentityType.class); - } - - /** - * Gets known MonitorComputeIdentityType values. - * - * @return known MonitorComputeIdentityType values. - */ - public static Collection values() { - return values(MonitorComputeIdentityType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeType.java deleted file mode 100644 index 262241787ec4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Monitor compute type enum. - */ -public final class MonitorComputeType extends ExpandableStringEnum { - /** - * Static value ServerlessSpark for MonitorComputeType. - */ - public static final MonitorComputeType SERVERLESS_SPARK = fromString("ServerlessSpark"); - - /** - * Creates a new instance of MonitorComputeType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MonitorComputeType() { - } - - /** - * Creates or finds a MonitorComputeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding MonitorComputeType. - */ - public static MonitorComputeType fromString(String name) { - return fromString(name, MonitorComputeType.class); - } - - /** - * Gets known MonitorComputeType values. - * - * @return known MonitorComputeType values. - */ - public static Collection values() { - return values(MonitorComputeType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorDefinition.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorDefinition.java deleted file mode 100644 index cf097a552e4b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorDefinition.java +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The MonitorDefinition model. - */ -@Fluent -public final class MonitorDefinition implements JsonSerializable { - /* - * The entities targeted by the monitor. - */ - private MonitoringTarget monitoringTarget; - - /* - * [Required] The signals to monitor. - */ - private Map signals; - - /* - * [Required] The ARM resource ID of the compute resource to run the monitoring job on. - */ - private MonitorComputeConfigurationBase computeConfiguration; - - /* - * The monitor's notification settings. - */ - private MonitorNotificationSettings alertNotificationSettings; - - /** - * Creates an instance of MonitorDefinition class. - */ - public MonitorDefinition() { - } - - /** - * Get the monitoringTarget property: The entities targeted by the monitor. - * - * @return the monitoringTarget value. - */ - public MonitoringTarget monitoringTarget() { - return this.monitoringTarget; - } - - /** - * Set the monitoringTarget property: The entities targeted by the monitor. - * - * @param monitoringTarget the monitoringTarget value to set. - * @return the MonitorDefinition object itself. - */ - public MonitorDefinition withMonitoringTarget(MonitoringTarget monitoringTarget) { - this.monitoringTarget = monitoringTarget; - return this; - } - - /** - * Get the signals property: [Required] The signals to monitor. - * - * @return the signals value. - */ - public Map signals() { - return this.signals; - } - - /** - * Set the signals property: [Required] The signals to monitor. - * - * @param signals the signals value to set. - * @return the MonitorDefinition object itself. - */ - public MonitorDefinition withSignals(Map signals) { - this.signals = signals; - return this; - } - - /** - * Get the computeConfiguration property: [Required] The ARM resource ID of the compute resource to run the - * monitoring job on. - * - * @return the computeConfiguration value. - */ - public MonitorComputeConfigurationBase computeConfiguration() { - return this.computeConfiguration; - } - - /** - * Set the computeConfiguration property: [Required] The ARM resource ID of the compute resource to run the - * monitoring job on. - * - * @param computeConfiguration the computeConfiguration value to set. - * @return the MonitorDefinition object itself. - */ - public MonitorDefinition withComputeConfiguration(MonitorComputeConfigurationBase computeConfiguration) { - this.computeConfiguration = computeConfiguration; - return this; - } - - /** - * Get the alertNotificationSettings property: The monitor's notification settings. - * - * @return the alertNotificationSettings value. - */ - public MonitorNotificationSettings alertNotificationSettings() { - return this.alertNotificationSettings; - } - - /** - * Set the alertNotificationSettings property: The monitor's notification settings. - * - * @param alertNotificationSettings the alertNotificationSettings value to set. - * @return the MonitorDefinition object itself. - */ - public MonitorDefinition withAlertNotificationSettings(MonitorNotificationSettings alertNotificationSettings) { - this.alertNotificationSettings = alertNotificationSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (monitoringTarget() != null) { - monitoringTarget().validate(); - } - if (signals() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property signals in model MonitorDefinition")); - } else { - signals().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (computeConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property computeConfiguration in model MonitorDefinition")); - } else { - computeConfiguration().validate(); - } - if (alertNotificationSettings() != null) { - alertNotificationSettings().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MonitorDefinition.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("signals", this.signals, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("computeConfiguration", this.computeConfiguration); - jsonWriter.writeJsonField("monitoringTarget", this.monitoringTarget); - jsonWriter.writeJsonField("alertNotificationSettings", this.alertNotificationSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MonitorDefinition from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MonitorDefinition if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MonitorDefinition. - */ - public static MonitorDefinition fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MonitorDefinition deserializedMonitorDefinition = new MonitorDefinition(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("signals".equals(fieldName)) { - Map signals - = reader.readMap(reader1 -> MonitoringSignalBase.fromJson(reader1)); - deserializedMonitorDefinition.signals = signals; - } else if ("computeConfiguration".equals(fieldName)) { - deserializedMonitorDefinition.computeConfiguration - = MonitorComputeConfigurationBase.fromJson(reader); - } else if ("monitoringTarget".equals(fieldName)) { - deserializedMonitorDefinition.monitoringTarget = MonitoringTarget.fromJson(reader); - } else if ("alertNotificationSettings".equals(fieldName)) { - deserializedMonitorDefinition.alertNotificationSettings - = MonitorNotificationSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMonitorDefinition; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorEmailNotificationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorEmailNotificationSettings.java deleted file mode 100644 index b9ae80c6d2b6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorEmailNotificationSettings.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The MonitorEmailNotificationSettings model. - */ -@Fluent -public final class MonitorEmailNotificationSettings implements JsonSerializable { - /* - * The email recipient list which has a limitation of 499 characters in total. - */ - private List emails; - - /** - * Creates an instance of MonitorEmailNotificationSettings class. - */ - public MonitorEmailNotificationSettings() { - } - - /** - * Get the emails property: The email recipient list which has a limitation of 499 characters in total. - * - * @return the emails value. - */ - public List emails() { - return this.emails; - } - - /** - * Set the emails property: The email recipient list which has a limitation of 499 characters in total. - * - * @param emails the emails value to set. - * @return the MonitorEmailNotificationSettings object itself. - */ - public MonitorEmailNotificationSettings withEmails(List emails) { - this.emails = emails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("emails", this.emails, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MonitorEmailNotificationSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MonitorEmailNotificationSettings if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MonitorEmailNotificationSettings. - */ - public static MonitorEmailNotificationSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MonitorEmailNotificationSettings deserializedMonitorEmailNotificationSettings - = new MonitorEmailNotificationSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("emails".equals(fieldName)) { - List emails = reader.readArray(reader1 -> reader1.getString()); - deserializedMonitorEmailNotificationSettings.emails = emails; - } else { - reader.skipChildren(); - } - } - - return deserializedMonitorEmailNotificationSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorNotificationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorNotificationSettings.java deleted file mode 100644 index 07d6891a9888..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorNotificationSettings.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The MonitorNotificationSettings model. - */ -@Fluent -public final class MonitorNotificationSettings implements JsonSerializable { - /* - * The AML notification email settings. - */ - private MonitorEmailNotificationSettings emailNotificationSettings; - - /** - * Creates an instance of MonitorNotificationSettings class. - */ - public MonitorNotificationSettings() { - } - - /** - * Get the emailNotificationSettings property: The AML notification email settings. - * - * @return the emailNotificationSettings value. - */ - public MonitorEmailNotificationSettings emailNotificationSettings() { - return this.emailNotificationSettings; - } - - /** - * Set the emailNotificationSettings property: The AML notification email settings. - * - * @param emailNotificationSettings the emailNotificationSettings value to set. - * @return the MonitorNotificationSettings object itself. - */ - public MonitorNotificationSettings - withEmailNotificationSettings(MonitorEmailNotificationSettings emailNotificationSettings) { - this.emailNotificationSettings = emailNotificationSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (emailNotificationSettings() != null) { - emailNotificationSettings().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("emailNotificationSettings", this.emailNotificationSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MonitorNotificationSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MonitorNotificationSettings if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MonitorNotificationSettings. - */ - public static MonitorNotificationSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MonitorNotificationSettings deserializedMonitorNotificationSettings = new MonitorNotificationSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("emailNotificationSettings".equals(fieldName)) { - deserializedMonitorNotificationSettings.emailNotificationSettings - = MonitorEmailNotificationSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMonitorNotificationSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorServerlessSparkCompute.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorServerlessSparkCompute.java deleted file mode 100644 index 84973c652506..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorServerlessSparkCompute.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Monitor serverless spark compute definition. - */ -@Fluent -public final class MonitorServerlessSparkCompute extends MonitorComputeConfigurationBase { - /* - * [Required] Specifies the type of signal to monitor. - */ - private MonitorComputeType computeType = MonitorComputeType.SERVERLESS_SPARK; - - /* - * [Required] The identity scheme leveraged to by the spark jobs running on serverless Spark. - */ - private MonitorComputeIdentityBase computeIdentity; - - /* - * [Required] The instance type running the Spark job. - */ - private String instanceType; - - /* - * [Required] The Spark runtime version. - */ - private String runtimeVersion; - - /** - * Creates an instance of MonitorServerlessSparkCompute class. - */ - public MonitorServerlessSparkCompute() { - } - - /** - * Get the computeType property: [Required] Specifies the type of signal to monitor. - * - * @return the computeType value. - */ - @Override - public MonitorComputeType computeType() { - return this.computeType; - } - - /** - * Get the computeIdentity property: [Required] The identity scheme leveraged to by the spark jobs running on - * serverless Spark. - * - * @return the computeIdentity value. - */ - public MonitorComputeIdentityBase computeIdentity() { - return this.computeIdentity; - } - - /** - * Set the computeIdentity property: [Required] The identity scheme leveraged to by the spark jobs running on - * serverless Spark. - * - * @param computeIdentity the computeIdentity value to set. - * @return the MonitorServerlessSparkCompute object itself. - */ - public MonitorServerlessSparkCompute withComputeIdentity(MonitorComputeIdentityBase computeIdentity) { - this.computeIdentity = computeIdentity; - return this; - } - - /** - * Get the instanceType property: [Required] The instance type running the Spark job. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Set the instanceType property: [Required] The instance type running the Spark job. - * - * @param instanceType the instanceType value to set. - * @return the MonitorServerlessSparkCompute object itself. - */ - public MonitorServerlessSparkCompute withInstanceType(String instanceType) { - this.instanceType = instanceType; - return this; - } - - /** - * Get the runtimeVersion property: [Required] The Spark runtime version. - * - * @return the runtimeVersion value. - */ - public String runtimeVersion() { - return this.runtimeVersion; - } - - /** - * Set the runtimeVersion property: [Required] The Spark runtime version. - * - * @param runtimeVersion the runtimeVersion value to set. - * @return the MonitorServerlessSparkCompute object itself. - */ - public MonitorServerlessSparkCompute withRuntimeVersion(String runtimeVersion) { - this.runtimeVersion = runtimeVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (computeIdentity() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property computeIdentity in model MonitorServerlessSparkCompute")); - } else { - computeIdentity().validate(); - } - if (instanceType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property instanceType in model MonitorServerlessSparkCompute")); - } - if (runtimeVersion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property runtimeVersion in model MonitorServerlessSparkCompute")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MonitorServerlessSparkCompute.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("computeIdentity", this.computeIdentity); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("runtimeVersion", this.runtimeVersion); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MonitorServerlessSparkCompute from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MonitorServerlessSparkCompute if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MonitorServerlessSparkCompute. - */ - public static MonitorServerlessSparkCompute fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MonitorServerlessSparkCompute deserializedMonitorServerlessSparkCompute - = new MonitorServerlessSparkCompute(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeIdentity".equals(fieldName)) { - deserializedMonitorServerlessSparkCompute.computeIdentity - = MonitorComputeIdentityBase.fromJson(reader); - } else if ("instanceType".equals(fieldName)) { - deserializedMonitorServerlessSparkCompute.instanceType = reader.getString(); - } else if ("runtimeVersion".equals(fieldName)) { - deserializedMonitorServerlessSparkCompute.runtimeVersion = reader.getString(); - } else if ("computeType".equals(fieldName)) { - deserializedMonitorServerlessSparkCompute.computeType - = MonitorComputeType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMonitorServerlessSparkCompute; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureDataType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureDataType.java deleted file mode 100644 index a3ded87dc7d2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureDataType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for MonitoringFeatureDataType. - */ -public final class MonitoringFeatureDataType extends ExpandableStringEnum { - /** - * Static value Numerical for MonitoringFeatureDataType. - */ - public static final MonitoringFeatureDataType NUMERICAL = fromString("Numerical"); - - /** - * Static value Categorical for MonitoringFeatureDataType. - */ - public static final MonitoringFeatureDataType CATEGORICAL = fromString("Categorical"); - - /** - * Creates a new instance of MonitoringFeatureDataType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MonitoringFeatureDataType() { - } - - /** - * Creates or finds a MonitoringFeatureDataType from its string representation. - * - * @param name a name to look for. - * @return the corresponding MonitoringFeatureDataType. - */ - public static MonitoringFeatureDataType fromString(String name) { - return fromString(name, MonitoringFeatureDataType.class); - } - - /** - * Gets known MonitoringFeatureDataType values. - * - * @return known MonitoringFeatureDataType values. - */ - public static Collection values() { - return values(MonitoringFeatureDataType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterBase.java deleted file mode 100644 index e4d0e269413a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterBase.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The MonitoringFeatureFilterBase model. - */ -@Immutable -public class MonitoringFeatureFilterBase implements JsonSerializable { - /* - * [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. - */ - private MonitoringFeatureFilterType filterType - = MonitoringFeatureFilterType.fromString("MonitoringFeatureFilterBase"); - - /** - * Creates an instance of MonitoringFeatureFilterBase class. - */ - public MonitoringFeatureFilterBase() { - } - - /** - * Get the filterType property: [Required] Specifies the feature filter to leverage when selecting features to - * calculate metrics over. - * - * @return the filterType value. - */ - public MonitoringFeatureFilterType filterType() { - return this.filterType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("filterType", this.filterType == null ? null : this.filterType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MonitoringFeatureFilterBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MonitoringFeatureFilterBase if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MonitoringFeatureFilterBase. - */ - public static MonitoringFeatureFilterBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("filterType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AllFeatures".equals(discriminatorValue)) { - return AllFeatures.fromJson(readerToUse.reset()); - } else if ("FeatureSubset".equals(discriminatorValue)) { - return FeatureSubset.fromJson(readerToUse.reset()); - } else if ("TopNByAttribution".equals(discriminatorValue)) { - return TopNFeaturesByAttribution.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static MonitoringFeatureFilterBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MonitoringFeatureFilterBase deserializedMonitoringFeatureFilterBase = new MonitoringFeatureFilterBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("filterType".equals(fieldName)) { - deserializedMonitoringFeatureFilterBase.filterType - = MonitoringFeatureFilterType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMonitoringFeatureFilterBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterType.java deleted file mode 100644 index 15011a097b47..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for MonitoringFeatureFilterType. - */ -public final class MonitoringFeatureFilterType extends ExpandableStringEnum { - /** - * Static value AllFeatures for MonitoringFeatureFilterType. - */ - public static final MonitoringFeatureFilterType ALL_FEATURES = fromString("AllFeatures"); - - /** - * Static value TopNByAttribution for MonitoringFeatureFilterType. - */ - public static final MonitoringFeatureFilterType TOP_NBY_ATTRIBUTION = fromString("TopNByAttribution"); - - /** - * Static value FeatureSubset for MonitoringFeatureFilterType. - */ - public static final MonitoringFeatureFilterType FEATURE_SUBSET = fromString("FeatureSubset"); - - /** - * Creates a new instance of MonitoringFeatureFilterType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MonitoringFeatureFilterType() { - } - - /** - * Creates or finds a MonitoringFeatureFilterType from its string representation. - * - * @param name a name to look for. - * @return the corresponding MonitoringFeatureFilterType. - */ - public static MonitoringFeatureFilterType fromString(String name) { - return fromString(name, MonitoringFeatureFilterType.class); - } - - /** - * Gets known MonitoringFeatureFilterType values. - * - * @return known MonitoringFeatureFilterType values. - */ - public static Collection values() { - return values(MonitoringFeatureFilterType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataBase.java deleted file mode 100644 index 7a432a4c085c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataBase.java +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Monitoring input data base definition. - */ -@Fluent -public class MonitoringInputDataBase implements JsonSerializable { - /* - * [Required] Specifies the type of signal to monitor. - */ - private MonitoringInputDataType inputDataType = MonitoringInputDataType.fromString("MonitoringInputDataBase"); - - /* - * The context metadata of the data source. - */ - private String dataContext; - - /* - * [Required] Specifies the type of job. - */ - private JobInputType jobInputType; - - /* - * [Required] Input Asset URI. - */ - private String uri; - - /* - * Mapping of column names to special uses. - */ - private Map columns; - - /** - * Creates an instance of MonitoringInputDataBase class. - */ - public MonitoringInputDataBase() { - } - - /** - * Get the inputDataType property: [Required] Specifies the type of signal to monitor. - * - * @return the inputDataType value. - */ - public MonitoringInputDataType inputDataType() { - return this.inputDataType; - } - - /** - * Get the dataContext property: The context metadata of the data source. - * - * @return the dataContext value. - */ - public String dataContext() { - return this.dataContext; - } - - /** - * Set the dataContext property: The context metadata of the data source. - * - * @param dataContext the dataContext value to set. - * @return the MonitoringInputDataBase object itself. - */ - public MonitoringInputDataBase withDataContext(String dataContext) { - this.dataContext = dataContext; - return this; - } - - /** - * Get the jobInputType property: [Required] Specifies the type of job. - * - * @return the jobInputType value. - */ - public JobInputType jobInputType() { - return this.jobInputType; - } - - /** - * Set the jobInputType property: [Required] Specifies the type of job. - * - * @param jobInputType the jobInputType value to set. - * @return the MonitoringInputDataBase object itself. - */ - public MonitoringInputDataBase withJobInputType(JobInputType jobInputType) { - this.jobInputType = jobInputType; - return this; - } - - /** - * Get the uri property: [Required] Input Asset URI. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: [Required] Input Asset URI. - * - * @param uri the uri value to set. - * @return the MonitoringInputDataBase object itself. - */ - public MonitoringInputDataBase withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the columns property: Mapping of column names to special uses. - * - * @return the columns value. - */ - public Map columns() { - return this.columns; - } - - /** - * Set the columns property: Mapping of column names to special uses. - * - * @param columns the columns value to set. - * @return the MonitoringInputDataBase object itself. - */ - public MonitoringInputDataBase withColumns(Map columns) { - this.columns = columns; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (jobInputType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property jobInputType in model MonitoringInputDataBase")); - } - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model MonitoringInputDataBase")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MonitoringInputDataBase.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("jobInputType", this.jobInputType == null ? null : this.jobInputType.toString()); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("inputDataType", this.inputDataType == null ? null : this.inputDataType.toString()); - jsonWriter.writeStringField("dataContext", this.dataContext); - jsonWriter.writeMapField("columns", this.columns, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MonitoringInputDataBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MonitoringInputDataBase if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MonitoringInputDataBase. - */ - public static MonitoringInputDataBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("inputDataType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Fixed".equals(discriminatorValue)) { - return FixedInputData.fromJson(readerToUse.reset()); - } else if ("Rolling".equals(discriminatorValue)) { - return RollingInputData.fromJson(readerToUse.reset()); - } else if ("Static".equals(discriminatorValue)) { - return StaticInputData.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static MonitoringInputDataBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MonitoringInputDataBase deserializedMonitoringInputDataBase = new MonitoringInputDataBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobInputType".equals(fieldName)) { - deserializedMonitoringInputDataBase.jobInputType = JobInputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedMonitoringInputDataBase.uri = reader.getString(); - } else if ("inputDataType".equals(fieldName)) { - deserializedMonitoringInputDataBase.inputDataType - = MonitoringInputDataType.fromString(reader.getString()); - } else if ("dataContext".equals(fieldName)) { - deserializedMonitoringInputDataBase.dataContext = reader.getString(); - } else if ("columns".equals(fieldName)) { - Map columns = reader.readMap(reader1 -> reader1.getString()); - deserializedMonitoringInputDataBase.columns = columns; - } else { - reader.skipChildren(); - } - } - - return deserializedMonitoringInputDataBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataType.java deleted file mode 100644 index 9e27f332f8b4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Monitoring input data type enum. - */ -public final class MonitoringInputDataType extends ExpandableStringEnum { - /** - * Static value Static for MonitoringInputDataType. - */ - public static final MonitoringInputDataType STATIC = fromString("Static"); - - /** - * Static value Rolling for MonitoringInputDataType. - */ - public static final MonitoringInputDataType ROLLING = fromString("Rolling"); - - /** - * Static value Fixed for MonitoringInputDataType. - */ - public static final MonitoringInputDataType FIXED = fromString("Fixed"); - - /** - * Creates a new instance of MonitoringInputDataType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MonitoringInputDataType() { - } - - /** - * Creates or finds a MonitoringInputDataType from its string representation. - * - * @param name a name to look for. - * @return the corresponding MonitoringInputDataType. - */ - public static MonitoringInputDataType fromString(String name) { - return fromString(name, MonitoringInputDataType.class); - } - - /** - * Gets known MonitoringInputDataType values. - * - * @return known MonitoringInputDataType values. - */ - public static Collection values() { - return values(MonitoringInputDataType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringNotificationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringNotificationType.java deleted file mode 100644 index d6b6b8fa7e01..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringNotificationType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for MonitoringNotificationType. - */ -public final class MonitoringNotificationType extends ExpandableStringEnum { - /** - * Static value AmlNotification for MonitoringNotificationType. - */ - public static final MonitoringNotificationType AML_NOTIFICATION = fromString("AmlNotification"); - - /** - * Creates a new instance of MonitoringNotificationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MonitoringNotificationType() { - } - - /** - * Creates or finds a MonitoringNotificationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding MonitoringNotificationType. - */ - public static MonitoringNotificationType fromString(String name) { - return fromString(name, MonitoringNotificationType.class); - } - - /** - * Gets known MonitoringNotificationType values. - * - * @return known MonitoringNotificationType values. - */ - public static Collection values() { - return values(MonitoringNotificationType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalBase.java deleted file mode 100644 index 769095444e51..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalBase.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * The MonitoringSignalBase model. - */ -@Fluent -public class MonitoringSignalBase implements JsonSerializable { - /* - * [Required] Specifies the type of signal to monitor. - */ - private MonitoringSignalType signalType = MonitoringSignalType.fromString("MonitoringSignalBase"); - - /* - * The current notification mode for this signal. - */ - private List notificationTypes; - - /* - * Property dictionary. Properties can be added, but not removed or altered. - */ - private Map properties; - - /** - * Creates an instance of MonitoringSignalBase class. - */ - public MonitoringSignalBase() { - } - - /** - * Get the signalType property: [Required] Specifies the type of signal to monitor. - * - * @return the signalType value. - */ - public MonitoringSignalType signalType() { - return this.signalType; - } - - /** - * Get the notificationTypes property: The current notification mode for this signal. - * - * @return the notificationTypes value. - */ - public List notificationTypes() { - return this.notificationTypes; - } - - /** - * Set the notificationTypes property: The current notification mode for this signal. - * - * @param notificationTypes the notificationTypes value to set. - * @return the MonitoringSignalBase object itself. - */ - public MonitoringSignalBase withNotificationTypes(List notificationTypes) { - this.notificationTypes = notificationTypes; - return this; - } - - /** - * Get the properties property: Property dictionary. Properties can be added, but not removed or altered. - * - * @return the properties value. - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties property: Property dictionary. Properties can be added, but not removed or altered. - * - * @param properties the properties value to set. - * @return the MonitoringSignalBase object itself. - */ - public MonitoringSignalBase withProperties(Map properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("signalType", this.signalType == null ? null : this.signalType.toString()); - jsonWriter.writeArrayField("notificationTypes", this.notificationTypes, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MonitoringSignalBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MonitoringSignalBase if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the MonitoringSignalBase. - */ - public static MonitoringSignalBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("signalType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Custom".equals(discriminatorValue)) { - return CustomMonitoringSignal.fromJson(readerToUse.reset()); - } else if ("DataDrift".equals(discriminatorValue)) { - return DataDriftMonitoringSignal.fromJson(readerToUse.reset()); - } else if ("DataQuality".equals(discriminatorValue)) { - return DataQualityMonitoringSignal.fromJson(readerToUse.reset()); - } else if ("FeatureAttributionDrift".equals(discriminatorValue)) { - return FeatureAttributionDriftMonitoringSignal.fromJson(readerToUse.reset()); - } else if ("PredictionDrift".equals(discriminatorValue)) { - return PredictionDriftMonitoringSignal.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static MonitoringSignalBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MonitoringSignalBase deserializedMonitoringSignalBase = new MonitoringSignalBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("signalType".equals(fieldName)) { - deserializedMonitoringSignalBase.signalType = MonitoringSignalType.fromString(reader.getString()); - } else if ("notificationTypes".equals(fieldName)) { - List notificationTypes - = reader.readArray(reader1 -> MonitoringNotificationType.fromString(reader1.getString())); - deserializedMonitoringSignalBase.notificationTypes = notificationTypes; - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedMonitoringSignalBase.properties = properties; - } else { - reader.skipChildren(); - } - } - - return deserializedMonitoringSignalBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalType.java deleted file mode 100644 index bce3846d43f9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for MonitoringSignalType. - */ -public final class MonitoringSignalType extends ExpandableStringEnum { - /** - * Static value DataDrift for MonitoringSignalType. - */ - public static final MonitoringSignalType DATA_DRIFT = fromString("DataDrift"); - - /** - * Static value PredictionDrift for MonitoringSignalType. - */ - public static final MonitoringSignalType PREDICTION_DRIFT = fromString("PredictionDrift"); - - /** - * Static value DataQuality for MonitoringSignalType. - */ - public static final MonitoringSignalType DATA_QUALITY = fromString("DataQuality"); - - /** - * Static value FeatureAttributionDrift for MonitoringSignalType. - */ - public static final MonitoringSignalType FEATURE_ATTRIBUTION_DRIFT = fromString("FeatureAttributionDrift"); - - /** - * Static value Custom for MonitoringSignalType. - */ - public static final MonitoringSignalType CUSTOM = fromString("Custom"); - - /** - * Creates a new instance of MonitoringSignalType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MonitoringSignalType() { - } - - /** - * Creates or finds a MonitoringSignalType from its string representation. - * - * @param name a name to look for. - * @return the corresponding MonitoringSignalType. - */ - public static MonitoringSignalType fromString(String name) { - return fromString(name, MonitoringSignalType.class); - } - - /** - * Gets known MonitoringSignalType values. - * - * @return known MonitoringSignalType values. - */ - public static Collection values() { - return values(MonitoringSignalType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringTarget.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringTarget.java deleted file mode 100644 index e3b8d2c058cf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringTarget.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Monitoring target definition. - */ -@Fluent -public final class MonitoringTarget implements JsonSerializable { - /* - * Reference to the model asset targeted by this monitor. - */ - private String modelId; - - /* - * Reference to the deployment asset targeted by this monitor. - */ - private String deploymentId; - - /* - * [Required] The machine learning task type of the monitored model. - */ - private ModelTaskType taskType; - - /** - * Creates an instance of MonitoringTarget class. - */ - public MonitoringTarget() { - } - - /** - * Get the modelId property: Reference to the model asset targeted by this monitor. - * - * @return the modelId value. - */ - public String modelId() { - return this.modelId; - } - - /** - * Set the modelId property: Reference to the model asset targeted by this monitor. - * - * @param modelId the modelId value to set. - * @return the MonitoringTarget object itself. - */ - public MonitoringTarget withModelId(String modelId) { - this.modelId = modelId; - return this; - } - - /** - * Get the deploymentId property: Reference to the deployment asset targeted by this monitor. - * - * @return the deploymentId value. - */ - public String deploymentId() { - return this.deploymentId; - } - - /** - * Set the deploymentId property: Reference to the deployment asset targeted by this monitor. - * - * @param deploymentId the deploymentId value to set. - * @return the MonitoringTarget object itself. - */ - public MonitoringTarget withDeploymentId(String deploymentId) { - this.deploymentId = deploymentId; - return this; - } - - /** - * Get the taskType property: [Required] The machine learning task type of the monitored model. - * - * @return the taskType value. - */ - public ModelTaskType taskType() { - return this.taskType; - } - - /** - * Set the taskType property: [Required] The machine learning task type of the monitored model. - * - * @param taskType the taskType value to set. - * @return the MonitoringTarget object itself. - */ - public MonitoringTarget withTaskType(ModelTaskType taskType) { - this.taskType = taskType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (taskType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property taskType in model MonitoringTarget")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MonitoringTarget.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("modelId", this.modelId); - jsonWriter.writeStringField("deploymentId", this.deploymentId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MonitoringTarget from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MonitoringTarget if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MonitoringTarget. - */ - public static MonitoringTarget fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MonitoringTarget deserializedMonitoringTarget = new MonitoringTarget(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("taskType".equals(fieldName)) { - deserializedMonitoringTarget.taskType = ModelTaskType.fromString(reader.getString()); - } else if ("modelId".equals(fieldName)) { - deserializedMonitoringTarget.modelId = reader.getString(); - } else if ("deploymentId".equals(fieldName)) { - deserializedMonitoringTarget.deploymentId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMonitoringTarget; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringThreshold.java deleted file mode 100644 index 184b5ea74ded..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringThreshold.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The MonitoringThreshold model. - */ -@Fluent -public final class MonitoringThreshold implements JsonSerializable { - /* - * The threshold value. If null, the set default is dependent on the metric type. - */ - private Double value; - - /** - * Creates an instance of MonitoringThreshold class. - */ - public MonitoringThreshold() { - } - - /** - * Get the value property: The threshold value. If null, the set default is dependent on the metric type. - * - * @return the value value. - */ - public Double value() { - return this.value; - } - - /** - * Set the value property: The threshold value. If null, the set default is dependent on the metric type. - * - * @param value the value value to set. - * @return the MonitoringThreshold object itself. - */ - public MonitoringThreshold withValue(Double value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MonitoringThreshold from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MonitoringThreshold if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the MonitoringThreshold. - */ - public static MonitoringThreshold fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MonitoringThreshold deserializedMonitoringThreshold = new MonitoringThreshold(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - deserializedMonitoringThreshold.value = reader.getNullable(JsonReader::getDouble); - } else { - reader.skipChildren(); - } - } - - return deserializedMonitoringThreshold; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java deleted file mode 100644 index 6942678af7e8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Mount Action. - */ -public final class MountAction extends ExpandableStringEnum { - /** - * Static value Mount for MountAction. - */ - public static final MountAction MOUNT = fromString("Mount"); - - /** - * Static value Unmount for MountAction. - */ - public static final MountAction UNMOUNT = fromString("Unmount"); - - /** - * Creates a new instance of MountAction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MountAction() { - } - - /** - * Creates or finds a MountAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding MountAction. - */ - public static MountAction fromString(String name) { - return fromString(name, MountAction.class); - } - - /** - * Gets known MountAction values. - * - * @return known MountAction values. - */ - public static Collection values() { - return values(MountAction.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.java deleted file mode 100644 index fbdabad2aa98..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Mount state. - */ -public final class MountState extends ExpandableStringEnum { - /** - * Static value MountRequested for MountState. - */ - public static final MountState MOUNT_REQUESTED = fromString("MountRequested"); - - /** - * Static value Mounted for MountState. - */ - public static final MountState MOUNTED = fromString("Mounted"); - - /** - * Static value MountFailed for MountState. - */ - public static final MountState MOUNT_FAILED = fromString("MountFailed"); - - /** - * Static value UnmountRequested for MountState. - */ - public static final MountState UNMOUNT_REQUESTED = fromString("UnmountRequested"); - - /** - * Static value UnmountFailed for MountState. - */ - public static final MountState UNMOUNT_FAILED = fromString("UnmountFailed"); - - /** - * Static value Unmounted for MountState. - */ - public static final MountState UNMOUNTED = fromString("Unmounted"); - - /** - * Creates a new instance of MountState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MountState() { - } - - /** - * Creates or finds a MountState from its string representation. - * - * @param name a name to look for. - * @return the corresponding MountState. - */ - public static MountState fromString(String name) { - return fromString(name, MountState.class); - } - - /** - * Gets known MountState values. - * - * @return known MountState values. - */ - public static Collection values() { - return values(MountState.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java deleted file mode 100644 index 4819ae9be889..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * MPI distribution configuration. - */ -@Fluent -public final class Mpi extends DistributionConfiguration { - /* - * [Required] Specifies the type of distribution framework. - */ - private DistributionType distributionType = DistributionType.MPI; - - /* - * Number of processes per MPI node. - */ - private Integer processCountPerInstance; - - /** - * Creates an instance of Mpi class. - */ - public Mpi() { - } - - /** - * Get the distributionType property: [Required] Specifies the type of distribution framework. - * - * @return the distributionType value. - */ - @Override - public DistributionType distributionType() { - return this.distributionType; - } - - /** - * Get the processCountPerInstance property: Number of processes per MPI node. - * - * @return the processCountPerInstance value. - */ - public Integer processCountPerInstance() { - return this.processCountPerInstance; - } - - /** - * Set the processCountPerInstance property: Number of processes per MPI node. - * - * @param processCountPerInstance the processCountPerInstance value to set. - * @return the Mpi object itself. - */ - public Mpi withProcessCountPerInstance(Integer processCountPerInstance) { - this.processCountPerInstance = processCountPerInstance; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("distributionType", - this.distributionType == null ? null : this.distributionType.toString()); - jsonWriter.writeNumberField("processCountPerInstance", this.processCountPerInstance); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Mpi from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Mpi if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Mpi. - */ - public static Mpi fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Mpi deserializedMpi = new Mpi(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("distributionType".equals(fieldName)) { - deserializedMpi.distributionType = DistributionType.fromString(reader.getString()); - } else if ("processCountPerInstance".equals(fieldName)) { - deserializedMpi.processCountPerInstance = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedMpi; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java deleted file mode 100644 index 7c85af83bfa9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * N-Cross validations value. - */ -@Immutable -public class NCrossValidations implements JsonSerializable { - /* - * [Required] Mode for determining N-Cross validations. - */ - private NCrossValidationsMode mode = NCrossValidationsMode.fromString("NCrossValidations"); - - /** - * Creates an instance of NCrossValidations class. - */ - public NCrossValidations() { - } - - /** - * Get the mode property: [Required] Mode for determining N-Cross validations. - * - * @return the mode value. - */ - public NCrossValidationsMode mode() { - return this.mode; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NCrossValidations from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NCrossValidations if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the NCrossValidations. - */ - public static NCrossValidations fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("mode".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Auto".equals(discriminatorValue)) { - return AutoNCrossValidations.fromJson(readerToUse.reset()); - } else if ("Custom".equals(discriminatorValue)) { - return CustomNCrossValidations.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static NCrossValidations fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NCrossValidations deserializedNCrossValidations = new NCrossValidations(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedNCrossValidations.mode = NCrossValidationsMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNCrossValidations; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.java deleted file mode 100644 index f7b8e5fdc09d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Determines how N-Cross validations value is determined. - */ -public final class NCrossValidationsMode extends ExpandableStringEnum { - /** - * Static value Auto for NCrossValidationsMode. - */ - public static final NCrossValidationsMode AUTO = fromString("Auto"); - - /** - * Static value Custom for NCrossValidationsMode. - */ - public static final NCrossValidationsMode CUSTOM = fromString("Custom"); - - /** - * Creates a new instance of NCrossValidationsMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NCrossValidationsMode() { - } - - /** - * Creates or finds a NCrossValidationsMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding NCrossValidationsMode. - */ - public static NCrossValidationsMode fromString(String name) { - return fromString(name, NCrossValidationsMode.class); - } - - /** - * Gets known NCrossValidationsMode values. - * - * @return known NCrossValidationsMode values. - */ - public static Collection values() { - return values(NCrossValidationsMode.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Network.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Network.java deleted file mode 100644 index da852cefa0a9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Network.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * network of this container. - */ -public final class Network extends ExpandableStringEnum { - /** - * Static value Bridge for Network. - */ - public static final Network BRIDGE = fromString("Bridge"); - - /** - * Static value Host for Network. - */ - public static final Network HOST = fromString("Host"); - - /** - * Creates a new instance of Network value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Network() { - } - - /** - * Creates or finds a Network from its string representation. - * - * @param name a name to look for. - * @return the corresponding Network. - */ - public static Network fromString(String name) { - return fromString(name, Network.class); - } - - /** - * Gets known Network values. - * - * @return known Network values. - */ - public static Collection values() { - return values(Network.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVertical.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVertical.java deleted file mode 100644 index 1f17d8081c85..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVertical.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Abstract class for NLP related AutoML tasks. - * NLP - Natural Language Processing. - */ -@Fluent -public class NlpVertical implements JsonSerializable { - /* - * Execution constraints for AutoMLJob. - */ - private NlpVerticalLimitSettings limitSettings; - - /* - * Featurization inputs needed for AutoML job. - */ - private NlpVerticalFeaturizationSettings featurizationSettings; - - /* - * Validation data inputs. - */ - private MLTableJobInput validationData; - - /** - * Creates an instance of NlpVertical class. - */ - public NlpVertical() { - } - - /** - * Get the limitSettings property: Execution constraints for AutoMLJob. - * - * @return the limitSettings value. - */ - public NlpVerticalLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: Execution constraints for AutoMLJob. - * - * @param limitSettings the limitSettings value to set. - * @return the NlpVertical object itself. - */ - public NlpVertical withLimitSettings(NlpVerticalLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @return the featurizationSettings value. - */ - public NlpVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; - } - - /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @param featurizationSettings the featurizationSettings value to set. - * @return the NlpVertical object itself. - */ - public NlpVertical withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the NlpVertical object itself. - */ - public NlpVertical withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (limitSettings() != null) { - limitSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); - jsonWriter.writeJsonField("validationData", this.validationData); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NlpVertical from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NlpVertical if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the NlpVertical. - */ - public static NlpVertical fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NlpVertical deserializedNlpVertical = new NlpVertical(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("limitSettings".equals(fieldName)) { - deserializedNlpVertical.limitSettings = NlpVerticalLimitSettings.fromJson(reader); - } else if ("featurizationSettings".equals(fieldName)) { - deserializedNlpVertical.featurizationSettings = NlpVerticalFeaturizationSettings.fromJson(reader); - } else if ("validationData".equals(fieldName)) { - deserializedNlpVertical.validationData = MLTableJobInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNlpVertical; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.java deleted file mode 100644 index ac035c0e317f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The NlpVerticalFeaturizationSettings model. - */ -@Fluent -public final class NlpVerticalFeaturizationSettings extends FeaturizationSettings { - /** - * Creates an instance of NlpVerticalFeaturizationSettings class. - */ - public NlpVerticalFeaturizationSettings() { - } - - /** - * {@inheritDoc} - */ - @Override - public NlpVerticalFeaturizationSettings withDatasetLanguage(String datasetLanguage) { - super.withDatasetLanguage(datasetLanguage); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("datasetLanguage", datasetLanguage()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NlpVerticalFeaturizationSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NlpVerticalFeaturizationSettings if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NlpVerticalFeaturizationSettings. - */ - public static NlpVerticalFeaturizationSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NlpVerticalFeaturizationSettings deserializedNlpVerticalFeaturizationSettings - = new NlpVerticalFeaturizationSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("datasetLanguage".equals(fieldName)) { - deserializedNlpVerticalFeaturizationSettings.withDatasetLanguage(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNlpVerticalFeaturizationSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.java deleted file mode 100644 index fc3bb6072cb7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; - -/** - * Job execution constraints. - */ -@Fluent -public final class NlpVerticalLimitSettings implements JsonSerializable { - /* - * AutoML job timeout. - */ - private Duration timeout; - - /* - * Number of AutoML iterations. - */ - private Integer maxTrials; - - /* - * Maximum Concurrent AutoML iterations. - */ - private Integer maxConcurrentTrials; - - /** - * Creates an instance of NlpVerticalLimitSettings class. - */ - public NlpVerticalLimitSettings() { - } - - /** - * Get the timeout property: AutoML job timeout. - * - * @return the timeout value. - */ - public Duration timeout() { - return this.timeout; - } - - /** - * Set the timeout property: AutoML job timeout. - * - * @param timeout the timeout value to set. - * @return the NlpVerticalLimitSettings object itself. - */ - public NlpVerticalLimitSettings withTimeout(Duration timeout) { - this.timeout = timeout; - return this; - } - - /** - * Get the maxTrials property: Number of AutoML iterations. - * - * @return the maxTrials value. - */ - public Integer maxTrials() { - return this.maxTrials; - } - - /** - * Set the maxTrials property: Number of AutoML iterations. - * - * @param maxTrials the maxTrials value to set. - * @return the NlpVerticalLimitSettings object itself. - */ - public NlpVerticalLimitSettings withMaxTrials(Integer maxTrials) { - this.maxTrials = maxTrials; - return this; - } - - /** - * Get the maxConcurrentTrials property: Maximum Concurrent AutoML iterations. - * - * @return the maxConcurrentTrials value. - */ - public Integer maxConcurrentTrials() { - return this.maxConcurrentTrials; - } - - /** - * Set the maxConcurrentTrials property: Maximum Concurrent AutoML iterations. - * - * @param maxConcurrentTrials the maxConcurrentTrials value to set. - * @return the NlpVerticalLimitSettings object itself. - */ - public NlpVerticalLimitSettings withMaxConcurrentTrials(Integer maxConcurrentTrials) { - this.maxConcurrentTrials = maxConcurrentTrials; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("timeout", CoreUtils.durationToStringWithDays(this.timeout)); - jsonWriter.writeNumberField("maxTrials", this.maxTrials); - jsonWriter.writeNumberField("maxConcurrentTrials", this.maxConcurrentTrials); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NlpVerticalLimitSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NlpVerticalLimitSettings if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NlpVerticalLimitSettings. - */ - public static NlpVerticalLimitSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NlpVerticalLimitSettings deserializedNlpVerticalLimitSettings = new NlpVerticalLimitSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("timeout".equals(fieldName)) { - deserializedNlpVerticalLimitSettings.timeout - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("maxTrials".equals(fieldName)) { - deserializedNlpVerticalLimitSettings.maxTrials = reader.getNullable(JsonReader::getInt); - } else if ("maxConcurrentTrials".equals(fieldName)) { - deserializedNlpVerticalLimitSettings.maxConcurrentTrials = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedNlpVerticalLimitSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.java deleted file mode 100644 index 9585317b1bd0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. - */ -public final class NodeState extends ExpandableStringEnum { - /** - * Static value idle for NodeState. - */ - public static final NodeState IDLE = fromString("idle"); - - /** - * Static value running for NodeState. - */ - public static final NodeState RUNNING = fromString("running"); - - /** - * Static value preparing for NodeState. - */ - public static final NodeState PREPARING = fromString("preparing"); - - /** - * Static value unusable for NodeState. - */ - public static final NodeState UNUSABLE = fromString("unusable"); - - /** - * Static value leaving for NodeState. - */ - public static final NodeState LEAVING = fromString("leaving"); - - /** - * Static value preempted for NodeState. - */ - public static final NodeState PREEMPTED = fromString("preempted"); - - /** - * Creates a new instance of NodeState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NodeState() { - } - - /** - * Creates or finds a NodeState from its string representation. - * - * @param name a name to look for. - * @return the corresponding NodeState. - */ - public static NodeState fromString(String name) { - return fromString(name, NodeState.class); - } - - /** - * Gets known NodeState values. - * - * @return known NodeState values. - */ - public static Collection values() { - return values(NodeState.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.java deleted file mode 100644 index f18e968373d1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Counts of various compute node states on the amlCompute. - */ -@Immutable -public final class NodeStateCounts implements JsonSerializable { - /* - * Number of compute nodes in idle state. - */ - private Integer idleNodeCount; - - /* - * Number of compute nodes which are running jobs. - */ - private Integer runningNodeCount; - - /* - * Number of compute nodes which are being prepared. - */ - private Integer preparingNodeCount; - - /* - * Number of compute nodes which are in unusable state. - */ - private Integer unusableNodeCount; - - /* - * Number of compute nodes which are leaving the amlCompute. - */ - private Integer leavingNodeCount; - - /* - * Number of compute nodes which are in preempted state. - */ - private Integer preemptedNodeCount; - - /** - * Creates an instance of NodeStateCounts class. - */ - public NodeStateCounts() { - } - - /** - * Get the idleNodeCount property: Number of compute nodes in idle state. - * - * @return the idleNodeCount value. - */ - public Integer idleNodeCount() { - return this.idleNodeCount; - } - - /** - * Get the runningNodeCount property: Number of compute nodes which are running jobs. - * - * @return the runningNodeCount value. - */ - public Integer runningNodeCount() { - return this.runningNodeCount; - } - - /** - * Get the preparingNodeCount property: Number of compute nodes which are being prepared. - * - * @return the preparingNodeCount value. - */ - public Integer preparingNodeCount() { - return this.preparingNodeCount; - } - - /** - * Get the unusableNodeCount property: Number of compute nodes which are in unusable state. - * - * @return the unusableNodeCount value. - */ - public Integer unusableNodeCount() { - return this.unusableNodeCount; - } - - /** - * Get the leavingNodeCount property: Number of compute nodes which are leaving the amlCompute. - * - * @return the leavingNodeCount value. - */ - public Integer leavingNodeCount() { - return this.leavingNodeCount; - } - - /** - * Get the preemptedNodeCount property: Number of compute nodes which are in preempted state. - * - * @return the preemptedNodeCount value. - */ - public Integer preemptedNodeCount() { - return this.preemptedNodeCount; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NodeStateCounts from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NodeStateCounts if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the NodeStateCounts. - */ - public static NodeStateCounts fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NodeStateCounts deserializedNodeStateCounts = new NodeStateCounts(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("idleNodeCount".equals(fieldName)) { - deserializedNodeStateCounts.idleNodeCount = reader.getNullable(JsonReader::getInt); - } else if ("runningNodeCount".equals(fieldName)) { - deserializedNodeStateCounts.runningNodeCount = reader.getNullable(JsonReader::getInt); - } else if ("preparingNodeCount".equals(fieldName)) { - deserializedNodeStateCounts.preparingNodeCount = reader.getNullable(JsonReader::getInt); - } else if ("unusableNodeCount".equals(fieldName)) { - deserializedNodeStateCounts.unusableNodeCount = reader.getNullable(JsonReader::getInt); - } else if ("leavingNodeCount".equals(fieldName)) { - deserializedNodeStateCounts.leavingNodeCount = reader.getNullable(JsonReader::getInt); - } else if ("preemptedNodeCount".equals(fieldName)) { - deserializedNodeStateCounts.preemptedNodeCount = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedNodeStateCounts; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.java deleted file mode 100644 index 7fa852b13a2d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Abstract Nodes definition. - */ -@Immutable -public class Nodes implements JsonSerializable { - /* - * [Required] Type of the Nodes value - */ - private NodesValueType nodesValueType = NodesValueType.fromString("Nodes"); - - /** - * Creates an instance of Nodes class. - */ - public Nodes() { - } - - /** - * Get the nodesValueType property: [Required] Type of the Nodes value. - * - * @return the nodesValueType value. - */ - public NodesValueType nodesValueType() { - return this.nodesValueType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nodesValueType", - this.nodesValueType == null ? null : this.nodesValueType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Nodes from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Nodes if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Nodes. - */ - public static Nodes fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("nodesValueType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("All".equals(discriminatorValue)) { - return AllNodes.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static Nodes fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Nodes deserializedNodes = new Nodes(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nodesValueType".equals(fieldName)) { - deserializedNodes.nodesValueType = NodesValueType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNodes; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodesValueType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodesValueType.java deleted file mode 100644 index c6e506e0f89b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodesValueType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The enumerated types for the nodes value. - */ -public final class NodesValueType extends ExpandableStringEnum { - /** - * Static value All for NodesValueType. - */ - public static final NodesValueType ALL = fromString("All"); - - /** - * Creates a new instance of NodesValueType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NodesValueType() { - } - - /** - * Creates or finds a NodesValueType from its string representation. - * - * @param name a name to look for. - * @return the corresponding NodesValueType. - */ - public static NodesValueType fromString(String name) { - return fromString(name, NodesValueType.class); - } - - /** - * Gets known NodesValueType values. - * - * @return known NodesValueType values. - */ - public static Collection values() { - return values(NodesValueType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.java deleted file mode 100644 index 1fbdf1bc301a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; - -/** - * The NoneAuthTypeWorkspaceConnectionProperties model. - */ -@Fluent -public final class NoneAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /* - * Authentication type of the connection target - */ - private ConnectionAuthType authType = ConnectionAuthType.NONE; - - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - - /** - * Creates an instance of NoneAuthTypeWorkspaceConnectionProperties class. - */ - public NoneAuthTypeWorkspaceConnectionProperties() { - } - - /** - * Get the authType property: Authentication type of the connection target. - * - * @return the authType value. - */ - @Override - public ConnectionAuthType authType() { - return this.authType; - } - - /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. - */ - @Override - public ConnectionGroup group() { - return this.group; - } - - /** - * {@inheritDoc} - */ - @Override - public NoneAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NoneAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NoneAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NoneAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NoneAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NoneAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { - super.withSharedUserList(sharedUserList); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NoneAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NoneAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", category() == null ? null : category().toString()); - jsonWriter.writeStringField("expiryTime", - expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); - jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); - jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("sharedUserList", sharedUserList(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NoneAuthTypeWorkspaceConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NoneAuthTypeWorkspaceConnectionProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NoneAuthTypeWorkspaceConnectionProperties. - */ - public static NoneAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NoneAuthTypeWorkspaceConnectionProperties deserializedNoneAuthTypeWorkspaceConnectionProperties - = new NoneAuthTypeWorkspaceConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedNoneAuthTypeWorkspaceConnectionProperties - .withCategory(ConnectionCategory.fromString(reader.getString())); - } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedNoneAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); - } else if ("expiryTime".equals(fieldName)) { - deserializedNoneAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("group".equals(fieldName)) { - deserializedNoneAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); - } else if ("isSharedToAll".equals(fieldName)) { - deserializedNoneAuthTypeWorkspaceConnectionProperties - .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedNoneAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); - } else if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedNoneAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); - } else if ("sharedUserList".equals(fieldName)) { - List sharedUserList = reader.readArray(reader1 -> reader1.getString()); - deserializedNoneAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedNoneAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { - deserializedNoneAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { - deserializedNoneAuthTypeWorkspaceConnectionProperties.authType - = ConnectionAuthType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNoneAuthTypeWorkspaceConnectionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.java deleted file mode 100644 index 1181f7139943..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Empty/none datastore credentials. - */ -@Immutable -public final class NoneDatastoreCredentials extends DatastoreCredentials { - /* - * [Required] Credential type used to authentication with storage. - */ - private CredentialsType credentialsType = CredentialsType.NONE; - - /** - * Creates an instance of NoneDatastoreCredentials class. - */ - public NoneDatastoreCredentials() { - } - - /** - * Get the credentialsType property: [Required] Credential type used to authentication with storage. - * - * @return the credentialsType value. - */ - @Override - public CredentialsType credentialsType() { - return this.credentialsType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("credentialsType", - this.credentialsType == null ? null : this.credentialsType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NoneDatastoreCredentials from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NoneDatastoreCredentials if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NoneDatastoreCredentials. - */ - public static NoneDatastoreCredentials fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NoneDatastoreCredentials deserializedNoneDatastoreCredentials = new NoneDatastoreCredentials(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("credentialsType".equals(fieldName)) { - deserializedNoneDatastoreCredentials.credentialsType - = CredentialsType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNoneDatastoreCredentials; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookAccessTokenResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookAccessTokenResult.java deleted file mode 100644 index 16f860733f31..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookAccessTokenResult.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner; - -/** - * An immutable client-side representation of NotebookAccessTokenResult. - */ -public interface NotebookAccessTokenResult { - /** - * Gets the notebookResourceId property: The notebookResourceId property. - * - * @return the notebookResourceId value. - */ - String notebookResourceId(); - - /** - * Gets the hostname property: The hostName property. - * - * @return the hostname value. - */ - String hostname(); - - /** - * Gets the publicDns property: The publicDns property. - * - * @return the publicDns value. - */ - String publicDns(); - - /** - * Gets the accessToken property: The accessToken property. - * - * @return the accessToken value. - */ - String accessToken(); - - /** - * Gets the tokenType property: The tokenType property. - * - * @return the tokenType value. - */ - String tokenType(); - - /** - * Gets the expiresIn property: The expiresIn property. - * - * @return the expiresIn value. - */ - Integer expiresIn(); - - /** - * Gets the refreshToken property: The refreshToken property. - * - * @return the refreshToken value. - */ - String refreshToken(); - - /** - * Gets the scope property: The scope property. - * - * @return the scope value. - */ - String scope(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner object. - * - * @return the inner object. - */ - NotebookAccessTokenResultInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java deleted file mode 100644 index f68e7d296588..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The NotebookPreparationError model. - */ -@Fluent -public final class NotebookPreparationError implements JsonSerializable { - /* - * The errorMessage property. - */ - private String errorMessage; - - /* - * The statusCode property. - */ - private Integer statusCode; - - /** - * Creates an instance of NotebookPreparationError class. - */ - public NotebookPreparationError() { - } - - /** - * Get the errorMessage property: The errorMessage property. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Set the errorMessage property: The errorMessage property. - * - * @param errorMessage the errorMessage value to set. - * @return the NotebookPreparationError object itself. - */ - public NotebookPreparationError withErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - return this; - } - - /** - * Get the statusCode property: The statusCode property. - * - * @return the statusCode value. - */ - public Integer statusCode() { - return this.statusCode; - } - - /** - * Set the statusCode property: The statusCode property. - * - * @param statusCode the statusCode value to set. - * @return the NotebookPreparationError object itself. - */ - public NotebookPreparationError withStatusCode(Integer statusCode) { - this.statusCode = statusCode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("errorMessage", this.errorMessage); - jsonWriter.writeNumberField("statusCode", this.statusCode); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NotebookPreparationError from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NotebookPreparationError if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NotebookPreparationError. - */ - public static NotebookPreparationError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NotebookPreparationError deserializedNotebookPreparationError = new NotebookPreparationError(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("errorMessage".equals(fieldName)) { - deserializedNotebookPreparationError.errorMessage = reader.getString(); - } else if ("statusCode".equals(fieldName)) { - deserializedNotebookPreparationError.statusCode = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedNotebookPreparationError; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookResourceInfo.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookResourceInfo.java deleted file mode 100644 index fc2e20758309..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookResourceInfo.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; - -/** - * An immutable client-side representation of NotebookResourceInfo. - */ -public interface NotebookResourceInfo { - /** - * Gets the fqdn property: The fqdn property. - * - * @return the fqdn value. - */ - String fqdn(); - - /** - * Gets the resourceId property: the data plane resourceId that used to initialize notebook component. - * - * @return the resourceId value. - */ - String resourceId(); - - /** - * Gets the notebookPreparationError property: The error that occurs when preparing notebook. - * - * @return the notebookPreparationError value. - */ - NotebookPreparationError notebookPreparationError(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner object. - * - * @return the inner object. - */ - NotebookResourceInfoInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotificationSetting.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotificationSetting.java deleted file mode 100644 index 3cea94fb5b86..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotificationSetting.java +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Configuration for notification. - */ -@Fluent -public final class NotificationSetting implements JsonSerializable { - /* - * This is the email recipient list which has a limitation of 499 characters in total concat with comma separator - */ - private List emails; - - /* - * Send email notification to user on specified notification type - */ - private List emailOn; - - /* - * Send webhook callback to a service. Key is a user-provided name for the webhook. - */ - private Map webhooks; - - /** - * Creates an instance of NotificationSetting class. - */ - public NotificationSetting() { - } - - /** - * Get the emails property: This is the email recipient list which has a limitation of 499 characters in total - * concat with comma separator. - * - * @return the emails value. - */ - public List emails() { - return this.emails; - } - - /** - * Set the emails property: This is the email recipient list which has a limitation of 499 characters in total - * concat with comma separator. - * - * @param emails the emails value to set. - * @return the NotificationSetting object itself. - */ - public NotificationSetting withEmails(List emails) { - this.emails = emails; - return this; - } - - /** - * Get the emailOn property: Send email notification to user on specified notification type. - * - * @return the emailOn value. - */ - public List emailOn() { - return this.emailOn; - } - - /** - * Set the emailOn property: Send email notification to user on specified notification type. - * - * @param emailOn the emailOn value to set. - * @return the NotificationSetting object itself. - */ - public NotificationSetting withEmailOn(List emailOn) { - this.emailOn = emailOn; - return this; - } - - /** - * Get the webhooks property: Send webhook callback to a service. Key is a user-provided name for the webhook. - * - * @return the webhooks value. - */ - public Map webhooks() { - return this.webhooks; - } - - /** - * Set the webhooks property: Send webhook callback to a service. Key is a user-provided name for the webhook. - * - * @param webhooks the webhooks value to set. - * @return the NotificationSetting object itself. - */ - public NotificationSetting withWebhooks(Map webhooks) { - this.webhooks = webhooks; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (webhooks() != null) { - webhooks().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("emails", this.emails, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("emailOn", this.emailOn, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeMapField("webhooks", this.webhooks, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NotificationSetting from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NotificationSetting if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the NotificationSetting. - */ - public static NotificationSetting fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NotificationSetting deserializedNotificationSetting = new NotificationSetting(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("emails".equals(fieldName)) { - List emails = reader.readArray(reader1 -> reader1.getString()); - deserializedNotificationSetting.emails = emails; - } else if ("emailOn".equals(fieldName)) { - List emailOn - = reader.readArray(reader1 -> EmailNotificationEnableType.fromString(reader1.getString())); - deserializedNotificationSetting.emailOn = emailOn; - } else if ("webhooks".equals(fieldName)) { - Map webhooks = reader.readMap(reader1 -> Webhook.fromJson(reader1)); - deserializedNotificationSetting.webhooks = webhooks; - } else { - reader.skipChildren(); - } - } - - return deserializedNotificationSetting; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetric.java deleted file mode 100644 index a35da18f7bcb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetric.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for NumericalDataDriftMetric. - */ -public final class NumericalDataDriftMetric extends ExpandableStringEnum { - /** - * Static value JensenShannonDistance for NumericalDataDriftMetric. - */ - public static final NumericalDataDriftMetric JENSEN_SHANNON_DISTANCE = fromString("JensenShannonDistance"); - - /** - * Static value PopulationStabilityIndex for NumericalDataDriftMetric. - */ - public static final NumericalDataDriftMetric POPULATION_STABILITY_INDEX = fromString("PopulationStabilityIndex"); - - /** - * Static value NormalizedWassersteinDistance for NumericalDataDriftMetric. - */ - public static final NumericalDataDriftMetric NORMALIZED_WASSERSTEIN_DISTANCE - = fromString("NormalizedWassersteinDistance"); - - /** - * Static value TwoSampleKolmogorovSmirnovTest for NumericalDataDriftMetric. - */ - public static final NumericalDataDriftMetric TWO_SAMPLE_KOLMOGOROV_SMIRNOV_TEST - = fromString("TwoSampleKolmogorovSmirnovTest"); - - /** - * Creates a new instance of NumericalDataDriftMetric value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NumericalDataDriftMetric() { - } - - /** - * Creates or finds a NumericalDataDriftMetric from its string representation. - * - * @param name a name to look for. - * @return the corresponding NumericalDataDriftMetric. - */ - public static NumericalDataDriftMetric fromString(String name) { - return fromString(name, NumericalDataDriftMetric.class); - } - - /** - * Gets known NumericalDataDriftMetric values. - * - * @return known NumericalDataDriftMetric values. - */ - public static Collection values() { - return values(NumericalDataDriftMetric.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetricThreshold.java deleted file mode 100644 index 8d04f58ba940..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetricThreshold.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The NumericalDataDriftMetricThreshold model. - */ -@Fluent -public final class NumericalDataDriftMetricThreshold extends DataDriftMetricThresholdBase { - /* - * [Required] Specifies the data type of the metric threshold. - */ - private MonitoringFeatureDataType dataType = MonitoringFeatureDataType.NUMERICAL; - - /* - * [Required] The numerical data drift metric to calculate. - */ - private NumericalDataDriftMetric metric; - - /** - * Creates an instance of NumericalDataDriftMetricThreshold class. - */ - public NumericalDataDriftMetricThreshold() { - } - - /** - * Get the dataType property: [Required] Specifies the data type of the metric threshold. - * - * @return the dataType value. - */ - @Override - public MonitoringFeatureDataType dataType() { - return this.dataType; - } - - /** - * Get the metric property: [Required] The numerical data drift metric to calculate. - * - * @return the metric value. - */ - public NumericalDataDriftMetric metric() { - return this.metric; - } - - /** - * Set the metric property: [Required] The numerical data drift metric to calculate. - * - * @param metric the metric value to set. - * @return the NumericalDataDriftMetricThreshold object itself. - */ - public NumericalDataDriftMetricThreshold withMetric(NumericalDataDriftMetric metric) { - this.metric = metric; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NumericalDataDriftMetricThreshold withThreshold(MonitoringThreshold threshold) { - super.withThreshold(threshold); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (metric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metric in model NumericalDataDriftMetricThreshold")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NumericalDataDriftMetricThreshold.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("threshold", threshold()); - jsonWriter.writeStringField("metric", this.metric == null ? null : this.metric.toString()); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NumericalDataDriftMetricThreshold from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NumericalDataDriftMetricThreshold if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the NumericalDataDriftMetricThreshold. - */ - public static NumericalDataDriftMetricThreshold fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NumericalDataDriftMetricThreshold deserializedNumericalDataDriftMetricThreshold - = new NumericalDataDriftMetricThreshold(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("threshold".equals(fieldName)) { - deserializedNumericalDataDriftMetricThreshold.withThreshold(MonitoringThreshold.fromJson(reader)); - } else if ("metric".equals(fieldName)) { - deserializedNumericalDataDriftMetricThreshold.metric - = NumericalDataDriftMetric.fromString(reader.getString()); - } else if ("dataType".equals(fieldName)) { - deserializedNumericalDataDriftMetricThreshold.dataType - = MonitoringFeatureDataType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNumericalDataDriftMetricThreshold; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetric.java deleted file mode 100644 index cb11945fcfa3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetric.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for NumericalDataQualityMetric. - */ -public final class NumericalDataQualityMetric extends ExpandableStringEnum { - /** - * Static value NullValueRate for NumericalDataQualityMetric. - */ - public static final NumericalDataQualityMetric NULL_VALUE_RATE = fromString("NullValueRate"); - - /** - * Static value DataTypeErrorRate for NumericalDataQualityMetric. - */ - public static final NumericalDataQualityMetric DATA_TYPE_ERROR_RATE = fromString("DataTypeErrorRate"); - - /** - * Static value OutOfBoundsRate for NumericalDataQualityMetric. - */ - public static final NumericalDataQualityMetric OUT_OF_BOUNDS_RATE = fromString("OutOfBoundsRate"); - - /** - * Creates a new instance of NumericalDataQualityMetric value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NumericalDataQualityMetric() { - } - - /** - * Creates or finds a NumericalDataQualityMetric from its string representation. - * - * @param name a name to look for. - * @return the corresponding NumericalDataQualityMetric. - */ - public static NumericalDataQualityMetric fromString(String name) { - return fromString(name, NumericalDataQualityMetric.class); - } - - /** - * Gets known NumericalDataQualityMetric values. - * - * @return known NumericalDataQualityMetric values. - */ - public static Collection values() { - return values(NumericalDataQualityMetric.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetricThreshold.java deleted file mode 100644 index 52d7eb95ec72..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetricThreshold.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The NumericalDataQualityMetricThreshold model. - */ -@Fluent -public final class NumericalDataQualityMetricThreshold extends DataQualityMetricThresholdBase { - /* - * [Required] Specifies the data type of the metric threshold. - */ - private MonitoringFeatureDataType dataType = MonitoringFeatureDataType.NUMERICAL; - - /* - * [Required] The numerical data quality metric to calculate. - */ - private NumericalDataQualityMetric metric; - - /** - * Creates an instance of NumericalDataQualityMetricThreshold class. - */ - public NumericalDataQualityMetricThreshold() { - } - - /** - * Get the dataType property: [Required] Specifies the data type of the metric threshold. - * - * @return the dataType value. - */ - @Override - public MonitoringFeatureDataType dataType() { - return this.dataType; - } - - /** - * Get the metric property: [Required] The numerical data quality metric to calculate. - * - * @return the metric value. - */ - public NumericalDataQualityMetric metric() { - return this.metric; - } - - /** - * Set the metric property: [Required] The numerical data quality metric to calculate. - * - * @param metric the metric value to set. - * @return the NumericalDataQualityMetricThreshold object itself. - */ - public NumericalDataQualityMetricThreshold withMetric(NumericalDataQualityMetric metric) { - this.metric = metric; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NumericalDataQualityMetricThreshold withThreshold(MonitoringThreshold threshold) { - super.withThreshold(threshold); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (metric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metric in model NumericalDataQualityMetricThreshold")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NumericalDataQualityMetricThreshold.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("threshold", threshold()); - jsonWriter.writeStringField("metric", this.metric == null ? null : this.metric.toString()); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NumericalDataQualityMetricThreshold from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NumericalDataQualityMetricThreshold if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the NumericalDataQualityMetricThreshold. - */ - public static NumericalDataQualityMetricThreshold fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NumericalDataQualityMetricThreshold deserializedNumericalDataQualityMetricThreshold - = new NumericalDataQualityMetricThreshold(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("threshold".equals(fieldName)) { - deserializedNumericalDataQualityMetricThreshold.withThreshold(MonitoringThreshold.fromJson(reader)); - } else if ("metric".equals(fieldName)) { - deserializedNumericalDataQualityMetricThreshold.metric - = NumericalDataQualityMetric.fromString(reader.getString()); - } else if ("dataType".equals(fieldName)) { - deserializedNumericalDataQualityMetricThreshold.dataType - = MonitoringFeatureDataType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNumericalDataQualityMetricThreshold; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetric.java deleted file mode 100644 index 379949abac71..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetric.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for NumericalPredictionDriftMetric. - */ -public final class NumericalPredictionDriftMetric extends ExpandableStringEnum { - /** - * Static value JensenShannonDistance for NumericalPredictionDriftMetric. - */ - public static final NumericalPredictionDriftMetric JENSEN_SHANNON_DISTANCE = fromString("JensenShannonDistance"); - - /** - * Static value PopulationStabilityIndex for NumericalPredictionDriftMetric. - */ - public static final NumericalPredictionDriftMetric POPULATION_STABILITY_INDEX - = fromString("PopulationStabilityIndex"); - - /** - * Static value NormalizedWassersteinDistance for NumericalPredictionDriftMetric. - */ - public static final NumericalPredictionDriftMetric NORMALIZED_WASSERSTEIN_DISTANCE - = fromString("NormalizedWassersteinDistance"); - - /** - * Static value TwoSampleKolmogorovSmirnovTest for NumericalPredictionDriftMetric. - */ - public static final NumericalPredictionDriftMetric TWO_SAMPLE_KOLMOGOROV_SMIRNOV_TEST - = fromString("TwoSampleKolmogorovSmirnovTest"); - - /** - * Creates a new instance of NumericalPredictionDriftMetric value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NumericalPredictionDriftMetric() { - } - - /** - * Creates or finds a NumericalPredictionDriftMetric from its string representation. - * - * @param name a name to look for. - * @return the corresponding NumericalPredictionDriftMetric. - */ - public static NumericalPredictionDriftMetric fromString(String name) { - return fromString(name, NumericalPredictionDriftMetric.class); - } - - /** - * Gets known NumericalPredictionDriftMetric values. - * - * @return known NumericalPredictionDriftMetric values. - */ - public static Collection values() { - return values(NumericalPredictionDriftMetric.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetricThreshold.java deleted file mode 100644 index e56d7ca78a4e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetricThreshold.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The NumericalPredictionDriftMetricThreshold model. - */ -@Fluent -public final class NumericalPredictionDriftMetricThreshold extends PredictionDriftMetricThresholdBase { - /* - * [Required] Specifies the data type of the metric threshold. - */ - private MonitoringFeatureDataType dataType = MonitoringFeatureDataType.NUMERICAL; - - /* - * [Required] The numerical prediction drift metric to calculate. - */ - private NumericalPredictionDriftMetric metric; - - /** - * Creates an instance of NumericalPredictionDriftMetricThreshold class. - */ - public NumericalPredictionDriftMetricThreshold() { - } - - /** - * Get the dataType property: [Required] Specifies the data type of the metric threshold. - * - * @return the dataType value. - */ - @Override - public MonitoringFeatureDataType dataType() { - return this.dataType; - } - - /** - * Get the metric property: [Required] The numerical prediction drift metric to calculate. - * - * @return the metric value. - */ - public NumericalPredictionDriftMetric metric() { - return this.metric; - } - - /** - * Set the metric property: [Required] The numerical prediction drift metric to calculate. - * - * @param metric the metric value to set. - * @return the NumericalPredictionDriftMetricThreshold object itself. - */ - public NumericalPredictionDriftMetricThreshold withMetric(NumericalPredictionDriftMetric metric) { - this.metric = metric; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NumericalPredictionDriftMetricThreshold withThreshold(MonitoringThreshold threshold) { - super.withThreshold(threshold); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (metric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metric in model NumericalPredictionDriftMetricThreshold")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NumericalPredictionDriftMetricThreshold.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("threshold", threshold()); - jsonWriter.writeStringField("metric", this.metric == null ? null : this.metric.toString()); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NumericalPredictionDriftMetricThreshold from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NumericalPredictionDriftMetricThreshold if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the NumericalPredictionDriftMetricThreshold. - */ - public static NumericalPredictionDriftMetricThreshold fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NumericalPredictionDriftMetricThreshold deserializedNumericalPredictionDriftMetricThreshold - = new NumericalPredictionDriftMetricThreshold(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("threshold".equals(fieldName)) { - deserializedNumericalPredictionDriftMetricThreshold - .withThreshold(MonitoringThreshold.fromJson(reader)); - } else if ("metric".equals(fieldName)) { - deserializedNumericalPredictionDriftMetricThreshold.metric - = NumericalPredictionDriftMetric.fromString(reader.getString()); - } else if ("dataType".equals(fieldName)) { - deserializedNumericalPredictionDriftMetricThreshold.dataType - = MonitoringFeatureDataType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNumericalPredictionDriftMetricThreshold; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OAuth2AuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OAuth2AuthTypeWorkspaceConnectionProperties.java deleted file mode 100644 index 3cf0c81e54c4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OAuth2AuthTypeWorkspaceConnectionProperties.java +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; - -/** - * The OAuth2AuthTypeWorkspaceConnectionProperties model. - */ -@Fluent -public final class OAuth2AuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /* - * Authentication type of the connection target - */ - private ConnectionAuthType authType = ConnectionAuthType.OAUTH2; - - /* - * ClientId and ClientSecret are required. Other properties are optional - * depending on each OAuth2 provider's implementation. - */ - private WorkspaceConnectionOAuth2 credentials; - - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - - /** - * Creates an instance of OAuth2AuthTypeWorkspaceConnectionProperties class. - */ - public OAuth2AuthTypeWorkspaceConnectionProperties() { - } - - /** - * Get the authType property: Authentication type of the connection target. - * - * @return the authType value. - */ - @Override - public ConnectionAuthType authType() { - return this.authType; - } - - /** - * Get the credentials property: ClientId and ClientSecret are required. Other properties are optional - * depending on each OAuth2 provider's implementation. - * - * @return the credentials value. - */ - public WorkspaceConnectionOAuth2 credentials() { - return this.credentials; - } - - /** - * Set the credentials property: ClientId and ClientSecret are required. Other properties are optional - * depending on each OAuth2 provider's implementation. - * - * @param credentials the credentials value to set. - * @return the OAuth2AuthTypeWorkspaceConnectionProperties object itself. - */ - public OAuth2AuthTypeWorkspaceConnectionProperties withCredentials(WorkspaceConnectionOAuth2 credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. - */ - @Override - public ConnectionGroup group() { - return this.group; - } - - /** - * {@inheritDoc} - */ - @Override - public OAuth2AuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OAuth2AuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OAuth2AuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OAuth2AuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OAuth2AuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OAuth2AuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { - super.withSharedUserList(sharedUserList); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OAuth2AuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OAuth2AuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", category() == null ? null : category().toString()); - jsonWriter.writeStringField("expiryTime", - expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); - jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); - jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("sharedUserList", sharedUserList(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeJsonField("credentials", this.credentials); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OAuth2AuthTypeWorkspaceConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OAuth2AuthTypeWorkspaceConnectionProperties if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OAuth2AuthTypeWorkspaceConnectionProperties. - */ - public static OAuth2AuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OAuth2AuthTypeWorkspaceConnectionProperties deserializedOAuth2AuthTypeWorkspaceConnectionProperties - = new OAuth2AuthTypeWorkspaceConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties - .withCategory(ConnectionCategory.fromString(reader.getString())); - } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); - } else if ("expiryTime".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withExpiryTime(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("group".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); - } else if ("isSharedToAll".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties - .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); - } else if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withMetadata(metadata); - } else if ("sharedUserList".equals(fieldName)) { - List sharedUserList = reader.readArray(reader1 -> reader1.getString()); - deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties.authType - = ConnectionAuthType.fromString(reader.getString()); - } else if ("credentials".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties.credentials - = WorkspaceConnectionOAuth2.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOAuth2AuthTypeWorkspaceConnectionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.java deleted file mode 100644 index 557f041b4d35..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Primary metrics for Image ObjectDetection task. - */ -public final class ObjectDetectionPrimaryMetrics extends ExpandableStringEnum { - /** - * Static value MeanAveragePrecision for ObjectDetectionPrimaryMetrics. - */ - public static final ObjectDetectionPrimaryMetrics MEAN_AVERAGE_PRECISION = fromString("MeanAveragePrecision"); - - /** - * Creates a new instance of ObjectDetectionPrimaryMetrics value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ObjectDetectionPrimaryMetrics() { - } - - /** - * Creates or finds a ObjectDetectionPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding ObjectDetectionPrimaryMetrics. - */ - public static ObjectDetectionPrimaryMetrics fromString(String name) { - return fromString(name, ObjectDetectionPrimaryMetrics.class); - } - - /** - * Gets known ObjectDetectionPrimaryMetrics values. - * - * @return known ObjectDetectionPrimaryMetrics values. - */ - public static Collection values() { - return values(ObjectDetectionPrimaryMetrics.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.java deleted file mode 100644 index 37c64b9ec66e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Optimization objective. - */ -@Fluent -public final class Objective implements JsonSerializable { - /* - * [Required] Name of the metric to optimize. - */ - private String primaryMetric; - - /* - * [Required] Defines supported metric goals for hyperparameter tuning - */ - private Goal goal; - - /** - * Creates an instance of Objective class. - */ - public Objective() { - } - - /** - * Get the primaryMetric property: [Required] Name of the metric to optimize. - * - * @return the primaryMetric value. - */ - public String primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: [Required] Name of the metric to optimize. - * - * @param primaryMetric the primaryMetric value to set. - * @return the Objective object itself. - */ - public Objective withPrimaryMetric(String primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - - /** - * Get the goal property: [Required] Defines supported metric goals for hyperparameter tuning. - * - * @return the goal value. - */ - public Goal goal() { - return this.goal; - } - - /** - * Set the goal property: [Required] Defines supported metric goals for hyperparameter tuning. - * - * @param goal the goal value to set. - * @return the Objective object itself. - */ - public Objective withGoal(Goal goal) { - this.goal = goal; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (primaryMetric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property primaryMetric in model Objective")); - } - if (goal() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property goal in model Objective")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Objective.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric); - jsonWriter.writeStringField("goal", this.goal == null ? null : this.goal.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Objective from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Objective if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the Objective. - */ - public static Objective fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Objective deserializedObjective = new Objective(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("primaryMetric".equals(fieldName)) { - deserializedObjective.primaryMetric = reader.getString(); - } else if ("goal".equals(fieldName)) { - deserializedObjective.goal = Goal.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedObjective; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifact.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifact.java deleted file mode 100644 index 6fcf7216d782..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifact.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * OneLake artifact (data source) configuration. - */ -@Fluent -public class OneLakeArtifact implements JsonSerializable { - /* - * [Required] OneLake artifact type - */ - private OneLakeArtifactType artifactType = OneLakeArtifactType.fromString("OneLakeArtifact"); - - /* - * [Required] OneLake artifact name - */ - private String artifactName; - - /** - * Creates an instance of OneLakeArtifact class. - */ - public OneLakeArtifact() { - } - - /** - * Get the artifactType property: [Required] OneLake artifact type. - * - * @return the artifactType value. - */ - public OneLakeArtifactType artifactType() { - return this.artifactType; - } - - /** - * Get the artifactName property: [Required] OneLake artifact name. - * - * @return the artifactName value. - */ - public String artifactName() { - return this.artifactName; - } - - /** - * Set the artifactName property: [Required] OneLake artifact name. - * - * @param artifactName the artifactName value to set. - * @return the OneLakeArtifact object itself. - */ - public OneLakeArtifact withArtifactName(String artifactName) { - this.artifactName = artifactName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (artifactName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property artifactName in model OneLakeArtifact")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OneLakeArtifact.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("artifactName", this.artifactName); - jsonWriter.writeStringField("artifactType", this.artifactType == null ? null : this.artifactType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OneLakeArtifact from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OneLakeArtifact if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OneLakeArtifact. - */ - public static OneLakeArtifact fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("artifactType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("LakeHouse".equals(discriminatorValue)) { - return LakeHouseArtifact.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static OneLakeArtifact fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OneLakeArtifact deserializedOneLakeArtifact = new OneLakeArtifact(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("artifactName".equals(fieldName)) { - deserializedOneLakeArtifact.artifactName = reader.getString(); - } else if ("artifactType".equals(fieldName)) { - deserializedOneLakeArtifact.artifactType = OneLakeArtifactType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedOneLakeArtifact; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifactType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifactType.java deleted file mode 100644 index 20461e8621f0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifactType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine OneLake artifact type. - */ -public final class OneLakeArtifactType extends ExpandableStringEnum { - /** - * Static value LakeHouse for OneLakeArtifactType. - */ - public static final OneLakeArtifactType LAKE_HOUSE = fromString("LakeHouse"); - - /** - * Creates a new instance of OneLakeArtifactType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OneLakeArtifactType() { - } - - /** - * Creates or finds a OneLakeArtifactType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OneLakeArtifactType. - */ - public static OneLakeArtifactType fromString(String name) { - return fromString(name, OneLakeArtifactType.class); - } - - /** - * Gets known OneLakeArtifactType values. - * - * @return known OneLakeArtifactType values. - */ - public static Collection values() { - return values(OneLakeArtifactType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeDatastore.java deleted file mode 100644 index 2a03ab3c93fa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeDatastore.java +++ /dev/null @@ -1,284 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * OneLake (Trident) datastore configuration. - */ -@Fluent -public final class OneLakeDatastore extends DatastoreProperties { - /* - * [Required] Storage type backing the datastore. - */ - private DatastoreType datastoreType = DatastoreType.ONE_LAKE; - - /* - * [Required] OneLake artifact backing the datastore. - */ - private OneLakeArtifact artifact; - - /* - * [Required] OneLake workspace name. - */ - private String oneLakeWorkspaceName; - - /* - * OneLake endpoint to use for the datastore. - */ - private String endpoint; - - /* - * Indicates which identity to use to authenticate service data access to customer's storage. - */ - private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; - - /* - * Readonly property to indicate if datastore is the workspace default datastore - */ - private Boolean isDefault; - - /** - * Creates an instance of OneLakeDatastore class. - */ - public OneLakeDatastore() { - } - - /** - * Get the datastoreType property: [Required] Storage type backing the datastore. - * - * @return the datastoreType value. - */ - @Override - public DatastoreType datastoreType() { - return this.datastoreType; - } - - /** - * Get the artifact property: [Required] OneLake artifact backing the datastore. - * - * @return the artifact value. - */ - public OneLakeArtifact artifact() { - return this.artifact; - } - - /** - * Set the artifact property: [Required] OneLake artifact backing the datastore. - * - * @param artifact the artifact value to set. - * @return the OneLakeDatastore object itself. - */ - public OneLakeDatastore withArtifact(OneLakeArtifact artifact) { - this.artifact = artifact; - return this; - } - - /** - * Get the oneLakeWorkspaceName property: [Required] OneLake workspace name. - * - * @return the oneLakeWorkspaceName value. - */ - public String oneLakeWorkspaceName() { - return this.oneLakeWorkspaceName; - } - - /** - * Set the oneLakeWorkspaceName property: [Required] OneLake workspace name. - * - * @param oneLakeWorkspaceName the oneLakeWorkspaceName value to set. - * @return the OneLakeDatastore object itself. - */ - public OneLakeDatastore withOneLakeWorkspaceName(String oneLakeWorkspaceName) { - this.oneLakeWorkspaceName = oneLakeWorkspaceName; - return this; - } - - /** - * Get the endpoint property: OneLake endpoint to use for the datastore. - * - * @return the endpoint value. - */ - public String endpoint() { - return this.endpoint; - } - - /** - * Set the endpoint property: OneLake endpoint to use for the datastore. - * - * @param endpoint the endpoint value to set. - * @return the OneLakeDatastore object itself. - */ - public OneLakeDatastore withEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * Get the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data - * access to customer's storage. - * - * @return the serviceDataAccessAuthIdentity value. - */ - public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { - return this.serviceDataAccessAuthIdentity; - } - - /** - * Set the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data - * access to customer's storage. - * - * @param serviceDataAccessAuthIdentity the serviceDataAccessAuthIdentity value to set. - * @return the OneLakeDatastore object itself. - */ - public OneLakeDatastore - withServiceDataAccessAuthIdentity(ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity) { - this.serviceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; - return this; - } - - /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. - * - * @return the isDefault value. - */ - @Override - public Boolean isDefault() { - return this.isDefault; - } - - /** - * {@inheritDoc} - */ - @Override - public OneLakeDatastore withCredentials(DatastoreCredentials credentials) { - super.withCredentials(credentials); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OneLakeDatastore withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OneLakeDatastore withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OneLakeDatastore withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (artifact() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property artifact in model OneLakeDatastore")); - } else { - artifact().validate(); - } - if (oneLakeWorkspaceName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property oneLakeWorkspaceName in model OneLakeDatastore")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OneLakeDatastore.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("credentials", credentials()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("artifact", this.artifact); - jsonWriter.writeStringField("oneLakeWorkspaceName", this.oneLakeWorkspaceName); - jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); - jsonWriter.writeStringField("endpoint", this.endpoint); - jsonWriter.writeStringField("serviceDataAccessAuthIdentity", - this.serviceDataAccessAuthIdentity == null ? null : this.serviceDataAccessAuthIdentity.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OneLakeDatastore from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OneLakeDatastore if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OneLakeDatastore. - */ - public static OneLakeDatastore fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OneLakeDatastore deserializedOneLakeDatastore = new OneLakeDatastore(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("credentials".equals(fieldName)) { - deserializedOneLakeDatastore.withCredentials(DatastoreCredentials.fromJson(reader)); - } else if ("description".equals(fieldName)) { - deserializedOneLakeDatastore.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedOneLakeDatastore.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedOneLakeDatastore.withProperties(properties); - } else if ("isDefault".equals(fieldName)) { - deserializedOneLakeDatastore.isDefault = reader.getNullable(JsonReader::getBoolean); - } else if ("artifact".equals(fieldName)) { - deserializedOneLakeDatastore.artifact = OneLakeArtifact.fromJson(reader); - } else if ("oneLakeWorkspaceName".equals(fieldName)) { - deserializedOneLakeDatastore.oneLakeWorkspaceName = reader.getString(); - } else if ("datastoreType".equals(fieldName)) { - deserializedOneLakeDatastore.datastoreType = DatastoreType.fromString(reader.getString()); - } else if ("endpoint".equals(fieldName)) { - deserializedOneLakeDatastore.endpoint = reader.getString(); - } else if ("serviceDataAccessAuthIdentity".equals(fieldName)) { - deserializedOneLakeDatastore.serviceDataAccessAuthIdentity - = ServiceDataAccessAuthIdentity.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedOneLakeDatastore; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java deleted file mode 100644 index b4f98e370386..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java +++ /dev/null @@ -1,357 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.OnlineDeploymentInner; -import java.util.Map; - -/** - * An immutable client-side representation of OnlineDeployment. - */ -public interface OnlineDeployment { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - OnlineDeploymentProperties properties(); - - /** - * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - String kind(); - - /** - * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - Sku sku(); - - /** - * 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.machinelearning.fluent.models.OnlineDeploymentInner object. - * - * @return the inner object. - */ - OnlineDeploymentInner innerModel(); - - /** - * The entirety of the OnlineDeployment definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The OnlineDeployment definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the OnlineDeployment definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the OnlineDeployment 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 OnlineDeployment definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, endpointName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @return the next definition stage. - */ - WithProperties withExistingOnlineEndpoint(String resourceGroupName, String workspaceName, - String endpointName); - } - - /** - * The stage of the OnlineDeployment definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(OnlineDeploymentProperties properties); - } - - /** - * The stage of the OnlineDeployment 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.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithSku { - /** - * Executes the create request. - * - * @return the created resource. - */ - OnlineDeployment create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - OnlineDeployment create(Context context); - } - - /** - * The stage of the OnlineDeployment 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 OnlineDeployment definition allowing to specify kind. - */ - interface WithKind { - /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. - * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. - * @return the next definition stage. - */ - WithCreate withKind(String kind); - } - - /** - * The stage of the OnlineDeployment definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the OnlineDeployment definition allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. - * - * @param sku Sku details required for ARM contract for Autoscaling. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - } - - /** - * Begins update for the OnlineDeployment resource. - * - * @return the stage of resource update. - */ - OnlineDeployment.Update update(); - - /** - * The template for OnlineDeployment update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithSku { - /** - * Executes the update request. - * - * @return the updated resource. - */ - OnlineDeployment apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - OnlineDeployment apply(Context context); - } - - /** - * The OnlineDeployment update stages. - */ - interface UpdateStages { - /** - * The stage of the OnlineDeployment 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 OnlineDeployment update allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. - * - * @param sku Sku details required for ARM contract for Autoscaling. - * @return the next definition stage. - */ - Update withSku(PartialSku sku); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - OnlineDeployment refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - OnlineDeployment refresh(Context context); - - /** - * Polls an Endpoint operation. - * - * @param body The request containing parameters for retrieving logs. - * @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 response body along with {@link Response}. - */ - Response getLogsWithResponse(DeploymentLogsRequest body, Context context); - - /** - * Polls an Endpoint operation. - * - * @param body The request containing parameters for retrieving logs. - * @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 response. - */ - DeploymentLogs getLogs(DeploymentLogsRequest body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java deleted file mode 100644 index e7618bb4711e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java +++ /dev/null @@ -1,517 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The OnlineDeploymentProperties model. - */ -@Fluent -public class OnlineDeploymentProperties extends EndpointDeploymentPropertiesBase { - /* - * [Required] The compute type of the endpoint. - */ - private EndpointComputeType endpointComputeType = EndpointComputeType.fromString("OnlineDeploymentProperties"); - - /* - * Scale settings for the deployment. - * If it is null or not provided, - * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment - * and to DefaultScaleSettings for ManagedOnlineDeployment. - */ - private OnlineScaleSettings scaleSettings; - - /* - * Request settings for the deployment. - */ - private OnlineRequestSettings requestSettings; - - /* - * The path to mount the model in custom container. - */ - private String modelMountPath; - - /* - * If true, enables Application Insights logging. - */ - private Boolean appInsightsEnabled; - - /* - * Liveness probe monitors the health of the container regularly. - */ - private ProbeSettings livenessProbe; - - /* - * Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as - * liveness probe. - */ - private ProbeSettings readinessProbe; - - /* - * Provisioning state for the endpoint deployment. - */ - private DeploymentProvisioningState provisioningState; - - /* - * Compute instance type. - */ - private String instanceType; - - /* - * The URI path to the model. - */ - private String model; - - /* - * If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. - */ - private EgressPublicNetworkAccessType egressPublicNetworkAccess; - - /* - * The mdc configuration, we disable mdc when it's null. - */ - private DataCollector dataCollector; - - /** - * Creates an instance of OnlineDeploymentProperties class. - */ - public OnlineDeploymentProperties() { - } - - /** - * Get the endpointComputeType property: [Required] The compute type of the endpoint. - * - * @return the endpointComputeType value. - */ - public EndpointComputeType endpointComputeType() { - return this.endpointComputeType; - } - - /** - * Get the scaleSettings property: Scale settings for the deployment. - * If it is null or not provided, - * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment - * and to DefaultScaleSettings for ManagedOnlineDeployment. - * - * @return the scaleSettings value. - */ - public OnlineScaleSettings scaleSettings() { - return this.scaleSettings; - } - - /** - * Set the scaleSettings property: Scale settings for the deployment. - * If it is null or not provided, - * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment - * and to DefaultScaleSettings for ManagedOnlineDeployment. - * - * @param scaleSettings the scaleSettings value to set. - * @return the OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties withScaleSettings(OnlineScaleSettings scaleSettings) { - this.scaleSettings = scaleSettings; - return this; - } - - /** - * Get the requestSettings property: Request settings for the deployment. - * - * @return the requestSettings value. - */ - public OnlineRequestSettings requestSettings() { - return this.requestSettings; - } - - /** - * Set the requestSettings property: Request settings for the deployment. - * - * @param requestSettings the requestSettings value to set. - * @return the OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties withRequestSettings(OnlineRequestSettings requestSettings) { - this.requestSettings = requestSettings; - return this; - } - - /** - * Get the modelMountPath property: The path to mount the model in custom container. - * - * @return the modelMountPath value. - */ - public String modelMountPath() { - return this.modelMountPath; - } - - /** - * Set the modelMountPath property: The path to mount the model in custom container. - * - * @param modelMountPath the modelMountPath value to set. - * @return the OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties withModelMountPath(String modelMountPath) { - this.modelMountPath = modelMountPath; - return this; - } - - /** - * Get the appInsightsEnabled property: If true, enables Application Insights logging. - * - * @return the appInsightsEnabled value. - */ - public Boolean appInsightsEnabled() { - return this.appInsightsEnabled; - } - - /** - * Set the appInsightsEnabled property: If true, enables Application Insights logging. - * - * @param appInsightsEnabled the appInsightsEnabled value to set. - * @return the OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties withAppInsightsEnabled(Boolean appInsightsEnabled) { - this.appInsightsEnabled = appInsightsEnabled; - return this; - } - - /** - * Get the livenessProbe property: Liveness probe monitors the health of the container regularly. - * - * @return the livenessProbe value. - */ - public ProbeSettings livenessProbe() { - return this.livenessProbe; - } - - /** - * Set the livenessProbe property: Liveness probe monitors the health of the container regularly. - * - * @param livenessProbe the livenessProbe value to set. - * @return the OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties withLivenessProbe(ProbeSettings livenessProbe) { - this.livenessProbe = livenessProbe; - return this; - } - - /** - * Get the readinessProbe property: Readiness probe validates if the container is ready to serve traffic. The - * properties and defaults are the same as liveness probe. - * - * @return the readinessProbe value. - */ - public ProbeSettings readinessProbe() { - return this.readinessProbe; - } - - /** - * Set the readinessProbe property: Readiness probe validates if the container is ready to serve traffic. The - * properties and defaults are the same as liveness probe. - * - * @param readinessProbe the readinessProbe value to set. - * @return the OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties withReadinessProbe(ProbeSettings readinessProbe) { - this.readinessProbe = readinessProbe; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the endpoint deployment. - * - * @return the provisioningState value. - */ - public DeploymentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: Provisioning state for the endpoint deployment. - * - * @param provisioningState the provisioningState value to set. - * @return the OnlineDeploymentProperties object itself. - */ - OnlineDeploymentProperties withProvisioningState(DeploymentProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the instanceType property: Compute instance type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Set the instanceType property: Compute instance type. - * - * @param instanceType the instanceType value to set. - * @return the OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties withInstanceType(String instanceType) { - this.instanceType = instanceType; - return this; - } - - /** - * Get the model property: The URI path to the model. - * - * @return the model value. - */ - public String model() { - return this.model; - } - - /** - * Set the model property: The URI path to the model. - * - * @param model the model value to set. - * @return the OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties withModel(String model) { - this.model = model; - return this; - } - - /** - * Get the egressPublicNetworkAccess property: If Enabled, allow egress public network access. If Disabled, this - * will create secure egress. Default: Enabled. - * - * @return the egressPublicNetworkAccess value. - */ - public EgressPublicNetworkAccessType egressPublicNetworkAccess() { - return this.egressPublicNetworkAccess; - } - - /** - * Set the egressPublicNetworkAccess property: If Enabled, allow egress public network access. If Disabled, this - * will create secure egress. Default: Enabled. - * - * @param egressPublicNetworkAccess the egressPublicNetworkAccess value to set. - * @return the OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties - withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { - this.egressPublicNetworkAccess = egressPublicNetworkAccess; - return this; - } - - /** - * Get the dataCollector property: The mdc configuration, we disable mdc when it's null. - * - * @return the dataCollector value. - */ - public DataCollector dataCollector() { - return this.dataCollector; - } - - /** - * Set the dataCollector property: The mdc configuration, we disable mdc when it's null. - * - * @param dataCollector the dataCollector value to set. - * @return the OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties withDataCollector(DataCollector dataCollector) { - this.dataCollector = dataCollector; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OnlineDeploymentProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OnlineDeploymentProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OnlineDeploymentProperties withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OnlineDeploymentProperties withEnvironmentId(String environmentId) { - super.withEnvironmentId(environmentId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OnlineDeploymentProperties withEnvironmentVariables(Map environmentVariables) { - super.withEnvironmentVariables(environmentVariables); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (scaleSettings() != null) { - scaleSettings().validate(); - } - if (requestSettings() != null) { - requestSettings().validate(); - } - if (livenessProbe() != null) { - livenessProbe().validate(); - } - if (readinessProbe() != null) { - readinessProbe().validate(); - } - if (dataCollector() != null) { - dataCollector().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("codeConfiguration", codeConfiguration()); - jsonWriter.writeStringField("environmentId", environmentId()); - jsonWriter.writeMapField("environmentVariables", environmentVariables(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("endpointComputeType", - this.endpointComputeType == null ? null : this.endpointComputeType.toString()); - jsonWriter.writeJsonField("scaleSettings", this.scaleSettings); - jsonWriter.writeJsonField("requestSettings", this.requestSettings); - jsonWriter.writeStringField("modelMountPath", this.modelMountPath); - jsonWriter.writeBooleanField("appInsightsEnabled", this.appInsightsEnabled); - jsonWriter.writeJsonField("livenessProbe", this.livenessProbe); - jsonWriter.writeJsonField("readinessProbe", this.readinessProbe); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("model", this.model); - jsonWriter.writeStringField("egressPublicNetworkAccess", - this.egressPublicNetworkAccess == null ? null : this.egressPublicNetworkAccess.toString()); - jsonWriter.writeJsonField("dataCollector", this.dataCollector); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OnlineDeploymentProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OnlineDeploymentProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OnlineDeploymentProperties. - */ - public static OnlineDeploymentProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("endpointComputeType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Kubernetes".equals(discriminatorValue)) { - return KubernetesOnlineDeployment.fromJson(readerToUse.reset()); - } else if ("Managed".equals(discriminatorValue)) { - return ManagedOnlineDeployment.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static OnlineDeploymentProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OnlineDeploymentProperties deserializedOnlineDeploymentProperties = new OnlineDeploymentProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedOnlineDeploymentProperties.withDescription(reader.getString()); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedOnlineDeploymentProperties.withProperties(properties); - } else if ("codeConfiguration".equals(fieldName)) { - deserializedOnlineDeploymentProperties.withCodeConfiguration(CodeConfiguration.fromJson(reader)); - } else if ("environmentId".equals(fieldName)) { - deserializedOnlineDeploymentProperties.withEnvironmentId(reader.getString()); - } else if ("environmentVariables".equals(fieldName)) { - Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); - deserializedOnlineDeploymentProperties.withEnvironmentVariables(environmentVariables); - } else if ("endpointComputeType".equals(fieldName)) { - deserializedOnlineDeploymentProperties.endpointComputeType - = EndpointComputeType.fromString(reader.getString()); - } else if ("scaleSettings".equals(fieldName)) { - deserializedOnlineDeploymentProperties.scaleSettings = OnlineScaleSettings.fromJson(reader); - } else if ("requestSettings".equals(fieldName)) { - deserializedOnlineDeploymentProperties.requestSettings = OnlineRequestSettings.fromJson(reader); - } else if ("modelMountPath".equals(fieldName)) { - deserializedOnlineDeploymentProperties.modelMountPath = reader.getString(); - } else if ("appInsightsEnabled".equals(fieldName)) { - deserializedOnlineDeploymentProperties.appInsightsEnabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("livenessProbe".equals(fieldName)) { - deserializedOnlineDeploymentProperties.livenessProbe = ProbeSettings.fromJson(reader); - } else if ("readinessProbe".equals(fieldName)) { - deserializedOnlineDeploymentProperties.readinessProbe = ProbeSettings.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedOnlineDeploymentProperties.provisioningState - = DeploymentProvisioningState.fromString(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedOnlineDeploymentProperties.instanceType = reader.getString(); - } else if ("model".equals(fieldName)) { - deserializedOnlineDeploymentProperties.model = reader.getString(); - } else if ("egressPublicNetworkAccess".equals(fieldName)) { - deserializedOnlineDeploymentProperties.egressPublicNetworkAccess - = EgressPublicNetworkAccessType.fromString(reader.getString()); - } else if ("dataCollector".equals(fieldName)) { - deserializedOnlineDeploymentProperties.dataCollector = DataCollector.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOnlineDeploymentProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java deleted file mode 100644 index 448b6864545c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentTrackedResourceArmPaginatedResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of OnlineDeployment entities. - */ -@Fluent -public final class OnlineDeploymentTrackedResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type OnlineDeployment. - */ - private List value; - - /* - * The link to the next page of OnlineDeployment objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of OnlineDeploymentTrackedResourceArmPaginatedResult class. - */ - public OnlineDeploymentTrackedResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type OnlineDeployment. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type OnlineDeployment. - * - * @param value the value value to set. - * @return the OnlineDeploymentTrackedResourceArmPaginatedResult object itself. - */ - public OnlineDeploymentTrackedResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of OnlineDeployment objects. If null, there are no - * additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of OnlineDeployment objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the OnlineDeploymentTrackedResourceArmPaginatedResult object itself. - */ - public OnlineDeploymentTrackedResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OnlineDeploymentTrackedResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OnlineDeploymentTrackedResourceArmPaginatedResult if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OnlineDeploymentTrackedResourceArmPaginatedResult. - */ - public static OnlineDeploymentTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OnlineDeploymentTrackedResourceArmPaginatedResult deserializedOnlineDeploymentTrackedResourceArmPaginatedResult - = new OnlineDeploymentTrackedResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> OnlineDeploymentInner.fromJson(reader1)); - deserializedOnlineDeploymentTrackedResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOnlineDeploymentTrackedResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOnlineDeploymentTrackedResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployments.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployments.java deleted file mode 100644 index 99cbd345a1aa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployments.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.machinelearning.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 OnlineDeployments. - */ -public interface OnlineDeployments { - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @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 a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @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 a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, - String orderBy, Integer top, String skip, Context context); - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - Context context); - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @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 inference Deployment Deployment along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Context context); - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @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 inference Deployment Deployment. - */ - OnlineDeployment get(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @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 response body along with {@link Response}. - */ - Response getLogsWithResponse(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, DeploymentLogsRequest body, Context context); - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @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 response. - */ - DeploymentLogs getLogs(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - DeploymentLogsRequest body); - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @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 a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. - */ - PagedIterable listSkus(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName); - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param count Number of Skus to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @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 a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. - */ - PagedIterable listSkus(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Integer count, String skip, Context context); - - /** - * Get Inference Deployment Deployment. - * - * @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 inference Deployment Deployment along with {@link Response}. - */ - OnlineDeployment getById(String id); - - /** - * Get Inference Deployment Deployment. - * - * @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 inference Deployment Deployment along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @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. - */ - void deleteById(String id); - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new OnlineDeployment resource. - * - * @param name resource name. - * @return the first stage of the new OnlineDeployment definition. - */ - OnlineDeployment.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java deleted file mode 100644 index 06aeb02546a0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java +++ /dev/null @@ -1,394 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.OnlineEndpointInner; -import java.util.Map; - -/** - * An immutable client-side representation of OnlineEndpoint. - */ -public interface OnlineEndpoint { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - OnlineEndpointProperties properties(); - - /** - * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - String kind(); - - /** - * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - Sku sku(); - - /** - * 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.machinelearning.fluent.models.OnlineEndpointInner object. - * - * @return the inner object. - */ - OnlineEndpointInner innerModel(); - - /** - * The entirety of the OnlineEndpoint definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The OnlineEndpoint definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the OnlineEndpoint definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the OnlineEndpoint 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 OnlineEndpoint definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the OnlineEndpoint definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(OnlineEndpointProperties properties); - } - - /** - * The stage of the OnlineEndpoint 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.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithSku { - /** - * Executes the create request. - * - * @return the created resource. - */ - OnlineEndpoint create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - OnlineEndpoint create(Context context); - } - - /** - * The stage of the OnlineEndpoint 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 OnlineEndpoint definition allowing to specify kind. - */ - interface WithKind { - /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. - * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. - * @return the next definition stage. - */ - WithCreate withKind(String kind); - } - - /** - * The stage of the OnlineEndpoint definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the OnlineEndpoint definition allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. - * - * @param sku Sku details required for ARM contract for Autoscaling. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - } - - /** - * Begins update for the OnlineEndpoint resource. - * - * @return the stage of resource update. - */ - OnlineEndpoint.Update update(); - - /** - * The template for OnlineEndpoint update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { - /** - * Executes the update request. - * - * @return the updated resource. - */ - OnlineEndpoint apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - OnlineEndpoint apply(Context context); - } - - /** - * The OnlineEndpoint update stages. - */ - interface UpdateStages { - /** - * The stage of the OnlineEndpoint 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 OnlineEndpoint update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - Update withIdentity(PartialManagedServiceIdentity identity); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - OnlineEndpoint refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - OnlineEndpoint refresh(Context context); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @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 keys for endpoint authentication along with {@link Response}. - */ - Response listKeysWithResponse(Context context); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @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 keys for endpoint authentication. - */ - EndpointAuthKeys listKeys(); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void regenerateKeys(RegenerateEndpointKeysRequest body); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void regenerateKeys(RegenerateEndpointKeysRequest body, Context context); - - /** - * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. - * - * @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 service Token along with {@link Response}. - */ - Response getTokenWithResponse(Context context); - - /** - * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. - * - * @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 service Token. - */ - EndpointAuthToken getToken(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java deleted file mode 100644 index 48209bb0a73f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointPropertiesBaseInner; -import java.io.IOException; -import java.util.Map; - -/** - * Online endpoint configuration. - */ -@Fluent -public final class OnlineEndpointProperties extends EndpointPropertiesBaseInner { - /* - * Provisioning state for the endpoint. - */ - private EndpointProvisioningState provisioningState; - - /* - * ARM resource ID of the compute if it exists. - * optional - */ - private String compute; - - /* - * Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. - */ - private PublicNetworkAccessType publicNetworkAccess; - - /* - * Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. - */ - private Map traffic; - - /* - * Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to - * sum to utmost 50. - */ - private Map mirrorTraffic; - - /* - * Endpoint URI. - */ - private String scoringUri; - - /* - * Endpoint Swagger URI. - */ - private String swaggerUri; - - /** - * Creates an instance of OnlineEndpointProperties class. - */ - public OnlineEndpointProperties() { - } - - /** - * Get the provisioningState property: Provisioning state for the endpoint. - * - * @return the provisioningState value. - */ - public EndpointProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the compute property: ARM resource ID of the compute if it exists. - * optional. - * - * @return the compute value. - */ - public String compute() { - return this.compute; - } - - /** - * Set the compute property: ARM resource ID of the compute if it exists. - * optional. - * - * @param compute the compute value to set. - * @return the OnlineEndpointProperties object itself. - */ - public OnlineEndpointProperties withCompute(String compute) { - this.compute = compute; - return this; - } - - /** - * Get the publicNetworkAccess property: Set to "Enabled" for endpoints that should allow public access when Private - * Link is enabled. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccessType publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Set to "Enabled" for endpoints that should allow public access when Private - * Link is enabled. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the OnlineEndpointProperties object itself. - */ - public OnlineEndpointProperties withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Get the traffic property: Percentage of traffic from endpoint to divert to each deployment. Traffic values need - * to sum to 100. - * - * @return the traffic value. - */ - public Map traffic() { - return this.traffic; - } - - /** - * Set the traffic property: Percentage of traffic from endpoint to divert to each deployment. Traffic values need - * to sum to 100. - * - * @param traffic the traffic value to set. - * @return the OnlineEndpointProperties object itself. - */ - public OnlineEndpointProperties withTraffic(Map traffic) { - this.traffic = traffic; - return this; - } - - /** - * Get the mirrorTraffic property: Percentage of traffic to be mirrored to each deployment without using returned - * scoring. Traffic values need to sum to utmost 50. - * - * @return the mirrorTraffic value. - */ - public Map mirrorTraffic() { - return this.mirrorTraffic; - } - - /** - * Set the mirrorTraffic property: Percentage of traffic to be mirrored to each deployment without using returned - * scoring. Traffic values need to sum to utmost 50. - * - * @param mirrorTraffic the mirrorTraffic value to set. - * @return the OnlineEndpointProperties object itself. - */ - public OnlineEndpointProperties withMirrorTraffic(Map mirrorTraffic) { - this.mirrorTraffic = mirrorTraffic; - return this; - } - - /** - * Get the scoringUri property: Endpoint URI. - * - * @return the scoringUri value. - */ - @Override - public String scoringUri() { - return this.scoringUri; - } - - /** - * Get the swaggerUri property: Endpoint Swagger URI. - * - * @return the swaggerUri value. - */ - @Override - public String swaggerUri() { - return this.swaggerUri; - } - - /** - * {@inheritDoc} - */ - @Override - public OnlineEndpointProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OnlineEndpointProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OnlineEndpointProperties withAuthMode(EndpointAuthMode authMode) { - super.withAuthMode(authMode); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OnlineEndpointProperties withKeys(EndpointAuthKeysInner keys) { - super.withKeys(keys); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authMode", authMode() == null ? null : authMode().toString()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("keys", keys()); - jsonWriter.writeStringField("compute", this.compute); - jsonWriter.writeStringField("publicNetworkAccess", - this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); - jsonWriter.writeMapField("traffic", this.traffic, (writer, element) -> writer.writeInt(element)); - jsonWriter.writeMapField("mirrorTraffic", this.mirrorTraffic, (writer, element) -> writer.writeInt(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OnlineEndpointProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OnlineEndpointProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OnlineEndpointProperties. - */ - public static OnlineEndpointProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OnlineEndpointProperties deserializedOnlineEndpointProperties = new OnlineEndpointProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("authMode".equals(fieldName)) { - deserializedOnlineEndpointProperties.withAuthMode(EndpointAuthMode.fromString(reader.getString())); - } else if ("description".equals(fieldName)) { - deserializedOnlineEndpointProperties.withDescription(reader.getString()); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedOnlineEndpointProperties.withProperties(properties); - } else if ("scoringUri".equals(fieldName)) { - deserializedOnlineEndpointProperties.scoringUri = reader.getString(); - } else if ("swaggerUri".equals(fieldName)) { - deserializedOnlineEndpointProperties.swaggerUri = reader.getString(); - } else if ("keys".equals(fieldName)) { - deserializedOnlineEndpointProperties.withKeys(EndpointAuthKeysInner.fromJson(reader)); - } else if ("provisioningState".equals(fieldName)) { - deserializedOnlineEndpointProperties.provisioningState - = EndpointProvisioningState.fromString(reader.getString()); - } else if ("compute".equals(fieldName)) { - deserializedOnlineEndpointProperties.compute = reader.getString(); - } else if ("publicNetworkAccess".equals(fieldName)) { - deserializedOnlineEndpointProperties.publicNetworkAccess - = PublicNetworkAccessType.fromString(reader.getString()); - } else if ("traffic".equals(fieldName)) { - Map traffic = reader.readMap(reader1 -> reader1.getInt()); - deserializedOnlineEndpointProperties.traffic = traffic; - } else if ("mirrorTraffic".equals(fieldName)) { - Map mirrorTraffic = reader.readMap(reader1 -> reader1.getInt()); - deserializedOnlineEndpointProperties.mirrorTraffic = mirrorTraffic; - } else { - reader.skipChildren(); - } - } - - return deserializedOnlineEndpointProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointTrackedResourceArmPaginatedResult.java deleted file mode 100644 index 115ff52045f9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointTrackedResourceArmPaginatedResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of OnlineEndpoint entities. - */ -@Fluent -public final class OnlineEndpointTrackedResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type OnlineEndpoint. - */ - private List value; - - /* - * The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of OnlineEndpointTrackedResourceArmPaginatedResult class. - */ - public OnlineEndpointTrackedResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type OnlineEndpoint. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type OnlineEndpoint. - * - * @param value the value value to set. - * @return the OnlineEndpointTrackedResourceArmPaginatedResult object itself. - */ - public OnlineEndpointTrackedResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of OnlineEndpoint objects. If null, there are no additional - * pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of OnlineEndpoint objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the OnlineEndpointTrackedResourceArmPaginatedResult object itself. - */ - public OnlineEndpointTrackedResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OnlineEndpointTrackedResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OnlineEndpointTrackedResourceArmPaginatedResult if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OnlineEndpointTrackedResourceArmPaginatedResult. - */ - public static OnlineEndpointTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OnlineEndpointTrackedResourceArmPaginatedResult deserializedOnlineEndpointTrackedResourceArmPaginatedResult - = new OnlineEndpointTrackedResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> OnlineEndpointInner.fromJson(reader1)); - deserializedOnlineEndpointTrackedResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOnlineEndpointTrackedResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOnlineEndpointTrackedResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoints.java deleted file mode 100644 index 43ae90a86193..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoints.java +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 OnlineEndpoints. - */ -public interface OnlineEndpoints { - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @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 a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String name, Integer count, - EndpointComputeType computeType, String skip, String tags, String properties, OrderString orderBy, - Context context); - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String endpointName, Context context); - - /** - * Get Online Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 online Endpoint along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - Context context); - - /** - * Get Online Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 online Endpoint. - */ - OnlineEndpoint get(String resourceGroupName, String workspaceName, String endpointName); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 keys for endpoint authentication along with {@link Response}. - */ - Response listKeysWithResponse(String resourceGroupName, String workspaceName, String endpointName, - Context context); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 keys for endpoint authentication. - */ - EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, - RegenerateEndpointKeysRequest body); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, - RegenerateEndpointKeysRequest body, Context context); - - /** - * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 service Token along with {@link Response}. - */ - Response getTokenWithResponse(String resourceGroupName, String workspaceName, - String endpointName, Context context); - - /** - * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @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 service Token. - */ - EndpointAuthToken getToken(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Get Online Endpoint. - * - * @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 online Endpoint along with {@link Response}. - */ - OnlineEndpoint getById(String id); - - /** - * Get Online Endpoint. - * - * @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 online Endpoint along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete Online Endpoint (asynchronous). - * - * @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. - */ - void deleteById(String id); - - /** - * Delete Online Endpoint (asynchronous). - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new OnlineEndpoint resource. - * - * @param name resource name. - * @return the first stage of the new OnlineEndpoint definition. - */ - OnlineEndpoint.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.java deleted file mode 100644 index 050ae5e1e7c2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; - -/** - * Online deployment scoring requests configuration. - */ -@Fluent -public final class OnlineRequestSettings implements JsonSerializable { - /* - * (Deprecated for Managed Online Endpoints) The maximum amount of time a request will stay in the queue in ISO 8601 - * format. - * Defaults to 500ms. - * (Now increase `request_timeout_ms` to account for any networking/queue delays) - */ - private Duration maxQueueWait; - - /* - * The scoring timeout in ISO 8601 format. - * Defaults to 5000ms. - */ - private Duration requestTimeout; - - /* - * The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. - */ - private Integer maxConcurrentRequestsPerInstance; - - /** - * Creates an instance of OnlineRequestSettings class. - */ - public OnlineRequestSettings() { - } - - /** - * Get the maxQueueWait property: (Deprecated for Managed Online Endpoints) The maximum amount of time a request - * will stay in the queue in ISO 8601 format. - * Defaults to 500ms. - * (Now increase `request_timeout_ms` to account for any networking/queue delays). - * - * @return the maxQueueWait value. - */ - public Duration maxQueueWait() { - return this.maxQueueWait; - } - - /** - * Set the maxQueueWait property: (Deprecated for Managed Online Endpoints) The maximum amount of time a request - * will stay in the queue in ISO 8601 format. - * Defaults to 500ms. - * (Now increase `request_timeout_ms` to account for any networking/queue delays). - * - * @param maxQueueWait the maxQueueWait value to set. - * @return the OnlineRequestSettings object itself. - */ - public OnlineRequestSettings withMaxQueueWait(Duration maxQueueWait) { - this.maxQueueWait = maxQueueWait; - return this; - } - - /** - * Get the requestTimeout property: The scoring timeout in ISO 8601 format. - * Defaults to 5000ms. - * - * @return the requestTimeout value. - */ - public Duration requestTimeout() { - return this.requestTimeout; - } - - /** - * Set the requestTimeout property: The scoring timeout in ISO 8601 format. - * Defaults to 5000ms. - * - * @param requestTimeout the requestTimeout value to set. - * @return the OnlineRequestSettings object itself. - */ - public OnlineRequestSettings withRequestTimeout(Duration requestTimeout) { - this.requestTimeout = requestTimeout; - return this; - } - - /** - * Get the maxConcurrentRequestsPerInstance property: The number of maximum concurrent requests per node allowed per - * deployment. Defaults to 1. - * - * @return the maxConcurrentRequestsPerInstance value. - */ - public Integer maxConcurrentRequestsPerInstance() { - return this.maxConcurrentRequestsPerInstance; - } - - /** - * Set the maxConcurrentRequestsPerInstance property: The number of maximum concurrent requests per node allowed per - * deployment. Defaults to 1. - * - * @param maxConcurrentRequestsPerInstance the maxConcurrentRequestsPerInstance value to set. - * @return the OnlineRequestSettings object itself. - */ - public OnlineRequestSettings withMaxConcurrentRequestsPerInstance(Integer maxConcurrentRequestsPerInstance) { - this.maxConcurrentRequestsPerInstance = maxConcurrentRequestsPerInstance; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("maxQueueWait", CoreUtils.durationToStringWithDays(this.maxQueueWait)); - jsonWriter.writeStringField("requestTimeout", CoreUtils.durationToStringWithDays(this.requestTimeout)); - jsonWriter.writeNumberField("maxConcurrentRequestsPerInstance", this.maxConcurrentRequestsPerInstance); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OnlineRequestSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OnlineRequestSettings if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the OnlineRequestSettings. - */ - public static OnlineRequestSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OnlineRequestSettings deserializedOnlineRequestSettings = new OnlineRequestSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxQueueWait".equals(fieldName)) { - deserializedOnlineRequestSettings.maxQueueWait - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("requestTimeout".equals(fieldName)) { - deserializedOnlineRequestSettings.requestTimeout - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("maxConcurrentRequestsPerInstance".equals(fieldName)) { - deserializedOnlineRequestSettings.maxConcurrentRequestsPerInstance - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedOnlineRequestSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.java deleted file mode 100644 index 59fe3ca0ddeb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Online deployment scaling configuration. - */ -@Immutable -public class OnlineScaleSettings implements JsonSerializable { - /* - * [Required] Type of deployment scaling algorithm - */ - private ScaleType scaleType = ScaleType.fromString("OnlineScaleSettings"); - - /** - * Creates an instance of OnlineScaleSettings class. - */ - public OnlineScaleSettings() { - } - - /** - * Get the scaleType property: [Required] Type of deployment scaling algorithm. - * - * @return the scaleType value. - */ - public ScaleType scaleType() { - return this.scaleType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("scaleType", this.scaleType == null ? null : this.scaleType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OnlineScaleSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OnlineScaleSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OnlineScaleSettings. - */ - public static OnlineScaleSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("scaleType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Default".equals(discriminatorValue)) { - return DefaultScaleSettings.fromJson(readerToUse.reset()); - } else if ("TargetUtilization".equals(discriminatorValue)) { - return TargetUtilizationScaleSettings.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static OnlineScaleSettings fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OnlineScaleSettings deserializedOnlineScaleSettings = new OnlineScaleSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scaleType".equals(fieldName)) { - deserializedOnlineScaleSettings.scaleType = ScaleType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedOnlineScaleSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.java deleted file mode 100644 index 9d7e4d92a45b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of operating system. - */ -public final class OperatingSystemType extends ExpandableStringEnum { - /** - * Static value Linux for OperatingSystemType. - */ - public static final OperatingSystemType LINUX = fromString("Linux"); - - /** - * Static value Windows for OperatingSystemType. - */ - public static final OperatingSystemType WINDOWS = fromString("Windows"); - - /** - * Creates a new instance of OperatingSystemType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OperatingSystemType() { - } - - /** - * Creates or finds a OperatingSystemType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OperatingSystemType. - */ - public static OperatingSystemType fromString(String name) { - return fromString(name, OperatingSystemType.class); - } - - /** - * Gets known OperatingSystemType values. - * - * @return known OperatingSystemType values. - */ - public static Collection values() { - return values(OperatingSystemType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operation.java deleted file mode 100644 index adf592c09634..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operation.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.OperationInner; - -/** - * An immutable client-side representation of Operation. - */ -public interface Operation { - /** - * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - String name(); - - /** - * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - Origin origin(); - - /** - * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. - * - * @return the actionType value. - */ - ActionType actionType(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.OperationInner object. - * - * @return the inner object. - */ - OperationInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationDisplay.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationDisplay.java deleted file mode 100644 index b5cf5cbe0e0f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationDisplay.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Localized display information for this particular operation. - */ -@Immutable -public final class OperationDisplay implements JsonSerializable { - /* - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or - * "Microsoft Compute". - */ - private String provider; - - /* - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or - * "Job Schedule Collections". - */ - private String resource; - - /* - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - */ - private String operation; - - /* - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. - */ - private String description; - - /** - * Creates an instance of OperationDisplay class. - */ - public OperationDisplay() { - } - - /** - * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring - * Insights" or "Microsoft Compute". - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. - * "Virtual Machines" or "Job Schedule Collections". - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Get the description property: The short, localized friendly description of the operation; suitable for tool tips - * and detailed views. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationDisplay from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationDisplay. - */ - public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationDisplay deserializedOperationDisplay = new OperationDisplay(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provider".equals(fieldName)) { - deserializedOperationDisplay.provider = reader.getString(); - } else if ("resource".equals(fieldName)) { - deserializedOperationDisplay.resource = reader.getString(); - } else if ("operation".equals(fieldName)) { - deserializedOperationDisplay.operation = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedOperationDisplay.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationDisplay; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationListResult.java deleted file mode 100644 index 8e69909cfe76..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationListResult.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.OperationInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - * results. - */ -@Immutable -public final class OperationListResult implements JsonSerializable { - /* - * List of operations supported by the resource provider - */ - private List value; - - /* - * URL to get the next set of operation list results (if there are any). - */ - private String nextLink; - - /** - * Creates an instance of OperationListResult class. - */ - public OperationListResult() { - } - - /** - * Get the value property: List of operations supported by the resource provider. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next set of operation list results (if there are any). - * - * @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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationListResult. - */ - public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationListResult deserializedOperationListResult = new OperationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); - deserializedOperationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOperationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationListResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationName.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationName.java deleted file mode 100644 index 94745214e55d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationName.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Name of the last operation. - */ -public final class OperationName extends ExpandableStringEnum { - /** - * Static value Create for OperationName. - */ - public static final OperationName CREATE = fromString("Create"); - - /** - * Static value Start for OperationName. - */ - public static final OperationName START = fromString("Start"); - - /** - * Static value Stop for OperationName. - */ - public static final OperationName STOP = fromString("Stop"); - - /** - * Static value Restart for OperationName. - */ - public static final OperationName RESTART = fromString("Restart"); - - /** - * Static value Reimage for OperationName. - */ - public static final OperationName REIMAGE = fromString("Reimage"); - - /** - * Static value Delete for OperationName. - */ - public static final OperationName DELETE = fromString("Delete"); - - /** - * Creates a new instance of OperationName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OperationName() { - } - - /** - * Creates or finds a OperationName from its string representation. - * - * @param name a name to look for. - * @return the corresponding OperationName. - */ - public static OperationName fromString(String name) { - return fromString(name, OperationName.class); - } - - /** - * Gets known OperationName values. - * - * @return known OperationName values. - */ - public static Collection values() { - return values(OperationName.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.java deleted file mode 100644 index a5196eb5cb80..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Operation status. - */ -public final class OperationStatus extends ExpandableStringEnum { - /** - * Static value InProgress for OperationStatus. - */ - public static final OperationStatus IN_PROGRESS = fromString("InProgress"); - - /** - * Static value Succeeded for OperationStatus. - */ - public static final OperationStatus SUCCEEDED = fromString("Succeeded"); - - /** - * Static value CreateFailed for OperationStatus. - */ - public static final OperationStatus CREATE_FAILED = fromString("CreateFailed"); - - /** - * Static value StartFailed for OperationStatus. - */ - public static final OperationStatus START_FAILED = fromString("StartFailed"); - - /** - * Static value StopFailed for OperationStatus. - */ - public static final OperationStatus STOP_FAILED = fromString("StopFailed"); - - /** - * Static value RestartFailed for OperationStatus. - */ - public static final OperationStatus RESTART_FAILED = fromString("RestartFailed"); - - /** - * Static value ReimageFailed for OperationStatus. - */ - public static final OperationStatus REIMAGE_FAILED = fromString("ReimageFailed"); - - /** - * Static value DeleteFailed for OperationStatus. - */ - public static final OperationStatus DELETE_FAILED = fromString("DeleteFailed"); - - /** - * Creates a new instance of OperationStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OperationStatus() { - } - - /** - * Creates or finds a OperationStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding OperationStatus. - */ - public static OperationStatus fromString(String name) { - return fromString(name, OperationStatus.class); - } - - /** - * Gets known OperationStatus values. - * - * @return known OperationStatus values. - */ - public static Collection values() { - return values(OperationStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.java deleted file mode 100644 index 1b8725426aca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Trigger of operation. - */ -public final class OperationTrigger extends ExpandableStringEnum { - /** - * Static value User for OperationTrigger. - */ - public static final OperationTrigger USER = fromString("User"); - - /** - * Static value Schedule for OperationTrigger. - */ - public static final OperationTrigger SCHEDULE = fromString("Schedule"); - - /** - * Static value IdleShutdown for OperationTrigger. - */ - public static final OperationTrigger IDLE_SHUTDOWN = fromString("IdleShutdown"); - - /** - * Creates a new instance of OperationTrigger value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OperationTrigger() { - } - - /** - * Creates or finds a OperationTrigger from its string representation. - * - * @param name a name to look for. - * @return the corresponding OperationTrigger. - */ - public static OperationTrigger fromString(String name) { - return fromString(name, OperationTrigger.class); - } - - /** - * Gets known OperationTrigger values. - * - * @return known OperationTrigger values. - */ - public static Collection values() { - return values(OperationTrigger.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java deleted file mode 100644 index adf5d02799a0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.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.machinelearning.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 Azure Machine Learning Workspaces REST API operations. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OrderString.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OrderString.java deleted file mode 100644 index 40a3205e420a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OrderString.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for OrderString. - */ -public final class OrderString extends ExpandableStringEnum { - /** - * Static value CreatedAtDesc for OrderString. - */ - public static final OrderString CREATED_AT_DESC = fromString("CreatedAtDesc"); - - /** - * Static value CreatedAtAsc for OrderString. - */ - public static final OrderString CREATED_AT_ASC = fromString("CreatedAtAsc"); - - /** - * Static value UpdatedAtDesc for OrderString. - */ - public static final OrderString UPDATED_AT_DESC = fromString("UpdatedAtDesc"); - - /** - * Static value UpdatedAtAsc for OrderString. - */ - public static final OrderString UPDATED_AT_ASC = fromString("UpdatedAtAsc"); - - /** - * Creates a new instance of OrderString value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OrderString() { - } - - /** - * Creates or finds a OrderString from its string representation. - * - * @param name a name to look for. - * @return the corresponding OrderString. - */ - public static OrderString fromString(String name) { - return fromString(name, OrderString.class); - } - - /** - * Gets known OrderString values. - * - * @return known OrderString values. - */ - public static Collection values() { - return values(OrderString.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Origin.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Origin.java deleted file mode 100644 index 03891a10841e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Origin.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value - * is "user,system". - */ -public final class Origin extends ExpandableStringEnum { - /** - * Static value user for Origin. - */ - public static final Origin USER = fromString("user"); - - /** - * Static value system for Origin. - */ - public static final Origin SYSTEM = fromString("system"); - - /** - * Static value user,system for Origin. - */ - public static final Origin USER_SYSTEM = fromString("user,system"); - - /** - * Creates a new instance of Origin value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Origin() { - } - - /** - * Creates or finds a Origin from its string representation. - * - * @param name a name to look for. - * @return the corresponding Origin. - */ - public static Origin fromString(String name) { - return fromString(name, Origin.class); - } - - /** - * Gets known Origin values. - * - * @return known Origin values. - */ - public static Collection values() { - return values(Origin.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.java deleted file mode 100644 index 582075077ad6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Compute OS Type. - */ -public final class OsType extends ExpandableStringEnum { - /** - * Static value Linux for OsType. - */ - public static final OsType LINUX = fromString("Linux"); - - /** - * Static value Windows for OsType. - */ - public static final OsType WINDOWS = fromString("Windows"); - - /** - * Creates a new instance of OsType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OsType() { - } - - /** - * Creates or finds a OsType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OsType. - */ - public static OsType fromString(String name) { - return fromString(name, OsType.class); - } - - /** - * Gets known OsType values. - * - * @return known OsType values. - */ - public static Collection values() { - return values(OsType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRule.java deleted file mode 100644 index 35b2832512cc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRule.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Outbound Rule for the managed network of a machine learning workspace. - */ -@Fluent -public class OutboundRule implements JsonSerializable { - /* - * Type of a managed network Outbound Rule of a machine learning workspace. - */ - private RuleType type = RuleType.fromString("OutboundRule"); - - /* - * Category of a managed network Outbound Rule of a machine learning workspace. - */ - private RuleCategory category; - - /* - * Type of a managed network Outbound Rule of a machine learning workspace. - */ - private RuleStatus status; - - /** - * Creates an instance of OutboundRule class. - */ - public OutboundRule() { - } - - /** - * Get the type property: Type of a managed network Outbound Rule of a machine learning workspace. - * - * @return the type value. - */ - public RuleType type() { - return this.type; - } - - /** - * Get the category property: Category of a managed network Outbound Rule of a machine learning workspace. - * - * @return the category value. - */ - public RuleCategory category() { - return this.category; - } - - /** - * Set the category property: Category of a managed network Outbound Rule of a machine learning workspace. - * - * @param category the category value to set. - * @return the OutboundRule object itself. - */ - public OutboundRule withCategory(RuleCategory category) { - this.category = category; - return this; - } - - /** - * Get the status property: Type of a managed network Outbound Rule of a machine learning workspace. - * - * @return the status value. - */ - public RuleStatus status() { - return this.status; - } - - /** - * Set the status property: Type of a managed network Outbound Rule of a machine learning workspace. - * - * @param status the status value to set. - * @return the OutboundRule object itself. - */ - public OutboundRule withStatus(RuleStatus status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("category", this.category == null ? null : this.category.toString()); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OutboundRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OutboundRule if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OutboundRule. - */ - public static OutboundRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("type".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("PrivateEndpoint".equals(discriminatorValue)) { - return PrivateEndpointOutboundRule.fromJson(readerToUse.reset()); - } else if ("ServiceTag".equals(discriminatorValue)) { - return ServiceTagOutboundRule.fromJson(readerToUse.reset()); - } else if ("FQDN".equals(discriminatorValue)) { - return FqdnOutboundRule.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static OutboundRule fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OutboundRule deserializedOutboundRule = new OutboundRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedOutboundRule.type = RuleType.fromString(reader.getString()); - } else if ("category".equals(fieldName)) { - deserializedOutboundRule.category = RuleCategory.fromString(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedOutboundRule.status = RuleStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedOutboundRule; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleBasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleBasicResource.java deleted file mode 100644 index 9ffd9fc14c5f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleBasicResource.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; - -/** - * An immutable client-side representation of OutboundRuleBasicResource. - */ -public interface OutboundRuleBasicResource { - /** - * 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: Outbound Rule for the managed network of a machine learning workspace. - * - * @return the properties value. - */ - OutboundRule 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.machinelearning.fluent.models.OutboundRuleBasicResourceInner object. - * - * @return the inner object. - */ - OutboundRuleBasicResourceInner innerModel(); - - /** - * The entirety of the OutboundRuleBasicResource definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The OutboundRuleBasicResource definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the OutboundRuleBasicResource definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the OutboundRuleBasicResource definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the OutboundRuleBasicResource definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Outbound Rule for the managed network of a machine learning - * workspace.. - * - * @param properties Outbound Rule for the managed network of a machine learning workspace. - * @return the next definition stage. - */ - WithCreate withProperties(OutboundRule properties); - } - - /** - * The stage of the OutboundRuleBasicResource 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - OutboundRuleBasicResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - OutboundRuleBasicResource create(Context context); - } - } - - /** - * Begins update for the OutboundRuleBasicResource resource. - * - * @return the stage of resource update. - */ - OutboundRuleBasicResource.Update update(); - - /** - * The template for OutboundRuleBasicResource update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - OutboundRuleBasicResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - OutboundRuleBasicResource apply(Context context); - } - - /** - * The OutboundRuleBasicResource update stages. - */ - interface UpdateStages { - /** - * The stage of the OutboundRuleBasicResource update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Outbound Rule for the managed network of a machine learning - * workspace.. - * - * @param properties Outbound Rule for the managed network of a machine learning workspace. - * @return the next definition stage. - */ - Update withProperties(OutboundRule properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - OutboundRuleBasicResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - OutboundRuleBasicResource refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleListResult.java deleted file mode 100644 index abc453a3a3ff..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleListResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * List of outbound rules for the managed network of a machine learning workspace. - */ -@Fluent -public final class OutboundRuleListResult implements JsonSerializable { - /* - * The link to the next page constructed using the continuationToken. If null, there are no additional pages. - */ - private String nextLink; - - /* - * The list of machine learning workspaces. Since this list may be incomplete, the nextLink field should be used to - * request the next list of machine learning workspaces. - */ - private List value; - - /** - * Creates an instance of OutboundRuleListResult class. - */ - public OutboundRuleListResult() { - } - - /** - * Get the nextLink property: The link to the next page constructed using the continuationToken. If null, there are - * no additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page constructed using the continuationToken. If null, there are - * no additional pages. - * - * @param nextLink the nextLink value to set. - * @return the OutboundRuleListResult object itself. - */ - public OutboundRuleListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of machine learning workspaces. Since this list may be incomplete, the nextLink - * field should be used to request the next list of machine learning workspaces. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of machine learning workspaces. Since this list may be incomplete, the nextLink - * field should be used to request the next list of machine learning workspaces. - * - * @param value the value value to set. - * @return the OutboundRuleListResult object itself. - */ - public OutboundRuleListResult 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) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OutboundRuleListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OutboundRuleListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the OutboundRuleListResult. - */ - public static OutboundRuleListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OutboundRuleListResult deserializedOutboundRuleListResult = new OutboundRuleListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nextLink".equals(fieldName)) { - deserializedOutboundRuleListResult.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> OutboundRuleBasicResourceInner.fromJson(reader1)); - deserializedOutboundRuleListResult.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedOutboundRuleListResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputDeliveryMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputDeliveryMode.java deleted file mode 100644 index 930eb55f0a0b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputDeliveryMode.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Output data delivery mode enums. - */ -public final class OutputDeliveryMode extends ExpandableStringEnum { - /** - * Static value ReadWriteMount for OutputDeliveryMode. - */ - public static final OutputDeliveryMode READ_WRITE_MOUNT = fromString("ReadWriteMount"); - - /** - * Static value Upload for OutputDeliveryMode. - */ - public static final OutputDeliveryMode UPLOAD = fromString("Upload"); - - /** - * Static value Direct for OutputDeliveryMode. - */ - public static final OutputDeliveryMode DIRECT = fromString("Direct"); - - /** - * Creates a new instance of OutputDeliveryMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OutputDeliveryMode() { - } - - /** - * Creates or finds a OutputDeliveryMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding OutputDeliveryMode. - */ - public static OutputDeliveryMode fromString(String name) { - return fromString(name, OutputDeliveryMode.class); - } - - /** - * Gets known OutputDeliveryMode values. - * - * @return known OutputDeliveryMode values. - */ - public static Collection values() { - return values(OutputDeliveryMode.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputPathAssetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputPathAssetReference.java deleted file mode 100644 index 58a86de49271..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputPathAssetReference.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Reference to an asset via its path in a job output. - */ -@Fluent -public final class OutputPathAssetReference extends AssetReferenceBase { - /* - * [Required] Specifies the type of asset reference. - */ - private ReferenceType referenceType = ReferenceType.OUTPUT_PATH; - - /* - * The path of the file/directory in the job output. - */ - private String path; - - /* - * ARM resource ID of the job. - */ - private String jobId; - - /** - * Creates an instance of OutputPathAssetReference class. - */ - public OutputPathAssetReference() { - } - - /** - * Get the referenceType property: [Required] Specifies the type of asset reference. - * - * @return the referenceType value. - */ - @Override - public ReferenceType referenceType() { - return this.referenceType; - } - - /** - * Get the path property: The path of the file/directory in the job output. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: The path of the file/directory in the job output. - * - * @param path the path value to set. - * @return the OutputPathAssetReference object itself. - */ - public OutputPathAssetReference withPath(String path) { - this.path = path; - return this; - } - - /** - * Get the jobId property: ARM resource ID of the job. - * - * @return the jobId value. - */ - public String jobId() { - return this.jobId; - } - - /** - * Set the jobId property: ARM resource ID of the job. - * - * @param jobId the jobId value to set. - * @return the OutputPathAssetReference object itself. - */ - public OutputPathAssetReference withJobId(String jobId) { - this.jobId = jobId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("referenceType", this.referenceType == null ? null : this.referenceType.toString()); - jsonWriter.writeStringField("path", this.path); - jsonWriter.writeStringField("jobId", this.jobId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OutputPathAssetReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OutputPathAssetReference if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OutputPathAssetReference. - */ - public static OutputPathAssetReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OutputPathAssetReference deserializedOutputPathAssetReference = new OutputPathAssetReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("referenceType".equals(fieldName)) { - deserializedOutputPathAssetReference.referenceType = ReferenceType.fromString(reader.getString()); - } else if ("path".equals(fieldName)) { - deserializedOutputPathAssetReference.path = reader.getString(); - } else if ("jobId".equals(fieldName)) { - deserializedOutputPathAssetReference.jobId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOutputPathAssetReference; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedComputeResourcesList.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedComputeResourcesList.java deleted file mode 100644 index 55620a1a6546..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedComputeResourcesList.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * Paginated list of Machine Learning compute objects wrapped in ARM resource envelope. - */ -@Fluent -public final class PaginatedComputeResourcesList implements JsonSerializable { - /* - * An array of Machine Learning compute objects wrapped in ARM resource envelope. - */ - private List value; - - /* - * A continuation link (absolute URI) to the next page of results in the list. - */ - private String nextLink; - - /** - * Creates an instance of PaginatedComputeResourcesList class. - */ - public PaginatedComputeResourcesList() { - } - - /** - * Get the value property: An array of Machine Learning compute objects wrapped in ARM resource envelope. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of Machine Learning compute objects wrapped in ARM resource envelope. - * - * @param value the value value to set. - * @return the PaginatedComputeResourcesList object itself. - */ - public PaginatedComputeResourcesList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A continuation link (absolute URI) to the next page of results in the list. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: A continuation link (absolute URI) to the next page of results in the list. - * - * @param nextLink the nextLink value to set. - * @return the PaginatedComputeResourcesList object itself. - */ - public PaginatedComputeResourcesList 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PaginatedComputeResourcesList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PaginatedComputeResourcesList if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PaginatedComputeResourcesList. - */ - public static PaginatedComputeResourcesList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PaginatedComputeResourcesList deserializedPaginatedComputeResourcesList - = new PaginatedComputeResourcesList(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ComputeResourceInner.fromJson(reader1)); - deserializedPaginatedComputeResourcesList.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedPaginatedComputeResourcesList.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPaginatedComputeResourcesList; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeployment.java deleted file mode 100644 index c33566e64b1a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeployment.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Mutable batch inference settings per deployment. - */ -@Fluent -public final class PartialBatchDeployment implements JsonSerializable { - /* - * Description of the endpoint deployment. - */ - private String description; - - /** - * Creates an instance of PartialBatchDeployment class. - */ - public PartialBatchDeployment() { - } - - /** - * Get the description property: Description of the endpoint deployment. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of the endpoint deployment. - * - * @param description the description value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartialBatchDeployment from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartialBatchDeployment if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the PartialBatchDeployment. - */ - public static PartialBatchDeployment fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartialBatchDeployment deserializedPartialBatchDeployment = new PartialBatchDeployment(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedPartialBatchDeployment.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPartialBatchDeployment; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java deleted file mode 100644 index 8be8f3b97dd9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Strictly used in update requests. - */ -@Fluent -public final class PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties - implements JsonSerializable { - /* - * Additional attributes of the entity. - */ - private PartialBatchDeployment properties; - - /* - * Resource tags. - */ - private Map tags; - - /** - * Creates an instance of PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties class. - */ - public PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties() { - } - - /** - * Get the properties property: Additional attributes of the entity. - * - * @return the properties value. - */ - public PartialBatchDeployment properties() { - return this.properties; - } - - /** - * Set the properties property: Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties object itself. - */ - public PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties - withProperties(PartialBatchDeployment properties) { - this.properties = properties; - return this; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties object itself. - */ - public PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties if the JsonReader was - * pointing to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties. - */ - public static PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties deserializedPartialBatchDeploymentPartialMinimalTrackedResourceWithProperties - = new PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedPartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.properties - = PartialBatchDeployment.fromJson(reader); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedPartialBatchDeploymentPartialMinimalTrackedResourceWithProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.java deleted file mode 100644 index b5a4c734015b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Managed service identity (system assigned and/or user assigned identities). - */ -@Fluent -public final class PartialManagedServiceIdentity implements JsonSerializable { - /* - * Managed service identity (system assigned and/or user assigned identities) - */ - 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. - */ - private Map userAssignedIdentities; - - /** - * Creates an instance of PartialManagedServiceIdentity class. - */ - public PartialManagedServiceIdentity() { - } - - /** - * Get the type property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the type value. - */ - public ManagedServiceIdentityType type() { - return this.type; - } - - /** - * Set the type property: Managed service identity (system assigned and/or user assigned identities). - * - * @param type the type value to set. - * @return the PartialManagedServiceIdentity object itself. - */ - public PartialManagedServiceIdentity 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 PartialManagedServiceIdentity object itself. - */ - public PartialManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, - (writer, element) -> writer.writeUntyped(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartialManagedServiceIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartialManagedServiceIdentity if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PartialManagedServiceIdentity. - */ - public static PartialManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartialManagedServiceIdentity deserializedPartialManagedServiceIdentity - = new PartialManagedServiceIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedPartialManagedServiceIdentity.type - = ManagedServiceIdentityType.fromString(reader.getString()); - } else if ("userAssignedIdentities".equals(fieldName)) { - Map userAssignedIdentities = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedPartialManagedServiceIdentity.userAssignedIdentities = userAssignedIdentities; - } else { - reader.skipChildren(); - } - } - - return deserializedPartialManagedServiceIdentity; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResource.java deleted file mode 100644 index deda7ce22ba4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResource.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Strictly used in update requests. - */ -@Fluent -public class PartialMinimalTrackedResource implements JsonSerializable { - /* - * Resource tags. - */ - private Map tags; - - /** - * Creates an instance of PartialMinimalTrackedResource class. - */ - public PartialMinimalTrackedResource() { - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the PartialMinimalTrackedResource object itself. - */ - public PartialMinimalTrackedResource withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartialMinimalTrackedResource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartialMinimalTrackedResource if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PartialMinimalTrackedResource. - */ - public static PartialMinimalTrackedResource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartialMinimalTrackedResource deserializedPartialMinimalTrackedResource - = new PartialMinimalTrackedResource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPartialMinimalTrackedResource.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedPartialMinimalTrackedResource; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java deleted file mode 100644 index 94621ebcbc36..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Strictly used in update requests. - */ -@Fluent -public final class PartialMinimalTrackedResourceWithIdentity extends PartialMinimalTrackedResource { - /* - * Managed service identity (system assigned and/or user assigned identities) - */ - private PartialManagedServiceIdentity identity; - - /** - * Creates an instance of PartialMinimalTrackedResourceWithIdentity class. - */ - public PartialMinimalTrackedResourceWithIdentity() { - } - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public PartialManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the PartialMinimalTrackedResourceWithIdentity object itself. - */ - public PartialMinimalTrackedResourceWithIdentity withIdentity(PartialManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PartialMinimalTrackedResourceWithIdentity withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (identity() != null) { - identity().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartialMinimalTrackedResourceWithIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartialMinimalTrackedResourceWithIdentity if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PartialMinimalTrackedResourceWithIdentity. - */ - public static PartialMinimalTrackedResourceWithIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartialMinimalTrackedResourceWithIdentity deserializedPartialMinimalTrackedResourceWithIdentity - = new PartialMinimalTrackedResourceWithIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPartialMinimalTrackedResourceWithIdentity.withTags(tags); - } else if ("identity".equals(fieldName)) { - deserializedPartialMinimalTrackedResourceWithIdentity.identity - = PartialManagedServiceIdentity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPartialMinimalTrackedResourceWithIdentity; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java deleted file mode 100644 index 16db7a27cf84..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Strictly used in update requests. - */ -@Fluent -public final class PartialMinimalTrackedResourceWithSku extends PartialMinimalTrackedResource { - /* - * Sku details required for ARM contract for Autoscaling. - */ - private PartialSku sku; - - /** - * Creates an instance of PartialMinimalTrackedResourceWithSku class. - */ - public PartialMinimalTrackedResourceWithSku() { - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public PartialSku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the PartialMinimalTrackedResourceWithSku object itself. - */ - public PartialMinimalTrackedResourceWithSku withSku(PartialSku sku) { - this.sku = sku; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PartialMinimalTrackedResourceWithSku withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (sku() != null) { - sku().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("sku", this.sku); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartialMinimalTrackedResourceWithSku from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartialMinimalTrackedResourceWithSku if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PartialMinimalTrackedResourceWithSku. - */ - public static PartialMinimalTrackedResourceWithSku fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartialMinimalTrackedResourceWithSku deserializedPartialMinimalTrackedResourceWithSku - = new PartialMinimalTrackedResourceWithSku(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPartialMinimalTrackedResourceWithSku.withTags(tags); - } else if ("sku".equals(fieldName)) { - deserializedPartialMinimalTrackedResourceWithSku.sku = PartialSku.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPartialMinimalTrackedResourceWithSku; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSkuAndIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSkuAndIdentity.java deleted file mode 100644 index 263a8830f439..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSkuAndIdentity.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Strictly used in update requests. - */ -@Fluent -public final class PartialMinimalTrackedResourceWithSkuAndIdentity extends PartialMinimalTrackedResource { - /* - * Sku details required for ARM contract for Autoscaling. - */ - private PartialSku sku; - - /* - * Managed service identity (system assigned and/or user assigned identities) - */ - private PartialManagedServiceIdentity identity; - - /** - * Creates an instance of PartialMinimalTrackedResourceWithSkuAndIdentity class. - */ - public PartialMinimalTrackedResourceWithSkuAndIdentity() { - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public PartialSku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the PartialMinimalTrackedResourceWithSkuAndIdentity object itself. - */ - public PartialMinimalTrackedResourceWithSkuAndIdentity withSku(PartialSku sku) { - this.sku = sku; - return this; - } - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public PartialManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the PartialMinimalTrackedResourceWithSkuAndIdentity object itself. - */ - public PartialMinimalTrackedResourceWithSkuAndIdentity withIdentity(PartialManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PartialMinimalTrackedResourceWithSkuAndIdentity withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (sku() != null) { - sku().validate(); - } - if (identity() != null) { - identity().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("sku", this.sku); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartialMinimalTrackedResourceWithSkuAndIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartialMinimalTrackedResourceWithSkuAndIdentity if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PartialMinimalTrackedResourceWithSkuAndIdentity. - */ - public static PartialMinimalTrackedResourceWithSkuAndIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartialMinimalTrackedResourceWithSkuAndIdentity deserializedPartialMinimalTrackedResourceWithSkuAndIdentity - = new PartialMinimalTrackedResourceWithSkuAndIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPartialMinimalTrackedResourceWithSkuAndIdentity.withTags(tags); - } else if ("sku".equals(fieldName)) { - deserializedPartialMinimalTrackedResourceWithSkuAndIdentity.sku = PartialSku.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedPartialMinimalTrackedResourceWithSkuAndIdentity.identity - = PartialManagedServiceIdentity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPartialMinimalTrackedResourceWithSkuAndIdentity; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java deleted file mode 100644 index d5739dbf1a57..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Strictly used in update requests. - */ -@Fluent -public final class PartialRegistryPartialTrackedResource - implements JsonSerializable { - /* - * Managed service identity (system assigned and/or user assigned identities) - */ - private RegistryPartialManagedServiceIdentity identity; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - private PartialSku sku; - - /* - * Resource tags. - */ - private Map tags; - - /** - * Creates an instance of PartialRegistryPartialTrackedResource class. - */ - public PartialRegistryPartialTrackedResource() { - } - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public RegistryPartialManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the PartialRegistryPartialTrackedResource object itself. - */ - public PartialRegistryPartialTrackedResource withIdentity(RegistryPartialManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public PartialSku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the PartialRegistryPartialTrackedResource object itself. - */ - public PartialRegistryPartialTrackedResource withSku(PartialSku sku) { - this.sku = sku; - return this; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the PartialRegistryPartialTrackedResource object itself. - */ - public PartialRegistryPartialTrackedResource withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeJsonField("sku", this.sku); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartialRegistryPartialTrackedResource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartialRegistryPartialTrackedResource if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PartialRegistryPartialTrackedResource. - */ - public static PartialRegistryPartialTrackedResource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartialRegistryPartialTrackedResource deserializedPartialRegistryPartialTrackedResource - = new PartialRegistryPartialTrackedResource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("identity".equals(fieldName)) { - deserializedPartialRegistryPartialTrackedResource.identity - = RegistryPartialManagedServiceIdentity.fromJson(reader); - } else if ("sku".equals(fieldName)) { - deserializedPartialRegistryPartialTrackedResource.sku = PartialSku.fromJson(reader); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPartialRegistryPartialTrackedResource.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedPartialRegistryPartialTrackedResource; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.java deleted file mode 100644 index a4e0cec722d0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Common SKU definition. - */ -@Fluent -public final class PartialSku implements JsonSerializable { - /* - * The name of the SKU. Ex - P3. It is typically a letter+number code. - */ - private String name; - - /* - * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is - * not required on a PUT. - */ - private SkuTier tier; - - /* - * The SKU size. When the name field is the combination of tier and some other value, this would be the standalone - * code. - */ - private String size; - - /* - * If the service has different generations of hardware, for the same SKU, then that can be captured here. - */ - private String family; - - /* - * If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible - * for the resource this may be omitted. - */ - private Integer capacity; - - /** - * Creates an instance of PartialSku class. - */ - public PartialSku() { - } - - /** - * Get the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. - * - * @param name the name value to set. - * @return the PartialSku object itself. - */ - public PartialSku withName(String name) { - this.name = name; - return this; - } - - /** - * Get the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. - * - * @return the tier value. - */ - public SkuTier tier() { - return this.tier; - } - - /** - * Set the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. - * - * @param tier the tier value to set. - * @return the PartialSku object itself. - */ - public PartialSku withTier(SkuTier tier) { - this.tier = tier; - return this; - } - - /** - * Get the size property: The SKU size. When the name field is the combination of tier and some other value, this - * would be the standalone code. - * - * @return the size value. - */ - public String size() { - return this.size; - } - - /** - * Set the size property: The SKU size. When the name field is the combination of tier and some other value, this - * would be the standalone code. - * - * @param size the size value to set. - * @return the PartialSku object itself. - */ - public PartialSku withSize(String size) { - this.size = size; - return this; - } - - /** - * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. - * - * @return the family value. - */ - public String family() { - return this.family; - } - - /** - * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. - * - * @param family the family value to set. - * @return the PartialSku object itself. - */ - public PartialSku withFamily(String family) { - this.family = family; - return this; - } - - /** - * Get the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If - * scale out/in is not possible for the resource this may be omitted. - * - * @return the capacity value. - */ - public Integer capacity() { - return this.capacity; - } - - /** - * Set the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If - * scale out/in is not possible for the resource this may be omitted. - * - * @param capacity the capacity value to set. - * @return the PartialSku object itself. - */ - public PartialSku withCapacity(Integer capacity) { - this.capacity = capacity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("tier", this.tier == null ? null : this.tier.toString()); - jsonWriter.writeStringField("size", this.size); - jsonWriter.writeStringField("family", this.family); - jsonWriter.writeNumberField("capacity", this.capacity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartialSku from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartialSku if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the PartialSku. - */ - public static PartialSku fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartialSku deserializedPartialSku = new PartialSku(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedPartialSku.name = reader.getString(); - } else if ("tier".equals(fieldName)) { - deserializedPartialSku.tier = SkuTier.fromString(reader.getString()); - } else if ("size".equals(fieldName)) { - deserializedPartialSku.size = reader.getString(); - } else if ("family".equals(fieldName)) { - deserializedPartialSku.family = reader.getString(); - } else if ("capacity".equals(fieldName)) { - deserializedPartialSku.capacity = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedPartialSku; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Password.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Password.java deleted file mode 100644 index a91cd1af69ca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Password.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The Password model. - */ -@Immutable -public final class Password implements JsonSerializable { - /* - * The name property. - */ - private String name; - - /* - * The value property. - */ - private String value; - - /** - * Creates an instance of Password class. - */ - public Password() { - } - - /** - * Get the name property: The name property. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the value property: The value property. - * - * @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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Password from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Password if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the Password. - */ - public static Password fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Password deserializedPassword = new Password(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedPassword.name = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedPassword.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPassword; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatAuthTypeWorkspaceConnectionProperties.java deleted file mode 100644 index 839f1fae0ee7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatAuthTypeWorkspaceConnectionProperties.java +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; - -/** - * The PatAuthTypeWorkspaceConnectionProperties model. - */ -@Fluent -public final class PatAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /* - * Authentication type of the connection target - */ - private ConnectionAuthType authType = ConnectionAuthType.PAT; - - /* - * The credentials property. - */ - private WorkspaceConnectionPersonalAccessToken credentials; - - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - - /** - * Creates an instance of PatAuthTypeWorkspaceConnectionProperties class. - */ - public PatAuthTypeWorkspaceConnectionProperties() { - } - - /** - * Get the authType property: Authentication type of the connection target. - * - * @return the authType value. - */ - @Override - public ConnectionAuthType authType() { - return this.authType; - } - - /** - * Get the credentials property: The credentials property. - * - * @return the credentials value. - */ - public WorkspaceConnectionPersonalAccessToken credentials() { - return this.credentials; - } - - /** - * Set the credentials property: The credentials property. - * - * @param credentials the credentials value to set. - * @return the PatAuthTypeWorkspaceConnectionProperties object itself. - */ - public PatAuthTypeWorkspaceConnectionProperties - withCredentials(WorkspaceConnectionPersonalAccessToken credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. - */ - @Override - public ConnectionGroup group() { - return this.group; - } - - /** - * {@inheritDoc} - */ - @Override - public PatAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PatAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PatAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PatAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PatAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PatAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { - super.withSharedUserList(sharedUserList); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PatAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PatAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", category() == null ? null : category().toString()); - jsonWriter.writeStringField("expiryTime", - expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); - jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); - jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("sharedUserList", sharedUserList(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeJsonField("credentials", this.credentials); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PatAuthTypeWorkspaceConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PatAuthTypeWorkspaceConnectionProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PatAuthTypeWorkspaceConnectionProperties. - */ - public static PatAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PatAuthTypeWorkspaceConnectionProperties deserializedPatAuthTypeWorkspaceConnectionProperties - = new PatAuthTypeWorkspaceConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties - .withCategory(ConnectionCategory.fromString(reader.getString())); - } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); - } else if ("expiryTime".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("group".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); - } else if ("isSharedToAll".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties - .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); - } else if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedPatAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); - } else if ("sharedUserList".equals(fieldName)) { - List sharedUserList = reader.readArray(reader1 -> reader1.getString()); - deserializedPatAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.authType - = ConnectionAuthType.fromString(reader.getString()); - } else if ("credentials".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.credentials - = WorkspaceConnectionPersonalAccessToken.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPatAuthTypeWorkspaceConnectionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialDto.java deleted file mode 100644 index 92e9b1628d91..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialDto.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The PendingUploadCredentialDto model. - */ -@Immutable -public class PendingUploadCredentialDto implements JsonSerializable { - /* - * [Required] Credential type used to authentication with storage. - */ - private PendingUploadCredentialType credentialType - = PendingUploadCredentialType.fromString("PendingUploadCredentialDto"); - - /** - * Creates an instance of PendingUploadCredentialDto class. - */ - public PendingUploadCredentialDto() { - } - - /** - * Get the credentialType property: [Required] Credential type used to authentication with storage. - * - * @return the credentialType value. - */ - public PendingUploadCredentialType credentialType() { - return this.credentialType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("credentialType", - this.credentialType == null ? null : this.credentialType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PendingUploadCredentialDto from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PendingUploadCredentialDto if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PendingUploadCredentialDto. - */ - public static PendingUploadCredentialDto fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("credentialType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("SAS".equals(discriminatorValue)) { - return SasCredentialDto.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static PendingUploadCredentialDto fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PendingUploadCredentialDto deserializedPendingUploadCredentialDto = new PendingUploadCredentialDto(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("credentialType".equals(fieldName)) { - deserializedPendingUploadCredentialDto.credentialType - = PendingUploadCredentialType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPendingUploadCredentialDto; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialType.java deleted file mode 100644 index 9f445de55772..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine the PendingUpload credentials type. - */ -public final class PendingUploadCredentialType extends ExpandableStringEnum { - /** - * Static value SAS for PendingUploadCredentialType. - */ - public static final PendingUploadCredentialType SAS = fromString("SAS"); - - /** - * Creates a new instance of PendingUploadCredentialType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PendingUploadCredentialType() { - } - - /** - * Creates or finds a PendingUploadCredentialType from its string representation. - * - * @param name a name to look for. - * @return the corresponding PendingUploadCredentialType. - */ - public static PendingUploadCredentialType fromString(String name) { - return fromString(name, PendingUploadCredentialType.class); - } - - /** - * Gets known PendingUploadCredentialType values. - * - * @return known PendingUploadCredentialType values. - */ - public static Collection values() { - return values(PendingUploadCredentialType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadRequestDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadRequestDto.java deleted file mode 100644 index f2e2dc9ad18a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadRequestDto.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The PendingUploadRequestDto model. - */ -@Fluent -public final class PendingUploadRequestDto implements JsonSerializable { - /* - * If PendingUploadId = null then random guid will be used. - */ - private String pendingUploadId; - - /* - * TemporaryBlobReference is the only supported type - */ - private PendingUploadType pendingUploadType; - - /** - * Creates an instance of PendingUploadRequestDto class. - */ - public PendingUploadRequestDto() { - } - - /** - * Get the pendingUploadId property: If PendingUploadId = null then random guid will be used. - * - * @return the pendingUploadId value. - */ - public String pendingUploadId() { - return this.pendingUploadId; - } - - /** - * Set the pendingUploadId property: If PendingUploadId = null then random guid will be used. - * - * @param pendingUploadId the pendingUploadId value to set. - * @return the PendingUploadRequestDto object itself. - */ - public PendingUploadRequestDto withPendingUploadId(String pendingUploadId) { - this.pendingUploadId = pendingUploadId; - return this; - } - - /** - * Get the pendingUploadType property: TemporaryBlobReference is the only supported type. - * - * @return the pendingUploadType value. - */ - public PendingUploadType pendingUploadType() { - return this.pendingUploadType; - } - - /** - * Set the pendingUploadType property: TemporaryBlobReference is the only supported type. - * - * @param pendingUploadType the pendingUploadType value to set. - * @return the PendingUploadRequestDto object itself. - */ - public PendingUploadRequestDto withPendingUploadType(PendingUploadType pendingUploadType) { - this.pendingUploadType = pendingUploadType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("pendingUploadId", this.pendingUploadId); - jsonWriter.writeStringField("pendingUploadType", - this.pendingUploadType == null ? null : this.pendingUploadType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PendingUploadRequestDto from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PendingUploadRequestDto if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the PendingUploadRequestDto. - */ - public static PendingUploadRequestDto fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PendingUploadRequestDto deserializedPendingUploadRequestDto = new PendingUploadRequestDto(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("pendingUploadId".equals(fieldName)) { - deserializedPendingUploadRequestDto.pendingUploadId = reader.getString(); - } else if ("pendingUploadType".equals(fieldName)) { - deserializedPendingUploadRequestDto.pendingUploadType - = PendingUploadType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPendingUploadRequestDto; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadResponseDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadResponseDto.java deleted file mode 100644 index 83a3ed289490..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadResponseDto.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; - -/** - * An immutable client-side representation of PendingUploadResponseDto. - */ -public interface PendingUploadResponseDto { - /** - * Gets the blobReferenceForConsumption property: Container level read, write, list SAS. - * - * @return the blobReferenceForConsumption value. - */ - BlobReferenceForConsumptionDto blobReferenceForConsumption(); - - /** - * Gets the pendingUploadId property: ID for this upload request. - * - * @return the pendingUploadId value. - */ - String pendingUploadId(); - - /** - * Gets the pendingUploadType property: TemporaryBlobReference is the only supported type. - * - * @return the pendingUploadType value. - */ - PendingUploadType pendingUploadType(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner object. - * - * @return the inner object. - */ - PendingUploadResponseDtoInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadType.java deleted file mode 100644 index 4573c34feb3a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of storage to use for the pending upload location. - */ -public final class PendingUploadType extends ExpandableStringEnum { - /** - * Static value None for PendingUploadType. - */ - public static final PendingUploadType NONE = fromString("None"); - - /** - * Static value TemporaryBlobReference for PendingUploadType. - */ - public static final PendingUploadType TEMPORARY_BLOB_REFERENCE = fromString("TemporaryBlobReference"); - - /** - * Creates a new instance of PendingUploadType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PendingUploadType() { - } - - /** - * Creates or finds a PendingUploadType from its string representation. - * - * @param name a name to look for. - * @return the corresponding PendingUploadType. - */ - public static PendingUploadType fromString(String name) { - return fromString(name, PendingUploadType.class); - } - - /** - * Gets known PendingUploadType values. - * - * @return known PendingUploadType values. - */ - public static Collection values() { - return values(PendingUploadType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PersonalComputeInstanceSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PersonalComputeInstanceSettings.java deleted file mode 100644 index 18891a1e73c8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PersonalComputeInstanceSettings.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Settings for a personal compute instance. - */ -@Fluent -public final class PersonalComputeInstanceSettings implements JsonSerializable { - /* - * A user explicitly assigned to a personal compute instance. - */ - private AssignedUser assignedUser; - - /** - * Creates an instance of PersonalComputeInstanceSettings class. - */ - public PersonalComputeInstanceSettings() { - } - - /** - * Get the assignedUser property: A user explicitly assigned to a personal compute instance. - * - * @return the assignedUser value. - */ - public AssignedUser assignedUser() { - return this.assignedUser; - } - - /** - * Set the assignedUser property: A user explicitly assigned to a personal compute instance. - * - * @param assignedUser the assignedUser value to set. - * @return the PersonalComputeInstanceSettings object itself. - */ - public PersonalComputeInstanceSettings withAssignedUser(AssignedUser assignedUser) { - this.assignedUser = assignedUser; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (assignedUser() != null) { - assignedUser().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("assignedUser", this.assignedUser); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PersonalComputeInstanceSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PersonalComputeInstanceSettings if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PersonalComputeInstanceSettings. - */ - public static PersonalComputeInstanceSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PersonalComputeInstanceSettings deserializedPersonalComputeInstanceSettings - = new PersonalComputeInstanceSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("assignedUser".equals(fieldName)) { - deserializedPersonalComputeInstanceSettings.assignedUser = AssignedUser.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPersonalComputeInstanceSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PipelineJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PipelineJob.java deleted file mode 100644 index 2abbbdf9138f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PipelineJob.java +++ /dev/null @@ -1,394 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Pipeline Job definition: defines generic to MFE attributes. - */ -@Fluent -public final class PipelineJob extends JobBaseProperties { - /* - * [Required] Specifies the type of job. - */ - private JobType jobType = JobType.PIPELINE; - - /* - * Pipeline settings, for things like ContinueRunOnStepFailure etc. - */ - private Object settings; - - /* - * Jobs construct the Pipeline Job. - */ - private Map jobs; - - /* - * Inputs for the pipeline job. - */ - private Map inputs; - - /* - * Outputs for the pipeline job - */ - private Map outputs; - - /* - * ARM resource ID of source job. - */ - private String sourceJobId; - - /* - * Status of the job. - */ - private JobStatus status; - - /** - * Creates an instance of PipelineJob class. - */ - public PipelineJob() { - } - - /** - * Get the jobType property: [Required] Specifies the type of job. - * - * @return the jobType value. - */ - @Override - public JobType jobType() { - return this.jobType; - } - - /** - * Get the settings property: Pipeline settings, for things like ContinueRunOnStepFailure etc. - * - * @return the settings value. - */ - public Object settings() { - return this.settings; - } - - /** - * Set the settings property: Pipeline settings, for things like ContinueRunOnStepFailure etc. - * - * @param settings the settings value to set. - * @return the PipelineJob object itself. - */ - public PipelineJob withSettings(Object settings) { - this.settings = settings; - return this; - } - - /** - * Get the jobs property: Jobs construct the Pipeline Job. - * - * @return the jobs value. - */ - public Map jobs() { - return this.jobs; - } - - /** - * Set the jobs property: Jobs construct the Pipeline Job. - * - * @param jobs the jobs value to set. - * @return the PipelineJob object itself. - */ - public PipelineJob withJobs(Map jobs) { - this.jobs = jobs; - return this; - } - - /** - * Get the inputs property: Inputs for the pipeline job. - * - * @return the inputs value. - */ - public Map inputs() { - return this.inputs; - } - - /** - * Set the inputs property: Inputs for the pipeline job. - * - * @param inputs the inputs value to set. - * @return the PipelineJob object itself. - */ - public PipelineJob withInputs(Map inputs) { - this.inputs = inputs; - return this; - } - - /** - * Get the outputs property: Outputs for the pipeline job. - * - * @return the outputs value. - */ - public Map outputs() { - return this.outputs; - } - - /** - * Set the outputs property: Outputs for the pipeline job. - * - * @param outputs the outputs value to set. - * @return the PipelineJob object itself. - */ - public PipelineJob withOutputs(Map outputs) { - this.outputs = outputs; - return this; - } - - /** - * Get the sourceJobId property: ARM resource ID of source job. - * - * @return the sourceJobId value. - */ - public String sourceJobId() { - return this.sourceJobId; - } - - /** - * Set the sourceJobId property: ARM resource ID of source job. - * - * @param sourceJobId the sourceJobId value to set. - * @return the PipelineJob object itself. - */ - public PipelineJob withSourceJobId(String sourceJobId) { - this.sourceJobId = sourceJobId; - return this; - } - - /** - * Get the status property: Status of the job. - * - * @return the status value. - */ - @Override - public JobStatus status() { - return this.status; - } - - /** - * {@inheritDoc} - */ - @Override - public PipelineJob withDisplayName(String displayName) { - super.withDisplayName(displayName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PipelineJob withExperimentName(String experimentName) { - super.withExperimentName(experimentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PipelineJob withServices(Map services) { - super.withServices(services); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PipelineJob withComputeId(String computeId) { - super.withComputeId(computeId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PipelineJob withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PipelineJob withIdentity(IdentityConfiguration identity) { - super.withIdentity(identity); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PipelineJob withComponentId(String componentId) { - super.withComponentId(componentId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PipelineJob withNotificationSetting(NotificationSetting notificationSetting) { - super.withNotificationSetting(notificationSetting); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PipelineJob withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PipelineJob withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PipelineJob withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (inputs() != null) { - inputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (outputs() != null) { - outputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("displayName", displayName()); - jsonWriter.writeStringField("experimentName", experimentName()); - jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", computeId()); - jsonWriter.writeBooleanField("isArchived", isArchived()); - jsonWriter.writeJsonField("identity", identity()); - jsonWriter.writeStringField("componentId", componentId()); - jsonWriter.writeJsonField("notificationSetting", notificationSetting()); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeUntypedField("settings", this.settings); - jsonWriter.writeMapField("jobs", this.jobs, (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("sourceJobId", this.sourceJobId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PipelineJob from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PipelineJob if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the PipelineJob. - */ - public static PipelineJob fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PipelineJob deserializedPipelineJob = new PipelineJob(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedPipelineJob.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPipelineJob.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedPipelineJob.withProperties(properties); - } else if ("displayName".equals(fieldName)) { - deserializedPipelineJob.withDisplayName(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedPipelineJob.status = JobStatus.fromString(reader.getString()); - } else if ("experimentName".equals(fieldName)) { - deserializedPipelineJob.withExperimentName(reader.getString()); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedPipelineJob.withServices(services); - } else if ("computeId".equals(fieldName)) { - deserializedPipelineJob.withComputeId(reader.getString()); - } else if ("isArchived".equals(fieldName)) { - deserializedPipelineJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("identity".equals(fieldName)) { - deserializedPipelineJob.withIdentity(IdentityConfiguration.fromJson(reader)); - } else if ("componentId".equals(fieldName)) { - deserializedPipelineJob.withComponentId(reader.getString()); - } else if ("notificationSetting".equals(fieldName)) { - deserializedPipelineJob.withNotificationSetting(NotificationSetting.fromJson(reader)); - } else if ("jobType".equals(fieldName)) { - deserializedPipelineJob.jobType = JobType.fromString(reader.getString()); - } else if ("settings".equals(fieldName)) { - deserializedPipelineJob.settings = reader.readUntyped(); - } else if ("jobs".equals(fieldName)) { - Map jobs = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedPipelineJob.jobs = jobs; - } else if ("inputs".equals(fieldName)) { - Map inputs = reader.readMap(reader1 -> JobInput.fromJson(reader1)); - deserializedPipelineJob.inputs = inputs; - } else if ("outputs".equals(fieldName)) { - Map outputs = reader.readMap(reader1 -> JobOutput.fromJson(reader1)); - deserializedPipelineJob.outputs = outputs; - } else if ("sourceJobId".equals(fieldName)) { - deserializedPipelineJob.sourceJobId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPipelineJob; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMetricThresholdBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMetricThresholdBase.java deleted file mode 100644 index a1108385b311..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMetricThresholdBase.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The PredictionDriftMetricThresholdBase model. - */ -@Fluent -public class PredictionDriftMetricThresholdBase implements JsonSerializable { - /* - * [Required] Specifies the data type of the metric threshold. - */ - private MonitoringFeatureDataType dataType - = MonitoringFeatureDataType.fromString("PredictionDriftMetricThresholdBase"); - - /* - * The threshold value. If null, a default value will be set depending on the selected metric. - */ - private MonitoringThreshold threshold; - - /** - * Creates an instance of PredictionDriftMetricThresholdBase class. - */ - public PredictionDriftMetricThresholdBase() { - } - - /** - * Get the dataType property: [Required] Specifies the data type of the metric threshold. - * - * @return the dataType value. - */ - public MonitoringFeatureDataType dataType() { - return this.dataType; - } - - /** - * Get the threshold property: The threshold value. If null, a default value will be set depending on the selected - * metric. - * - * @return the threshold value. - */ - public MonitoringThreshold threshold() { - return this.threshold; - } - - /** - * Set the threshold property: The threshold value. If null, a default value will be set depending on the selected - * metric. - * - * @param threshold the threshold value to set. - * @return the PredictionDriftMetricThresholdBase object itself. - */ - public PredictionDriftMetricThresholdBase withThreshold(MonitoringThreshold threshold) { - this.threshold = threshold; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (threshold() != null) { - threshold().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); - jsonWriter.writeJsonField("threshold", this.threshold); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PredictionDriftMetricThresholdBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PredictionDriftMetricThresholdBase if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PredictionDriftMetricThresholdBase. - */ - public static PredictionDriftMetricThresholdBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("dataType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Categorical".equals(discriminatorValue)) { - return CategoricalPredictionDriftMetricThreshold.fromJson(readerToUse.reset()); - } else if ("Numerical".equals(discriminatorValue)) { - return NumericalPredictionDriftMetricThreshold.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static PredictionDriftMetricThresholdBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PredictionDriftMetricThresholdBase deserializedPredictionDriftMetricThresholdBase - = new PredictionDriftMetricThresholdBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("dataType".equals(fieldName)) { - deserializedPredictionDriftMetricThresholdBase.dataType - = MonitoringFeatureDataType.fromString(reader.getString()); - } else if ("threshold".equals(fieldName)) { - deserializedPredictionDriftMetricThresholdBase.threshold = MonitoringThreshold.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPredictionDriftMetricThresholdBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMonitoringSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMonitoringSignal.java deleted file mode 100644 index 41a8ed5d9da9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMonitoringSignal.java +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * The PredictionDriftMonitoringSignal model. - */ -@Fluent -public final class PredictionDriftMonitoringSignal extends MonitoringSignalBase { - /* - * [Required] Specifies the type of signal to monitor. - */ - private MonitoringSignalType signalType = MonitoringSignalType.PREDICTION_DRIFT; - - /* - * [Required] A list of metrics to calculate and their associated thresholds. - */ - private List metricThresholds; - - /* - * [Required] The data which drift will be calculated for. - */ - private MonitoringInputDataBase productionData; - - /* - * [Required] The data to calculate drift against. - */ - private MonitoringInputDataBase referenceData; - - /* - * A dictionary that maps feature names to their respective data types. - */ - private Map featureDataTypeOverride; - - /** - * Creates an instance of PredictionDriftMonitoringSignal class. - */ - public PredictionDriftMonitoringSignal() { - } - - /** - * Get the signalType property: [Required] Specifies the type of signal to monitor. - * - * @return the signalType value. - */ - @Override - public MonitoringSignalType signalType() { - return this.signalType; - } - - /** - * Get the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. - * - * @return the metricThresholds value. - */ - public List metricThresholds() { - return this.metricThresholds; - } - - /** - * Set the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. - * - * @param metricThresholds the metricThresholds value to set. - * @return the PredictionDriftMonitoringSignal object itself. - */ - public PredictionDriftMonitoringSignal - withMetricThresholds(List metricThresholds) { - this.metricThresholds = metricThresholds; - return this; - } - - /** - * Get the productionData property: [Required] The data which drift will be calculated for. - * - * @return the productionData value. - */ - public MonitoringInputDataBase productionData() { - return this.productionData; - } - - /** - * Set the productionData property: [Required] The data which drift will be calculated for. - * - * @param productionData the productionData value to set. - * @return the PredictionDriftMonitoringSignal object itself. - */ - public PredictionDriftMonitoringSignal withProductionData(MonitoringInputDataBase productionData) { - this.productionData = productionData; - return this; - } - - /** - * Get the referenceData property: [Required] The data to calculate drift against. - * - * @return the referenceData value. - */ - public MonitoringInputDataBase referenceData() { - return this.referenceData; - } - - /** - * Set the referenceData property: [Required] The data to calculate drift against. - * - * @param referenceData the referenceData value to set. - * @return the PredictionDriftMonitoringSignal object itself. - */ - public PredictionDriftMonitoringSignal withReferenceData(MonitoringInputDataBase referenceData) { - this.referenceData = referenceData; - return this; - } - - /** - * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. - * - * @return the featureDataTypeOverride value. - */ - public Map featureDataTypeOverride() { - return this.featureDataTypeOverride; - } - - /** - * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. - * - * @param featureDataTypeOverride the featureDataTypeOverride value to set. - * @return the PredictionDriftMonitoringSignal object itself. - */ - public PredictionDriftMonitoringSignal - withFeatureDataTypeOverride(Map featureDataTypeOverride) { - this.featureDataTypeOverride = featureDataTypeOverride; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PredictionDriftMonitoringSignal withNotificationTypes(List notificationTypes) { - super.withNotificationTypes(notificationTypes); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PredictionDriftMonitoringSignal withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (metricThresholds() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metricThresholds in model PredictionDriftMonitoringSignal")); - } else { - metricThresholds().forEach(e -> e.validate()); - } - if (productionData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property productionData in model PredictionDriftMonitoringSignal")); - } else { - productionData().validate(); - } - if (referenceData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property referenceData in model PredictionDriftMonitoringSignal")); - } else { - referenceData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PredictionDriftMonitoringSignal.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("notificationTypes", notificationTypes(), - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("metricThresholds", this.metricThresholds, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("productionData", this.productionData); - jsonWriter.writeJsonField("referenceData", this.referenceData); - jsonWriter.writeStringField("signalType", this.signalType == null ? null : this.signalType.toString()); - jsonWriter.writeMapField("featureDataTypeOverride", this.featureDataTypeOverride, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PredictionDriftMonitoringSignal from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PredictionDriftMonitoringSignal if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PredictionDriftMonitoringSignal. - */ - public static PredictionDriftMonitoringSignal fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PredictionDriftMonitoringSignal deserializedPredictionDriftMonitoringSignal - = new PredictionDriftMonitoringSignal(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("notificationTypes".equals(fieldName)) { - List notificationTypes - = reader.readArray(reader1 -> MonitoringNotificationType.fromString(reader1.getString())); - deserializedPredictionDriftMonitoringSignal.withNotificationTypes(notificationTypes); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedPredictionDriftMonitoringSignal.withProperties(properties); - } else if ("metricThresholds".equals(fieldName)) { - List metricThresholds - = reader.readArray(reader1 -> PredictionDriftMetricThresholdBase.fromJson(reader1)); - deserializedPredictionDriftMonitoringSignal.metricThresholds = metricThresholds; - } else if ("productionData".equals(fieldName)) { - deserializedPredictionDriftMonitoringSignal.productionData - = MonitoringInputDataBase.fromJson(reader); - } else if ("referenceData".equals(fieldName)) { - deserializedPredictionDriftMonitoringSignal.referenceData - = MonitoringInputDataBase.fromJson(reader); - } else if ("signalType".equals(fieldName)) { - deserializedPredictionDriftMonitoringSignal.signalType - = MonitoringSignalType.fromString(reader.getString()); - } else if ("featureDataTypeOverride".equals(fieldName)) { - Map featureDataTypeOverride - = reader.readMap(reader1 -> MonitoringFeatureDataType.fromString(reader1.getString())); - deserializedPredictionDriftMonitoringSignal.featureDataTypeOverride = featureDataTypeOverride; - } else { - reader.skipChildren(); - } - } - - return deserializedPredictionDriftMonitoringSignal; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.java deleted file mode 100644 index 2ba502e24e8c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The Private Endpoint resource. - */ -@Immutable -public class PrivateEndpoint implements JsonSerializable { - /* - * The ARM identifier for Private Endpoint - */ - private String id; - - /** - * Creates an instance of PrivateEndpoint class. - */ - public PrivateEndpoint() { - } - - /** - * Get the id property: The ARM identifier for Private Endpoint. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The ARM identifier for Private Endpoint. - * - * @param id the id value to set. - * @return the PrivateEndpoint object itself. - */ - PrivateEndpoint withId(String id) { - this.id = id; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpoint from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpoint if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateEndpoint. - */ - public static PrivateEndpoint fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpoint deserializedPrivateEndpoint = new PrivateEndpoint(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateEndpoint.id = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpoint; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnection.java deleted file mode 100644 index af1b0ca198b4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnection.java +++ /dev/null @@ -1,382 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -import java.util.Map; - -/** - * An immutable client-side representation of PrivateEndpointConnection. - */ -public interface PrivateEndpointConnection { - /** - * 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 identity property: The identity of the resource. - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the location property: Specifies the location of the resource. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Contains resource tags defined as key/value pairs. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the sku property: The sku of the workspace. - * - * @return the sku value. - */ - Sku sku(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the privateEndpoint property: The resource of private end point. - * - * @return the privateEndpoint value. - */ - PrivateEndpoint privateEndpoint(); - - /** - * Gets the privateLinkServiceConnectionState property: A collection of information about the state of the - * connection between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); - - /** - * Gets the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @return the provisioningState value. - */ - PrivateEndpointConnectionProvisioningState provisioningState(); - - /** - * 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.machinelearning.fluent.models.PrivateEndpointConnectionInner object. - * - * @return the inner object. - */ - PrivateEndpointConnectionInner innerModel(); - - /** - * The entirety of the PrivateEndpointConnection definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The PrivateEndpointConnection definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the PrivateEndpointConnection definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the PrivateEndpointConnection definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the PrivateEndpointConnection 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.WithLocation, DefinitionStages.WithTags, - DefinitionStages.WithIdentity, DefinitionStages.WithSku, DefinitionStages.WithPrivateEndpoint, - DefinitionStages.WithPrivateLinkServiceConnectionState { - /** - * Executes the create request. - * - * @return the created resource. - */ - PrivateEndpointConnection create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - PrivateEndpointConnection create(Context context); - } - - /** - * The stage of the PrivateEndpointConnection definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location Specifies the location of the resource. - * @return the next definition stage. - */ - WithCreate withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location Specifies the location of the resource. - * @return the next definition stage. - */ - WithCreate withRegion(String location); - } - - /** - * The stage of the PrivateEndpointConnection definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Contains resource tags defined as key/value pairs.. - * - * @param tags Contains resource tags defined as key/value pairs. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the PrivateEndpointConnection definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The identity of the resource.. - * - * @param identity The identity of the resource. - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the PrivateEndpointConnection definition allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: The sku of the workspace.. - * - * @param sku The sku of the workspace. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - - /** - * The stage of the PrivateEndpointConnection definition allowing to specify privateEndpoint. - */ - interface WithPrivateEndpoint { - /** - * Specifies the privateEndpoint property: The resource of private end point.. - * - * @param privateEndpoint The resource of private end point. - * @return the next definition stage. - */ - WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); - } - - /** - * The stage of the PrivateEndpointConnection definition allowing to specify privateLinkServiceConnectionState. - */ - interface WithPrivateLinkServiceConnectionState { - /** - * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of - * the connection between service consumer and provider.. - * - * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. - * @return the next definition stage. - */ - WithCreate withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState); - } - } - - /** - * Begins update for the PrivateEndpointConnection resource. - * - * @return the stage of resource update. - */ - PrivateEndpointConnection.Update update(); - - /** - * The template for PrivateEndpointConnection update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku, - UpdateStages.WithPrivateEndpoint, UpdateStages.WithPrivateLinkServiceConnectionState { - /** - * Executes the update request. - * - * @return the updated resource. - */ - PrivateEndpointConnection apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - PrivateEndpointConnection apply(Context context); - } - - /** - * The PrivateEndpointConnection update stages. - */ - interface UpdateStages { - /** - * The stage of the PrivateEndpointConnection update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Contains resource tags defined as key/value pairs.. - * - * @param tags Contains resource tags defined as key/value pairs. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the PrivateEndpointConnection update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The identity of the resource.. - * - * @param identity The identity of the resource. - * @return the next definition stage. - */ - Update withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the PrivateEndpointConnection update allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: The sku of the workspace.. - * - * @param sku The sku of the workspace. - * @return the next definition stage. - */ - Update withSku(Sku sku); - } - - /** - * The stage of the PrivateEndpointConnection update allowing to specify privateEndpoint. - */ - interface WithPrivateEndpoint { - /** - * Specifies the privateEndpoint property: The resource of private end point.. - * - * @param privateEndpoint The resource of private end point. - * @return the next definition stage. - */ - Update withPrivateEndpoint(PrivateEndpoint privateEndpoint); - } - - /** - * The stage of the PrivateEndpointConnection update allowing to specify privateLinkServiceConnectionState. - */ - interface WithPrivateLinkServiceConnectionState { - /** - * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of - * the connection between service consumer and provider.. - * - * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. - * @return the next definition stage. - */ - Update withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - PrivateEndpointConnection refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - PrivateEndpointConnection refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionListResult.java deleted file mode 100644 index fa1adc25e986..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionListResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -import java.io.IOException; -import java.util.List; - -/** - * List of private endpoint connection associated with the specified workspace. - */ -@Fluent -public final class PrivateEndpointConnectionListResult - implements JsonSerializable { - /* - * Array of private endpoint connections - */ - private List value; - - /** - * Creates an instance of PrivateEndpointConnectionListResult class. - */ - public PrivateEndpointConnectionListResult() { - } - - /** - * Get the value property: Array of private endpoint connections. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of private endpoint connections. - * - * @param value the value value to set. - * @return the PrivateEndpointConnectionListResult object itself. - */ - public PrivateEndpointConnectionListResult 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) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionListResult if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateEndpointConnectionListResult. - */ - public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionListResult deserializedPrivateEndpointConnectionListResult - = new PrivateEndpointConnectionListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); - deserializedPrivateEndpointConnectionListResult.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionListResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionProvisioningState.java deleted file mode 100644 index b0390745bc2d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionProvisioningState.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The current provisioning state. - */ -public final class PrivateEndpointConnectionProvisioningState - extends ExpandableStringEnum { - /** - * Static value Succeeded for PrivateEndpointConnectionProvisioningState. - */ - public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Creating for PrivateEndpointConnectionProvisioningState. - */ - public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Deleting for PrivateEndpointConnectionProvisioningState. - */ - public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); - - /** - * Static value Failed for PrivateEndpointConnectionProvisioningState. - */ - public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); - - /** - * Creates a new instance of PrivateEndpointConnectionProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PrivateEndpointConnectionProvisioningState() { - } - - /** - * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateEndpointConnectionProvisioningState. - */ - public static PrivateEndpointConnectionProvisioningState fromString(String name) { - return fromString(name, PrivateEndpointConnectionProvisioningState.class); - } - - /** - * Gets known PrivateEndpointConnectionProvisioningState values. - * - * @return known PrivateEndpointConnectionProvisioningState values. - */ - public static Collection values() { - return values(PrivateEndpointConnectionProvisioningState.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.java deleted file mode 100644 index a451262c1dd8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 PrivateEndpointConnections. - */ -public interface PrivateEndpointConnections { - /** - * List all the private endpoint connections associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List all the private endpoint connections associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @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 specified private endpoint connection associated with the workspace along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context); - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @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 specified private endpoint connection associated with the workspace. - */ - PrivateEndpointConnection get(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @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 specified private endpoint connection associated with the workspace along with {@link Response}. - */ - PrivateEndpointConnection getById(String id); - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @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 specified private endpoint connection associated with the workspace along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @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. - */ - void deleteById(String id); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new PrivateEndpointConnection resource. - * - * @param name resource name. - * @return the first stage of the new PrivateEndpointConnection definition. - */ - PrivateEndpointConnection.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointDestination.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointDestination.java deleted file mode 100644 index b76a001a9345..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointDestination.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning - * workspace. - */ -@Fluent -public final class PrivateEndpointDestination implements JsonSerializable { - /* - * The serviceResourceId property. - */ - private String serviceResourceId; - - /* - * The sparkEnabled property. - */ - private Boolean sparkEnabled; - - /* - * Type of a managed network Outbound Rule of a machine learning workspace. - */ - private RuleStatus sparkStatus; - - /* - * The subresourceTarget property. - */ - private String subresourceTarget; - - /** - * Creates an instance of PrivateEndpointDestination class. - */ - public PrivateEndpointDestination() { - } - - /** - * Get the serviceResourceId property: The serviceResourceId property. - * - * @return the serviceResourceId value. - */ - public String serviceResourceId() { - return this.serviceResourceId; - } - - /** - * Set the serviceResourceId property: The serviceResourceId property. - * - * @param serviceResourceId the serviceResourceId value to set. - * @return the PrivateEndpointDestination object itself. - */ - public PrivateEndpointDestination withServiceResourceId(String serviceResourceId) { - this.serviceResourceId = serviceResourceId; - return this; - } - - /** - * Get the sparkEnabled property: The sparkEnabled property. - * - * @return the sparkEnabled value. - */ - public Boolean sparkEnabled() { - return this.sparkEnabled; - } - - /** - * Set the sparkEnabled property: The sparkEnabled property. - * - * @param sparkEnabled the sparkEnabled value to set. - * @return the PrivateEndpointDestination object itself. - */ - public PrivateEndpointDestination withSparkEnabled(Boolean sparkEnabled) { - this.sparkEnabled = sparkEnabled; - return this; - } - - /** - * Get the sparkStatus property: Type of a managed network Outbound Rule of a machine learning workspace. - * - * @return the sparkStatus value. - */ - public RuleStatus sparkStatus() { - return this.sparkStatus; - } - - /** - * Set the sparkStatus property: Type of a managed network Outbound Rule of a machine learning workspace. - * - * @param sparkStatus the sparkStatus value to set. - * @return the PrivateEndpointDestination object itself. - */ - public PrivateEndpointDestination withSparkStatus(RuleStatus sparkStatus) { - this.sparkStatus = sparkStatus; - return this; - } - - /** - * Get the subresourceTarget property: The subresourceTarget property. - * - * @return the subresourceTarget value. - */ - public String subresourceTarget() { - return this.subresourceTarget; - } - - /** - * Set the subresourceTarget property: The subresourceTarget property. - * - * @param subresourceTarget the subresourceTarget value to set. - * @return the PrivateEndpointDestination object itself. - */ - public PrivateEndpointDestination withSubresourceTarget(String subresourceTarget) { - this.subresourceTarget = subresourceTarget; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("serviceResourceId", this.serviceResourceId); - jsonWriter.writeBooleanField("sparkEnabled", this.sparkEnabled); - jsonWriter.writeStringField("sparkStatus", this.sparkStatus == null ? null : this.sparkStatus.toString()); - jsonWriter.writeStringField("subresourceTarget", this.subresourceTarget); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointDestination from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointDestination if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateEndpointDestination. - */ - public static PrivateEndpointDestination fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointDestination deserializedPrivateEndpointDestination = new PrivateEndpointDestination(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serviceResourceId".equals(fieldName)) { - deserializedPrivateEndpointDestination.serviceResourceId = reader.getString(); - } else if ("sparkEnabled".equals(fieldName)) { - deserializedPrivateEndpointDestination.sparkEnabled = reader.getNullable(JsonReader::getBoolean); - } else if ("sparkStatus".equals(fieldName)) { - deserializedPrivateEndpointDestination.sparkStatus = RuleStatus.fromString(reader.getString()); - } else if ("subresourceTarget".equals(fieldName)) { - deserializedPrivateEndpointDestination.subresourceTarget = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointDestination; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointOutboundRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointOutboundRule.java deleted file mode 100644 index f1f9fd565f37..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointOutboundRule.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Private Endpoint Outbound Rule for the managed network of a machine learning workspace. - */ -@Fluent -public final class PrivateEndpointOutboundRule extends OutboundRule { - /* - * Type of a managed network Outbound Rule of a machine learning workspace. - */ - private RuleType type = RuleType.PRIVATE_ENDPOINT; - - /* - * Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning - * workspace. - */ - private PrivateEndpointDestination destination; - - /** - * Creates an instance of PrivateEndpointOutboundRule class. - */ - public PrivateEndpointOutboundRule() { - } - - /** - * Get the type property: Type of a managed network Outbound Rule of a machine learning workspace. - * - * @return the type value. - */ - @Override - public RuleType type() { - return this.type; - } - - /** - * Get the destination property: Private Endpoint destination for a Private Endpoint Outbound Rule for the managed - * network of a machine learning workspace. - * - * @return the destination value. - */ - public PrivateEndpointDestination destination() { - return this.destination; - } - - /** - * Set the destination property: Private Endpoint destination for a Private Endpoint Outbound Rule for the managed - * network of a machine learning workspace. - * - * @param destination the destination value to set. - * @return the PrivateEndpointOutboundRule object itself. - */ - public PrivateEndpointOutboundRule withDestination(PrivateEndpointDestination destination) { - this.destination = destination; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PrivateEndpointOutboundRule withCategory(RuleCategory category) { - super.withCategory(category); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PrivateEndpointOutboundRule withStatus(RuleStatus status) { - super.withStatus(status); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (destination() != null) { - destination().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", category() == null ? null : category().toString()); - jsonWriter.writeStringField("status", status() == null ? null : status().toString()); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeJsonField("destination", this.destination); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointOutboundRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointOutboundRule if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateEndpointOutboundRule. - */ - public static PrivateEndpointOutboundRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointOutboundRule deserializedPrivateEndpointOutboundRule = new PrivateEndpointOutboundRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedPrivateEndpointOutboundRule.withCategory(RuleCategory.fromString(reader.getString())); - } else if ("status".equals(fieldName)) { - deserializedPrivateEndpointOutboundRule.withStatus(RuleStatus.fromString(reader.getString())); - } else if ("type".equals(fieldName)) { - deserializedPrivateEndpointOutboundRule.type = RuleType.fromString(reader.getString()); - } else if ("destination".equals(fieldName)) { - deserializedPrivateEndpointOutboundRule.destination = PrivateEndpointDestination.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointOutboundRule; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointResource.java deleted file mode 100644 index d6cf70a8406b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointResource.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The PE network resource that is linked to this PE connection. - */ -@Fluent -public final class PrivateEndpointResource extends PrivateEndpoint { - /* - * The subnetId that the private endpoint is connected to. - */ - private String subnetArmId; - - /* - * The ARM identifier for Private Endpoint - */ - private String id; - - /** - * Creates an instance of PrivateEndpointResource class. - */ - public PrivateEndpointResource() { - } - - /** - * Get the subnetArmId property: The subnetId that the private endpoint is connected to. - * - * @return the subnetArmId value. - */ - public String subnetArmId() { - return this.subnetArmId; - } - - /** - * Set the subnetArmId property: The subnetId that the private endpoint is connected to. - * - * @param subnetArmId the subnetArmId value to set. - * @return the PrivateEndpointResource object itself. - */ - public PrivateEndpointResource withSubnetArmId(String subnetArmId) { - this.subnetArmId = subnetArmId; - return this; - } - - /** - * Get the id property: The ARM identifier for Private Endpoint. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("subnetArmId", this.subnetArmId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointResource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointResource if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateEndpointResource. - */ - public static PrivateEndpointResource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointResource deserializedPrivateEndpointResource = new PrivateEndpointResource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateEndpointResource.id = reader.getString(); - } else if ("subnetArmId".equals(fieldName)) { - deserializedPrivateEndpointResource.subnetArmId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointResource; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java deleted file mode 100644 index 3b384798802f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The private endpoint connection status. - */ -public final class PrivateEndpointServiceConnectionStatus - extends ExpandableStringEnum { - /** - * Static value Pending for PrivateEndpointServiceConnectionStatus. - */ - public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); - - /** - * Static value Approved for PrivateEndpointServiceConnectionStatus. - */ - public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); - - /** - * Static value Rejected for PrivateEndpointServiceConnectionStatus. - */ - public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); - - /** - * Static value Disconnected for PrivateEndpointServiceConnectionStatus. - */ - public static final PrivateEndpointServiceConnectionStatus DISCONNECTED = fromString("Disconnected"); - - /** - * Static value Timeout for PrivateEndpointServiceConnectionStatus. - */ - public static final PrivateEndpointServiceConnectionStatus TIMEOUT = fromString("Timeout"); - - /** - * Creates a new instance of PrivateEndpointServiceConnectionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PrivateEndpointServiceConnectionStatus() { - } - - /** - * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateEndpointServiceConnectionStatus. - */ - public static PrivateEndpointServiceConnectionStatus fromString(String name) { - return fromString(name, PrivateEndpointServiceConnectionStatus.class); - } - - /** - * Gets known PrivateEndpointServiceConnectionStatus values. - * - * @return known PrivateEndpointServiceConnectionStatus values. - */ - public static Collection values() { - return values(PrivateEndpointServiceConnectionStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResource.java deleted file mode 100644 index 415c63c8ae50..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResource.java +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceProperties; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * A private link resource. - */ -@Fluent -public final class PrivateLinkResource extends ProxyResource { - /* - * Resource properties. - */ - private PrivateLinkResourceProperties innerProperties; - - /* - * The identity of the resource. - */ - private ManagedServiceIdentity identity; - - /* - * Specifies the location of the resource. - */ - private String location; - - /* - * Contains resource tags defined as key/value pairs. - */ - private Map tags; - - /* - * The sku of the workspace. - */ - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of PrivateLinkResource class. - */ - public PrivateLinkResource() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private PrivateLinkResourceProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the PrivateLinkResource object itself. - */ - public PrivateLinkResource withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the location property: Specifies the location of the resource. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Specifies the location of the resource. - * - * @param location the location value to set. - * @return the PrivateLinkResource object itself. - */ - public PrivateLinkResource withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the tags property: Contains resource tags defined as key/value pairs. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Contains resource tags defined as key/value pairs. - * - * @param tags the tags value to set. - * @return the PrivateLinkResource object itself. - */ - public PrivateLinkResource withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the sku property: The sku of the workspace. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the PrivateLinkResource object itself. - */ - public PrivateLinkResource withSku(Sku sku) { - this.sku = sku; - 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; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - public String groupId() { - return this.innerProperties() == null ? null : this.innerProperties().groupId(); - } - - /** - * Get the requiredMembers property: The private link resource required member names. - * - * @return the requiredMembers value. - */ - public List requiredMembers() { - return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); - } - - /** - * Get the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @return the requiredZoneNames value. - */ - public List requiredZoneNames() { - return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); - } - - /** - * Set the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResource object itself. - */ - public PrivateLinkResource withRequiredZoneNames(List requiredZoneNames) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateLinkResourceProperties(); - } - this.innerProperties().withRequiredZoneNames(requiredZoneNames); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("sku", this.sku); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResource if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateLinkResource. - */ - public static PrivateLinkResource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResource deserializedPrivateLinkResource = new PrivateLinkResource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateLinkResource.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPrivateLinkResource.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPrivateLinkResource.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedPrivateLinkResource.innerProperties = PrivateLinkResourceProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedPrivateLinkResource.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedPrivateLinkResource.location = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPrivateLinkResource.tags = tags; - } else if ("sku".equals(fieldName)) { - deserializedPrivateLinkResource.sku = Sku.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedPrivateLinkResource.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResource; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResourceListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResourceListResult.java deleted file mode 100644 index b160ef185afd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResourceListResult.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; -import java.util.List; - -/** - * An immutable client-side representation of PrivateLinkResourceListResult. - */ -public interface PrivateLinkResourceListResult { - /** - * Gets the value property: Array of private link resources. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner object. - * - * @return the inner object. - */ - PrivateLinkResourceListResultInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.java deleted file mode 100644 index 2ea81b90bfc3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.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.machinelearning.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of PrivateLinkResources. - */ -public interface PrivateLinkResources { - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 private link resources that need to be created for a workspace along with {@link Response}. - */ - Response listWithResponse(String resourceGroupName, String workspaceName, - Context context); - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 private link resources that need to be created for a workspace. - */ - PrivateLinkResourceListResult list(String resourceGroupName, String workspaceName); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java deleted file mode 100644 index d1c7df0093f0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A collection of information about the state of the connection between service consumer and provider. - */ -@Fluent -public final class PrivateLinkServiceConnectionState implements JsonSerializable { - /* - * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. - */ - private PrivateEndpointServiceConnectionStatus status; - - /* - * The reason for approval/rejection of the connection. - */ - private String description; - - /* - * A message indicating if changes on the service provider require any updates on the consumer. - */ - private String actionsRequired; - - /** - * Creates an instance of PrivateLinkServiceConnectionState class. - */ - public PrivateLinkServiceConnectionState() { - } - - /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @return the status value. - */ - public PrivateEndpointServiceConnectionStatus status() { - return this.status; - } - - /** - * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @param status the status value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) { - this.status = status; - return this; - } - - /** - * Get the description property: The reason for approval/rejection of the connection. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The reason for approval/rejection of the connection. - * - * @param description the description value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. - * - * @return the actionsRequired value. - */ - public String actionsRequired() { - return this.actionsRequired; - } - - /** - * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. - * - * @param actionsRequired the actionsRequired value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { - this.actionsRequired = actionsRequired; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("actionsRequired", this.actionsRequired); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkServiceConnectionState from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkServiceConnectionState if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateLinkServiceConnectionState. - */ - public static PrivateLinkServiceConnectionState fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkServiceConnectionState deserializedPrivateLinkServiceConnectionState - = new PrivateLinkServiceConnectionState(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.status - = PrivateEndpointServiceConnectionStatus.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.description = reader.getString(); - } else if ("actionsRequired".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.actionsRequired = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkServiceConnectionState; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java deleted file mode 100644 index 58138c8e36c3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; - -/** - * Deployment container liveness/readiness probe configuration. - */ -@Fluent -public final class ProbeSettings implements JsonSerializable { - /* - * The number of failures to allow before returning an unhealthy status. - */ - private Integer failureThreshold; - - /* - * The number of successful probes before returning a healthy status. - */ - private Integer successThreshold; - - /* - * The probe timeout in ISO 8601 format. - */ - private Duration timeout; - - /* - * The length of time between probes in ISO 8601 format. - */ - private Duration period; - - /* - * The delay before the first probe in ISO 8601 format. - */ - private Duration initialDelay; - - /** - * Creates an instance of ProbeSettings class. - */ - public ProbeSettings() { - } - - /** - * Get the failureThreshold property: The number of failures to allow before returning an unhealthy status. - * - * @return the failureThreshold value. - */ - public Integer failureThreshold() { - return this.failureThreshold; - } - - /** - * Set the failureThreshold property: The number of failures to allow before returning an unhealthy status. - * - * @param failureThreshold the failureThreshold value to set. - * @return the ProbeSettings object itself. - */ - public ProbeSettings withFailureThreshold(Integer failureThreshold) { - this.failureThreshold = failureThreshold; - return this; - } - - /** - * Get the successThreshold property: The number of successful probes before returning a healthy status. - * - * @return the successThreshold value. - */ - public Integer successThreshold() { - return this.successThreshold; - } - - /** - * Set the successThreshold property: The number of successful probes before returning a healthy status. - * - * @param successThreshold the successThreshold value to set. - * @return the ProbeSettings object itself. - */ - public ProbeSettings withSuccessThreshold(Integer successThreshold) { - this.successThreshold = successThreshold; - return this; - } - - /** - * Get the timeout property: The probe timeout in ISO 8601 format. - * - * @return the timeout value. - */ - public Duration timeout() { - return this.timeout; - } - - /** - * Set the timeout property: The probe timeout in ISO 8601 format. - * - * @param timeout the timeout value to set. - * @return the ProbeSettings object itself. - */ - public ProbeSettings withTimeout(Duration timeout) { - this.timeout = timeout; - return this; - } - - /** - * Get the period property: The length of time between probes in ISO 8601 format. - * - * @return the period value. - */ - public Duration period() { - return this.period; - } - - /** - * Set the period property: The length of time between probes in ISO 8601 format. - * - * @param period the period value to set. - * @return the ProbeSettings object itself. - */ - public ProbeSettings withPeriod(Duration period) { - this.period = period; - return this; - } - - /** - * Get the initialDelay property: The delay before the first probe in ISO 8601 format. - * - * @return the initialDelay value. - */ - public Duration initialDelay() { - return this.initialDelay; - } - - /** - * Set the initialDelay property: The delay before the first probe in ISO 8601 format. - * - * @param initialDelay the initialDelay value to set. - * @return the ProbeSettings object itself. - */ - public ProbeSettings withInitialDelay(Duration initialDelay) { - this.initialDelay = initialDelay; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("failureThreshold", this.failureThreshold); - jsonWriter.writeNumberField("successThreshold", this.successThreshold); - jsonWriter.writeStringField("timeout", CoreUtils.durationToStringWithDays(this.timeout)); - jsonWriter.writeStringField("period", CoreUtils.durationToStringWithDays(this.period)); - jsonWriter.writeStringField("initialDelay", CoreUtils.durationToStringWithDays(this.initialDelay)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProbeSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProbeSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ProbeSettings. - */ - public static ProbeSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProbeSettings deserializedProbeSettings = new ProbeSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("failureThreshold".equals(fieldName)) { - deserializedProbeSettings.failureThreshold = reader.getNullable(JsonReader::getInt); - } else if ("successThreshold".equals(fieldName)) { - deserializedProbeSettings.successThreshold = reader.getNullable(JsonReader::getInt); - } else if ("timeout".equals(fieldName)) { - deserializedProbeSettings.timeout - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("period".equals(fieldName)) { - deserializedProbeSettings.period - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("initialDelay".equals(fieldName)) { - deserializedProbeSettings.initialDelay - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedProbeSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.java deleted file mode 100644 index f7acb8827758..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Endpoint Communication Protocol - * - * Protocol over which communication will happen over this endpoint. - */ -public final class Protocol extends ExpandableStringEnum { - /** - * Static value tcp for Protocol. - */ - public static final Protocol TCP = fromString("tcp"); - - /** - * Static value udp for Protocol. - */ - public static final Protocol UDP = fromString("udp"); - - /** - * Static value http for Protocol. - */ - public static final Protocol HTTP = fromString("http"); - - /** - * Creates a new instance of Protocol value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Protocol() { - } - - /** - * Creates or finds a Protocol from its string representation. - * - * @param name a name to look for. - * @return the corresponding Protocol. - */ - public static Protocol fromString(String name) { - return fromString(name, Protocol.class); - } - - /** - * Gets known Protocol values. - * - * @return known Protocol values. - */ - public static Collection values() { - return values(Protocol.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.java deleted file mode 100644 index 8b9f3f919d3d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The current deployment state of workspace resource. The provisioningState is to indicate states for resource - * provisioning. - */ -public final class ProvisioningState extends ExpandableStringEnum { - /** - * Static value Unknown for ProvisioningState. - */ - public static final ProvisioningState UNKNOWN = fromString("Unknown"); - - /** - * Static value Updating for ProvisioningState. - */ - public static final ProvisioningState UPDATING = fromString("Updating"); - - /** - * Static value Creating for ProvisioningState. - */ - public static final ProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Deleting for ProvisioningState. - */ - public static final ProvisioningState DELETING = fromString("Deleting"); - - /** - * Static value Succeeded for ProvisioningState. - */ - public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for ProvisioningState. - */ - public static final ProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for ProvisioningState. - */ - public static final ProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of ProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ProvisioningState() { - } - - /** - * Creates or finds a ProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProvisioningState. - */ - public static ProvisioningState fromString(String name) { - return fromString(name, ProvisioningState.class); - } - - /** - * Gets known ProvisioningState values. - * - * @return known ProvisioningState values. - */ - public static Collection values() { - return values(ProvisioningState.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.java deleted file mode 100644 index 7f648d1e4ef5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The current deployment state of schedule. - */ -public final class ProvisioningStatus extends ExpandableStringEnum { - /** - * Static value Completed for ProvisioningStatus. - */ - public static final ProvisioningStatus COMPLETED = fromString("Completed"); - - /** - * Static value Provisioning for ProvisioningStatus. - */ - public static final ProvisioningStatus PROVISIONING = fromString("Provisioning"); - - /** - * Static value Failed for ProvisioningStatus. - */ - public static final ProvisioningStatus FAILED = fromString("Failed"); - - /** - * Creates a new instance of ProvisioningStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ProvisioningStatus() { - } - - /** - * Creates or finds a ProvisioningStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProvisioningStatus. - */ - public static ProvisioningStatus fromString(String name) { - return fromString(name, ProvisioningStatus.class); - } - - /** - * Gets known ProvisioningStatus values. - * - * @return known ProvisioningStatus values. - */ - public static Collection values() { - return values(ProvisioningStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.java deleted file mode 100644 index fc4f3647534e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Whether requests from Public Network are allowed. - */ -public final class PublicNetworkAccess extends ExpandableStringEnum { - /** - * Static value Enabled for PublicNetworkAccess. - */ - public static final PublicNetworkAccess ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for PublicNetworkAccess. - */ - public static final PublicNetworkAccess DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of PublicNetworkAccess value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PublicNetworkAccess() { - } - - /** - * Creates or finds a PublicNetworkAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicNetworkAccess. - */ - public static PublicNetworkAccess fromString(String name) { - return fromString(name, PublicNetworkAccess.class); - } - - /** - * Gets known PublicNetworkAccess values. - * - * @return known PublicNetworkAccess values. - */ - public static Collection values() { - return values(PublicNetworkAccess.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccessType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccessType.java deleted file mode 100644 index 631d09e2877e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccessType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine whether PublicNetworkAccess is Enabled or Disabled. - */ -public final class PublicNetworkAccessType extends ExpandableStringEnum { - /** - * Static value Enabled for PublicNetworkAccessType. - */ - public static final PublicNetworkAccessType ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for PublicNetworkAccessType. - */ - public static final PublicNetworkAccessType DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of PublicNetworkAccessType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PublicNetworkAccessType() { - } - - /** - * Creates or finds a PublicNetworkAccessType from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicNetworkAccessType. - */ - public static PublicNetworkAccessType fromString(String name) { - return fromString(name, PublicNetworkAccessType.class); - } - - /** - * Gets known PublicNetworkAccessType values. - * - * @return known PublicNetworkAccessType values. - */ - public static Collection values() { - return values(PublicNetworkAccessType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java deleted file mode 100644 index 6f0ada746ac7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * PyTorch distribution configuration. - */ -@Fluent -public final class PyTorch extends DistributionConfiguration { - /* - * [Required] Specifies the type of distribution framework. - */ - private DistributionType distributionType = DistributionType.PY_TORCH; - - /* - * Number of processes per node. - */ - private Integer processCountPerInstance; - - /** - * Creates an instance of PyTorch class. - */ - public PyTorch() { - } - - /** - * Get the distributionType property: [Required] Specifies the type of distribution framework. - * - * @return the distributionType value. - */ - @Override - public DistributionType distributionType() { - return this.distributionType; - } - - /** - * Get the processCountPerInstance property: Number of processes per node. - * - * @return the processCountPerInstance value. - */ - public Integer processCountPerInstance() { - return this.processCountPerInstance; - } - - /** - * Set the processCountPerInstance property: Number of processes per node. - * - * @param processCountPerInstance the processCountPerInstance value to set. - * @return the PyTorch object itself. - */ - public PyTorch withProcessCountPerInstance(Integer processCountPerInstance) { - this.processCountPerInstance = processCountPerInstance; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("distributionType", - this.distributionType == null ? null : this.distributionType.toString()); - jsonWriter.writeNumberField("processCountPerInstance", this.processCountPerInstance); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PyTorch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PyTorch if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the PyTorch. - */ - public static PyTorch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PyTorch deserializedPyTorch = new PyTorch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("distributionType".equals(fieldName)) { - deserializedPyTorch.distributionType = DistributionType.fromString(reader.getString()); - } else if ("processCountPerInstance".equals(fieldName)) { - deserializedPyTorch.processCountPerInstance = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedPyTorch; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QueueSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QueueSettings.java deleted file mode 100644 index 5bd3b4d276fb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QueueSettings.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The QueueSettings model. - */ -@Fluent -public final class QueueSettings implements JsonSerializable { - /* - * Controls the compute job tier - */ - private JobTier jobTier; - - /** - * Creates an instance of QueueSettings class. - */ - public QueueSettings() { - } - - /** - * Get the jobTier property: Controls the compute job tier. - * - * @return the jobTier value. - */ - public JobTier jobTier() { - return this.jobTier; - } - - /** - * Set the jobTier property: Controls the compute job tier. - * - * @param jobTier the jobTier value to set. - * @return the QueueSettings object itself. - */ - public QueueSettings withJobTier(JobTier jobTier) { - this.jobTier = jobTier; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("jobTier", this.jobTier == null ? null : this.jobTier.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of QueueSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of QueueSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the QueueSettings. - */ - public static QueueSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - QueueSettings deserializedQueueSettings = new QueueSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobTier".equals(fieldName)) { - deserializedQueueSettings.jobTier = JobTier.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedQueueSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaBaseProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaBaseProperties.java deleted file mode 100644 index 7d81d8d5435b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaBaseProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The properties for Quota update or retrieval. - */ -@Fluent -public final class QuotaBaseProperties implements JsonSerializable { - /* - * Specifies the resource ID. - */ - private String id; - - /* - * Specifies the resource type. - */ - private String type; - - /* - * The maximum permitted quota of the resource. - */ - private Long limit; - - /* - * An enum describing the unit of quota measurement. - */ - private QuotaUnit unit; - - /** - * Creates an instance of QuotaBaseProperties class. - */ - public QuotaBaseProperties() { - } - - /** - * Get the id property: Specifies the resource ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Specifies the resource ID. - * - * @param id the id value to set. - * @return the QuotaBaseProperties object itself. - */ - public QuotaBaseProperties withId(String id) { - this.id = id; - return this; - } - - /** - * Get the type property: Specifies the resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Specifies the resource type. - * - * @param type the type value to set. - * @return the QuotaBaseProperties object itself. - */ - public QuotaBaseProperties withType(String type) { - this.type = type; - return this; - } - - /** - * Get the limit property: The maximum permitted quota of the resource. - * - * @return the limit value. - */ - public Long limit() { - return this.limit; - } - - /** - * Set the limit property: The maximum permitted quota of the resource. - * - * @param limit the limit value to set. - * @return the QuotaBaseProperties object itself. - */ - public QuotaBaseProperties withLimit(Long limit) { - this.limit = limit; - return this; - } - - /** - * Get the unit property: An enum describing the unit of quota measurement. - * - * @return the unit value. - */ - public QuotaUnit unit() { - return this.unit; - } - - /** - * Set the unit property: An enum describing the unit of quota measurement. - * - * @param unit the unit value to set. - * @return the QuotaBaseProperties object itself. - */ - public QuotaBaseProperties withUnit(QuotaUnit unit) { - this.unit = unit; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("type", this.type); - jsonWriter.writeNumberField("limit", this.limit); - jsonWriter.writeStringField("unit", this.unit == null ? null : this.unit.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of QuotaBaseProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of QuotaBaseProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the QuotaBaseProperties. - */ - public static QuotaBaseProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - QuotaBaseProperties deserializedQuotaBaseProperties = new QuotaBaseProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedQuotaBaseProperties.id = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedQuotaBaseProperties.type = reader.getString(); - } else if ("limit".equals(fieldName)) { - deserializedQuotaBaseProperties.limit = reader.getNullable(JsonReader::getLong); - } else if ("unit".equals(fieldName)) { - deserializedQuotaBaseProperties.unit = QuotaUnit.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedQuotaBaseProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUnit.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUnit.java deleted file mode 100644 index 50e13f334ad5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUnit.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * An enum describing the unit of quota measurement. - */ -public final class QuotaUnit extends ExpandableStringEnum { - /** - * Static value Count for QuotaUnit. - */ - public static final QuotaUnit COUNT = fromString("Count"); - - /** - * Creates a new instance of QuotaUnit value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public QuotaUnit() { - } - - /** - * Creates or finds a QuotaUnit from its string representation. - * - * @param name a name to look for. - * @return the corresponding QuotaUnit. - */ - public static QuotaUnit fromString(String name) { - return fromString(name, QuotaUnit.class); - } - - /** - * Gets known QuotaUnit values. - * - * @return known QuotaUnit values. - */ - public static Collection values() { - return values(QuotaUnit.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUpdateParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUpdateParameters.java deleted file mode 100644 index b09e708f4676..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUpdateParameters.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Quota update parameters. - */ -@Fluent -public final class QuotaUpdateParameters implements JsonSerializable { - /* - * The list for update quota. - */ - private List value; - - /* - * Region of workspace quota to be updated. - */ - private String location; - - /** - * Creates an instance of QuotaUpdateParameters class. - */ - public QuotaUpdateParameters() { - } - - /** - * Get the value property: The list for update quota. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list for update quota. - * - * @param value the value value to set. - * @return the QuotaUpdateParameters object itself. - */ - public QuotaUpdateParameters withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the location property: Region of workspace quota to be updated. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Region of workspace quota to be updated. - * - * @param location the location value to set. - * @return the QuotaUpdateParameters object itself. - */ - public QuotaUpdateParameters withLocation(String location) { - this.location = location; - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of QuotaUpdateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of QuotaUpdateParameters if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the QuotaUpdateParameters. - */ - public static QuotaUpdateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - QuotaUpdateParameters deserializedQuotaUpdateParameters = new QuotaUpdateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> QuotaBaseProperties.fromJson(reader1)); - deserializedQuotaUpdateParameters.value = value; - } else if ("location".equals(fieldName)) { - deserializedQuotaUpdateParameters.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedQuotaUpdateParameters; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.java deleted file mode 100644 index e8d4b6a08c8c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.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.machinelearning.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 Quotas. - */ -public interface Quotas { - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @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 result of update workspace quota along with {@link Response}. - */ - Response updateWithResponse(String location, QuotaUpdateParameters parameters, - Context context); - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @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 result of update workspace quota. - */ - UpdateWorkspaceQuotasResult update(String location, QuotaUpdateParameters parameters); - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @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 currently assigned Workspace Quotas based on VMFamily as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String location); - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @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 currently assigned Workspace Quotas based on VMFamily as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String location, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java deleted file mode 100644 index cad825a4e399..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines a Sampling Algorithm that generates values randomly. - */ -@Fluent -public final class RandomSamplingAlgorithm extends SamplingAlgorithm { - /* - * [Required] The algorithm used for generating hyperparameter values, along with configuration properties - */ - private SamplingAlgorithmType samplingAlgorithmType = SamplingAlgorithmType.RANDOM; - - /* - * An optional integer to use as the seed for random number generation - */ - private Integer seed; - - /* - * The specific type of random algorithm - */ - private RandomSamplingAlgorithmRule rule; - - /** - * Creates an instance of RandomSamplingAlgorithm class. - */ - public RandomSamplingAlgorithm() { - } - - /** - * Get the samplingAlgorithmType property: [Required] The algorithm used for generating hyperparameter values, along - * with configuration properties. - * - * @return the samplingAlgorithmType value. - */ - @Override - public SamplingAlgorithmType samplingAlgorithmType() { - return this.samplingAlgorithmType; - } - - /** - * Get the seed property: An optional integer to use as the seed for random number generation. - * - * @return the seed value. - */ - public Integer seed() { - return this.seed; - } - - /** - * Set the seed property: An optional integer to use as the seed for random number generation. - * - * @param seed the seed value to set. - * @return the RandomSamplingAlgorithm object itself. - */ - public RandomSamplingAlgorithm withSeed(Integer seed) { - this.seed = seed; - return this; - } - - /** - * Get the rule property: The specific type of random algorithm. - * - * @return the rule value. - */ - public RandomSamplingAlgorithmRule rule() { - return this.rule; - } - - /** - * Set the rule property: The specific type of random algorithm. - * - * @param rule the rule value to set. - * @return the RandomSamplingAlgorithm object itself. - */ - public RandomSamplingAlgorithm withRule(RandomSamplingAlgorithmRule rule) { - this.rule = rule; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("samplingAlgorithmType", - this.samplingAlgorithmType == null ? null : this.samplingAlgorithmType.toString()); - jsonWriter.writeNumberField("seed", this.seed); - jsonWriter.writeStringField("rule", this.rule == null ? null : this.rule.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RandomSamplingAlgorithm from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RandomSamplingAlgorithm if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the RandomSamplingAlgorithm. - */ - public static RandomSamplingAlgorithm fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RandomSamplingAlgorithm deserializedRandomSamplingAlgorithm = new RandomSamplingAlgorithm(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("samplingAlgorithmType".equals(fieldName)) { - deserializedRandomSamplingAlgorithm.samplingAlgorithmType - = SamplingAlgorithmType.fromString(reader.getString()); - } else if ("seed".equals(fieldName)) { - deserializedRandomSamplingAlgorithm.seed = reader.getNullable(JsonReader::getInt); - } else if ("rule".equals(fieldName)) { - deserializedRandomSamplingAlgorithm.rule - = RandomSamplingAlgorithmRule.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedRandomSamplingAlgorithm; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.java deleted file mode 100644 index 6cce58bfa30c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The specific type of random algorithm. - */ -public final class RandomSamplingAlgorithmRule extends ExpandableStringEnum { - /** - * Static value Random for RandomSamplingAlgorithmRule. - */ - public static final RandomSamplingAlgorithmRule RANDOM = fromString("Random"); - - /** - * Static value Sobol for RandomSamplingAlgorithmRule. - */ - public static final RandomSamplingAlgorithmRule SOBOL = fromString("Sobol"); - - /** - * Creates a new instance of RandomSamplingAlgorithmRule value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RandomSamplingAlgorithmRule() { - } - - /** - * Creates or finds a RandomSamplingAlgorithmRule from its string representation. - * - * @param name a name to look for. - * @return the corresponding RandomSamplingAlgorithmRule. - */ - public static RandomSamplingAlgorithmRule fromString(String name) { - return fromString(name, RandomSamplingAlgorithmRule.class); - } - - /** - * Gets known RandomSamplingAlgorithmRule values. - * - * @return known RandomSamplingAlgorithmRule values. - */ - public static Collection values() { - return values(RandomSamplingAlgorithmRule.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java deleted file mode 100644 index de9fb39fe4c8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The workflow trigger recurrence for ComputeStartStop schedule type. - */ -@Fluent -public final class Recurrence implements JsonSerializable { - /* - * [Required] The frequency to trigger schedule. - */ - private ComputeRecurrenceFrequency frequency; - - /* - * [Required] Specifies schedule interval in conjunction with frequency - */ - private Integer interval; - - /* - * The start time in yyyy-MM-ddTHH:mm:ss format. - */ - private String startTime; - - /* - * Specifies time zone in which the schedule runs. - * TimeZone should follow Windows time zone format. Refer: - * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 - */ - private String timeZone; - - /* - * [Required] The recurrence schedule. - */ - private ComputeRecurrenceSchedule schedule; - - /** - * Creates an instance of Recurrence class. - */ - public Recurrence() { - } - - /** - * Get the frequency property: [Required] The frequency to trigger schedule. - * - * @return the frequency value. - */ - public ComputeRecurrenceFrequency frequency() { - return this.frequency; - } - - /** - * Set the frequency property: [Required] The frequency to trigger schedule. - * - * @param frequency the frequency value to set. - * @return the Recurrence object itself. - */ - public Recurrence withFrequency(ComputeRecurrenceFrequency frequency) { - this.frequency = frequency; - return this; - } - - /** - * Get the interval property: [Required] Specifies schedule interval in conjunction with frequency. - * - * @return the interval value. - */ - public Integer interval() { - return this.interval; - } - - /** - * Set the interval property: [Required] Specifies schedule interval in conjunction with frequency. - * - * @param interval the interval value to set. - * @return the Recurrence object itself. - */ - public Recurrence withInterval(Integer interval) { - this.interval = interval; - return this; - } - - /** - * Get the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format. - * - * @return the startTime value. - */ - public String startTime() { - return this.startTime; - } - - /** - * Set the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format. - * - * @param startTime the startTime value to set. - * @return the Recurrence object itself. - */ - public Recurrence withStartTime(String startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the timeZone property: Specifies time zone in which the schedule runs. - * TimeZone should follow Windows time zone format. Refer: - * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. - * - * @return the timeZone value. - */ - public String timeZone() { - return this.timeZone; - } - - /** - * Set the timeZone property: Specifies time zone in which the schedule runs. - * TimeZone should follow Windows time zone format. Refer: - * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. - * - * @param timeZone the timeZone value to set. - * @return the Recurrence object itself. - */ - public Recurrence withTimeZone(String timeZone) { - this.timeZone = timeZone; - return this; - } - - /** - * Get the schedule property: [Required] The recurrence schedule. - * - * @return the schedule value. - */ - public ComputeRecurrenceSchedule schedule() { - return this.schedule; - } - - /** - * Set the schedule property: [Required] The recurrence schedule. - * - * @param schedule the schedule value to set. - * @return the Recurrence object itself. - */ - public Recurrence withSchedule(ComputeRecurrenceSchedule schedule) { - this.schedule = schedule; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (schedule() != null) { - schedule().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("frequency", this.frequency == null ? null : this.frequency.toString()); - jsonWriter.writeNumberField("interval", this.interval); - jsonWriter.writeStringField("startTime", this.startTime); - jsonWriter.writeStringField("timeZone", this.timeZone); - jsonWriter.writeJsonField("schedule", this.schedule); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Recurrence from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Recurrence if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the Recurrence. - */ - public static Recurrence fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Recurrence deserializedRecurrence = new Recurrence(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("frequency".equals(fieldName)) { - deserializedRecurrence.frequency = ComputeRecurrenceFrequency.fromString(reader.getString()); - } else if ("interval".equals(fieldName)) { - deserializedRecurrence.interval = reader.getNullable(JsonReader::getInt); - } else if ("startTime".equals(fieldName)) { - deserializedRecurrence.startTime = reader.getString(); - } else if ("timeZone".equals(fieldName)) { - deserializedRecurrence.timeZone = reader.getString(); - } else if ("schedule".equals(fieldName)) { - deserializedRecurrence.schedule = ComputeRecurrenceSchedule.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRecurrence; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.java deleted file mode 100644 index cb1d13b76703..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to describe the frequency of a recurrence schedule. - */ -public final class RecurrenceFrequency extends ExpandableStringEnum { - /** - * Static value Minute for RecurrenceFrequency. - */ - public static final RecurrenceFrequency MINUTE = fromString("Minute"); - - /** - * Static value Hour for RecurrenceFrequency. - */ - public static final RecurrenceFrequency HOUR = fromString("Hour"); - - /** - * Static value Day for RecurrenceFrequency. - */ - public static final RecurrenceFrequency DAY = fromString("Day"); - - /** - * Static value Week for RecurrenceFrequency. - */ - public static final RecurrenceFrequency WEEK = fromString("Week"); - - /** - * Static value Month for RecurrenceFrequency. - */ - public static final RecurrenceFrequency MONTH = fromString("Month"); - - /** - * Creates a new instance of RecurrenceFrequency value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RecurrenceFrequency() { - } - - /** - * Creates or finds a RecurrenceFrequency from its string representation. - * - * @param name a name to look for. - * @return the corresponding RecurrenceFrequency. - */ - public static RecurrenceFrequency fromString(String name) { - return fromString(name, RecurrenceFrequency.class); - } - - /** - * Gets known RecurrenceFrequency values. - * - * @return known RecurrenceFrequency values. - */ - public static Collection values() { - return values(RecurrenceFrequency.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.java deleted file mode 100644 index 4572b77f814a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The RecurrenceSchedule model. - */ -@Fluent -public final class RecurrenceSchedule implements JsonSerializable { - /* - * [Required] List of hours for the schedule. - */ - private List hours; - - /* - * [Required] List of minutes for the schedule. - */ - private List minutes; - - /* - * List of days for the schedule. - */ - private List weekDays; - - /* - * List of month days for the schedule - */ - private List monthDays; - - /** - * Creates an instance of RecurrenceSchedule class. - */ - public RecurrenceSchedule() { - } - - /** - * Get the hours property: [Required] List of hours for the schedule. - * - * @return the hours value. - */ - public List hours() { - return this.hours; - } - - /** - * Set the hours property: [Required] List of hours for the schedule. - * - * @param hours the hours value to set. - * @return the RecurrenceSchedule object itself. - */ - public RecurrenceSchedule withHours(List hours) { - this.hours = hours; - return this; - } - - /** - * Get the minutes property: [Required] List of minutes for the schedule. - * - * @return the minutes value. - */ - public List minutes() { - return this.minutes; - } - - /** - * Set the minutes property: [Required] List of minutes for the schedule. - * - * @param minutes the minutes value to set. - * @return the RecurrenceSchedule object itself. - */ - public RecurrenceSchedule withMinutes(List minutes) { - this.minutes = minutes; - return this; - } - - /** - * Get the weekDays property: List of days for the schedule. - * - * @return the weekDays value. - */ - public List weekDays() { - return this.weekDays; - } - - /** - * Set the weekDays property: List of days for the schedule. - * - * @param weekDays the weekDays value to set. - * @return the RecurrenceSchedule object itself. - */ - public RecurrenceSchedule withWeekDays(List weekDays) { - this.weekDays = weekDays; - return this; - } - - /** - * Get the monthDays property: List of month days for the schedule. - * - * @return the monthDays value. - */ - public List monthDays() { - return this.monthDays; - } - - /** - * Set the monthDays property: List of month days for the schedule. - * - * @param monthDays the monthDays value to set. - * @return the RecurrenceSchedule object itself. - */ - public RecurrenceSchedule withMonthDays(List monthDays) { - this.monthDays = monthDays; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (hours() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property hours in model RecurrenceSchedule")); - } - if (minutes() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property minutes in model RecurrenceSchedule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecurrenceSchedule.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("hours", this.hours, (writer, element) -> writer.writeInt(element)); - jsonWriter.writeArrayField("minutes", this.minutes, (writer, element) -> writer.writeInt(element)); - jsonWriter.writeArrayField("weekDays", this.weekDays, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeArrayField("monthDays", this.monthDays, (writer, element) -> writer.writeInt(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecurrenceSchedule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecurrenceSchedule if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecurrenceSchedule. - */ - public static RecurrenceSchedule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecurrenceSchedule deserializedRecurrenceSchedule = new RecurrenceSchedule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("hours".equals(fieldName)) { - List hours = reader.readArray(reader1 -> reader1.getInt()); - deserializedRecurrenceSchedule.hours = hours; - } else if ("minutes".equals(fieldName)) { - List minutes = reader.readArray(reader1 -> reader1.getInt()); - deserializedRecurrenceSchedule.minutes = minutes; - } else if ("weekDays".equals(fieldName)) { - List weekDays = reader.readArray(reader1 -> WeekDay.fromString(reader1.getString())); - deserializedRecurrenceSchedule.weekDays = weekDays; - } else if ("monthDays".equals(fieldName)) { - List monthDays = reader.readArray(reader1 -> reader1.getInt()); - deserializedRecurrenceSchedule.monthDays = monthDays; - } else { - reader.skipChildren(); - } - } - - return deserializedRecurrenceSchedule; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java deleted file mode 100644 index e1c1b4c80f86..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The RecurrenceTrigger model. - */ -@Fluent -public final class RecurrenceTrigger extends TriggerBase { - /* - * [Required] - */ - private TriggerType triggerType = TriggerType.RECURRENCE; - - /* - * [Required] The frequency to trigger schedule. - */ - private RecurrenceFrequency frequency; - - /* - * [Required] Specifies schedule interval in conjunction with frequency - */ - private int interval; - - /* - * The recurrence schedule. - */ - private RecurrenceSchedule schedule; - - /** - * Creates an instance of RecurrenceTrigger class. - */ - public RecurrenceTrigger() { - } - - /** - * Get the triggerType property: [Required]. - * - * @return the triggerType value. - */ - @Override - public TriggerType triggerType() { - return this.triggerType; - } - - /** - * Get the frequency property: [Required] The frequency to trigger schedule. - * - * @return the frequency value. - */ - public RecurrenceFrequency frequency() { - return this.frequency; - } - - /** - * Set the frequency property: [Required] The frequency to trigger schedule. - * - * @param frequency the frequency value to set. - * @return the RecurrenceTrigger object itself. - */ - public RecurrenceTrigger withFrequency(RecurrenceFrequency frequency) { - this.frequency = frequency; - return this; - } - - /** - * Get the interval property: [Required] Specifies schedule interval in conjunction with frequency. - * - * @return the interval value. - */ - public int interval() { - return this.interval; - } - - /** - * Set the interval property: [Required] Specifies schedule interval in conjunction with frequency. - * - * @param interval the interval value to set. - * @return the RecurrenceTrigger object itself. - */ - public RecurrenceTrigger withInterval(int interval) { - this.interval = interval; - return this; - } - - /** - * Get the schedule property: The recurrence schedule. - * - * @return the schedule value. - */ - public RecurrenceSchedule schedule() { - return this.schedule; - } - - /** - * Set the schedule property: The recurrence schedule. - * - * @param schedule the schedule value to set. - * @return the RecurrenceTrigger object itself. - */ - public RecurrenceTrigger withSchedule(RecurrenceSchedule schedule) { - this.schedule = schedule; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RecurrenceTrigger withEndTime(String endTime) { - super.withEndTime(endTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RecurrenceTrigger withStartTime(String startTime) { - super.withStartTime(startTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RecurrenceTrigger withTimeZone(String timeZone) { - super.withTimeZone(timeZone); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (frequency() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property frequency in model RecurrenceTrigger")); - } - if (schedule() != null) { - schedule().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecurrenceTrigger.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("endTime", endTime()); - jsonWriter.writeStringField("startTime", startTime()); - jsonWriter.writeStringField("timeZone", timeZone()); - jsonWriter.writeStringField("frequency", this.frequency == null ? null : this.frequency.toString()); - jsonWriter.writeIntField("interval", this.interval); - jsonWriter.writeStringField("triggerType", this.triggerType == null ? null : this.triggerType.toString()); - jsonWriter.writeJsonField("schedule", this.schedule); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecurrenceTrigger from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecurrenceTrigger if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RecurrenceTrigger. - */ - public static RecurrenceTrigger fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecurrenceTrigger deserializedRecurrenceTrigger = new RecurrenceTrigger(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("endTime".equals(fieldName)) { - deserializedRecurrenceTrigger.withEndTime(reader.getString()); - } else if ("startTime".equals(fieldName)) { - deserializedRecurrenceTrigger.withStartTime(reader.getString()); - } else if ("timeZone".equals(fieldName)) { - deserializedRecurrenceTrigger.withTimeZone(reader.getString()); - } else if ("frequency".equals(fieldName)) { - deserializedRecurrenceTrigger.frequency = RecurrenceFrequency.fromString(reader.getString()); - } else if ("interval".equals(fieldName)) { - deserializedRecurrenceTrigger.interval = reader.getInt(); - } else if ("triggerType".equals(fieldName)) { - deserializedRecurrenceTrigger.triggerType = TriggerType.fromString(reader.getString()); - } else if ("schedule".equals(fieldName)) { - deserializedRecurrenceTrigger.schedule = RecurrenceSchedule.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRecurrenceTrigger; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java deleted file mode 100644 index 014a22993670..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine which reference method to use for an asset. - */ -public final class ReferenceType extends ExpandableStringEnum { - /** - * Static value Id for ReferenceType. - */ - public static final ReferenceType ID = fromString("Id"); - - /** - * Static value DataPath for ReferenceType. - */ - public static final ReferenceType DATA_PATH = fromString("DataPath"); - - /** - * Static value OutputPath for ReferenceType. - */ - public static final ReferenceType OUTPUT_PATH = fromString("OutputPath"); - - /** - * Creates a new instance of ReferenceType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ReferenceType() { - } - - /** - * Creates or finds a ReferenceType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ReferenceType. - */ - public static ReferenceType fromString(String name) { - return fromString(name, ReferenceType.class); - } - - /** - * Gets known ReferenceType values. - * - * @return known ReferenceType values. - */ - public static Collection values() { - return values(ReferenceType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateEndpointKeysRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateEndpointKeysRequest.java deleted file mode 100644 index 89c554b646d3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateEndpointKeysRequest.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The RegenerateEndpointKeysRequest model. - */ -@Fluent -public final class RegenerateEndpointKeysRequest implements JsonSerializable { - /* - * [Required] Specification for which type of key to generate. Primary or Secondary. - */ - private KeyType keyType; - - /* - * The value the key is set to. - */ - private String keyValue; - - /** - * Creates an instance of RegenerateEndpointKeysRequest class. - */ - public RegenerateEndpointKeysRequest() { - } - - /** - * Get the keyType property: [Required] Specification for which type of key to generate. Primary or Secondary. - * - * @return the keyType value. - */ - public KeyType keyType() { - return this.keyType; - } - - /** - * Set the keyType property: [Required] Specification for which type of key to generate. Primary or Secondary. - * - * @param keyType the keyType value to set. - * @return the RegenerateEndpointKeysRequest object itself. - */ - public RegenerateEndpointKeysRequest withKeyType(KeyType keyType) { - this.keyType = keyType; - return this; - } - - /** - * Get the keyValue property: The value the key is set to. - * - * @return the keyValue value. - */ - public String keyValue() { - return this.keyValue; - } - - /** - * Set the keyValue property: The value the key is set to. - * - * @param keyValue the keyValue value to set. - * @return the RegenerateEndpointKeysRequest object itself. - */ - public RegenerateEndpointKeysRequest withKeyValue(String keyValue) { - this.keyValue = keyValue; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyType in model RegenerateEndpointKeysRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RegenerateEndpointKeysRequest.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("keyType", this.keyType == null ? null : this.keyType.toString()); - jsonWriter.writeStringField("keyValue", this.keyValue); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegenerateEndpointKeysRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegenerateEndpointKeysRequest if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RegenerateEndpointKeysRequest. - */ - public static RegenerateEndpointKeysRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegenerateEndpointKeysRequest deserializedRegenerateEndpointKeysRequest - = new RegenerateEndpointKeysRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("keyType".equals(fieldName)) { - deserializedRegenerateEndpointKeysRequest.keyType = KeyType.fromString(reader.getString()); - } else if ("keyValue".equals(fieldName)) { - deserializedRegenerateEndpointKeysRequest.keyValue = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRegenerateEndpointKeysRequest; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.java deleted file mode 100644 index df1cd3c0bcf4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.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.machinelearning.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.machinelearning.fluent.models.RegistryInner; - -/** - * Resource collection API of Registries. - */ -public interface Registries { - /** - * List registries by subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List registries by subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * List registries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 a paginated list of Registry entities as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List registries. - * - * @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.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 a paginated list of Registry entities as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Delete registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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. - */ - void deleteByResourceGroup(String resourceGroupName, String registryName); - - /** - * Delete registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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. - */ - void delete(String resourceGroupName, String registryName, Context context); - - /** - * Get registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 registry along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, Context context); - - /** - * Get registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 registry. - */ - Registry getByResourceGroup(String resourceGroupName, String registryName); - - /** - * Remove regions from registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response. - */ - Registry removeRegions(String resourceGroupName, String registryName, RegistryInner body); - - /** - * Remove regions from registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 response. - */ - Registry removeRegions(String resourceGroupName, String registryName, RegistryInner body, Context context); - - /** - * Get registry. - * - * @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 registry along with {@link Response}. - */ - Registry getById(String id); - - /** - * Get registry. - * - * @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 registry along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete registry. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete registry. - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Registry resource. - * - * @param name resource name. - * @return the first stage of the new Registry definition. - */ - Registry.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registry.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registry.java deleted file mode 100644 index 4434116a58a0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registry.java +++ /dev/null @@ -1,500 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; -import java.util.List; -import java.util.Map; - -/** - * An immutable client-side representation of Registry. - */ -public interface Registry { - /** - * 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 identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - String kind(); - - /** - * Gets the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - Sku sku(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the discoveryUrl property: Discovery URL for the Registry. - * - * @return the discoveryUrl value. - */ - String discoveryUrl(); - - /** - * Gets the intellectualPropertyPublisher property: IntellectualPropertyPublisher for the registry. - * - * @return the intellectualPropertyPublisher value. - */ - String intellectualPropertyPublisher(); - - /** - * Gets the managedResourceGroup property: ResourceId of the managed RG if the registry has system created - * resources. - * - * @return the managedResourceGroup value. - */ - ArmResourceId managedResourceGroup(); - - /** - * Gets the mlFlowRegistryUri property: MLFlow Registry URI for the Registry. - * - * @return the mlFlowRegistryUri value. - */ - String mlFlowRegistryUri(); - - /** - * Gets the registryPrivateEndpointConnections property: Private endpoint connections info used for pending - * connections in private link portal. - * - * @return the registryPrivateEndpointConnections value. - */ - List registryPrivateEndpointConnections(); - - /** - * Gets the publicNetworkAccess property: Is the Registry accessible from the internet? - * Possible values: "Enabled" or "Disabled". - * - * @return the publicNetworkAccess value. - */ - String publicNetworkAccess(); - - /** - * Gets the regionDetails property: Details of each region the registry is in. - * - * @return the regionDetails value. - */ - List regionDetails(); - - /** - * 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.machinelearning.fluent.models.RegistryInner object. - * - * @return the inner object. - */ - RegistryInner innerModel(); - - /** - * The entirety of the Registry definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The Registry definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Registry definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the Registry 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 Registry 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 Registry 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.WithIdentity, - DefinitionStages.WithKind, DefinitionStages.WithSku, DefinitionStages.WithDiscoveryUrl, - DefinitionStages.WithIntellectualPropertyPublisher, DefinitionStages.WithManagedResourceGroup, - DefinitionStages.WithMlFlowRegistryUri, DefinitionStages.WithRegistryPrivateEndpointConnections, - DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithRegionDetails { - /** - * Executes the create request. - * - * @return the created resource. - */ - Registry create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Registry create(Context context); - } - - /** - * The stage of the Registry 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 Registry definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the Registry definition allowing to specify kind. - */ - interface WithKind { - /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. - * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. - * @return the next definition stage. - */ - WithCreate withKind(String kind); - } - - /** - * The stage of the Registry definition allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. - * - * @param sku Sku details required for ARM contract for Autoscaling. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - - /** - * The stage of the Registry definition allowing to specify discoveryUrl. - */ - interface WithDiscoveryUrl { - /** - * Specifies the discoveryUrl property: Discovery URL for the Registry. - * - * @param discoveryUrl Discovery URL for the Registry. - * @return the next definition stage. - */ - WithCreate withDiscoveryUrl(String discoveryUrl); - } - - /** - * The stage of the Registry definition allowing to specify intellectualPropertyPublisher. - */ - interface WithIntellectualPropertyPublisher { - /** - * Specifies the intellectualPropertyPublisher property: IntellectualPropertyPublisher for the registry. - * - * @param intellectualPropertyPublisher IntellectualPropertyPublisher for the registry. - * @return the next definition stage. - */ - WithCreate withIntellectualPropertyPublisher(String intellectualPropertyPublisher); - } - - /** - * The stage of the Registry definition allowing to specify managedResourceGroup. - */ - interface WithManagedResourceGroup { - /** - * Specifies the managedResourceGroup property: ResourceId of the managed RG if the registry has system - * created resources. - * - * @param managedResourceGroup ResourceId of the managed RG if the registry has system created resources. - * @return the next definition stage. - */ - WithCreate withManagedResourceGroup(ArmResourceId managedResourceGroup); - } - - /** - * The stage of the Registry definition allowing to specify mlFlowRegistryUri. - */ - interface WithMlFlowRegistryUri { - /** - * Specifies the mlFlowRegistryUri property: MLFlow Registry URI for the Registry. - * - * @param mlFlowRegistryUri MLFlow Registry URI for the Registry. - * @return the next definition stage. - */ - WithCreate withMlFlowRegistryUri(String mlFlowRegistryUri); - } - - /** - * The stage of the Registry definition allowing to specify registryPrivateEndpointConnections. - */ - interface WithRegistryPrivateEndpointConnections { - /** - * Specifies the registryPrivateEndpointConnections property: Private endpoint connections info used for - * pending connections in private link portal. - * - * @param registryPrivateEndpointConnections Private endpoint connections info used for pending connections - * in private link portal. - * @return the next definition stage. - */ - WithCreate withRegistryPrivateEndpointConnections( - List registryPrivateEndpointConnections); - } - - /** - * The stage of the Registry definition allowing to specify publicNetworkAccess. - */ - interface WithPublicNetworkAccess { - /** - * Specifies the publicNetworkAccess property: Is the Registry accessible from the internet? - * Possible values: "Enabled" or "Disabled". - * - * @param publicNetworkAccess Is the Registry accessible from the internet? - * Possible values: "Enabled" or "Disabled". - * @return the next definition stage. - */ - WithCreate withPublicNetworkAccess(String publicNetworkAccess); - } - - /** - * The stage of the Registry definition allowing to specify regionDetails. - */ - interface WithRegionDetails { - /** - * Specifies the regionDetails property: Details of each region the registry is in. - * - * @param regionDetails Details of each region the registry is in. - * @return the next definition stage. - */ - WithCreate withRegionDetails(List regionDetails); - } - } - - /** - * Begins update for the Registry resource. - * - * @return the stage of resource update. - */ - Registry.Update update(); - - /** - * The template for Registry update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Registry apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Registry apply(Context context); - } - - /** - * The Registry update stages. - */ - interface UpdateStages { - /** - * The stage of the Registry 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 Registry update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - Update withIdentity(RegistryPartialManagedServiceIdentity identity); - } - - /** - * The stage of the Registry update allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. - * - * @param sku Sku details required for ARM contract for Autoscaling. - * @return the next definition stage. - */ - Update withSku(PartialSku sku); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Registry refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Registry refresh(Context context); - - /** - * Remove regions from registry. - * - * @param body Details required to create the registry. - * @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 response. - */ - Registry removeRegions(RegistryInner body); - - /** - * Remove regions from registry. - * - * @param body Details required to create the registry. - * @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 response. - */ - Registry removeRegions(RegistryInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.java deleted file mode 100644 index 970c7e9cc090..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.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.machinelearning.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.machinelearning.fluent.models.CodeContainerInner; - -/** - * Resource collection API of RegistryCodeContainers. - */ -public interface RegistryCodeContainers { - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName); - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @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 a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, String skip, Context context); - - /** - * Delete Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @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. - */ - void delete(String resourceGroupName, String registryName, String codeName); - - /** - * Delete Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @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. - */ - void delete(String resourceGroupName, String registryName, String codeName, Context context); - - /** - * Get Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @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 code container along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, String codeName, - Context context); - - /** - * Get Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @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 code container. - */ - CodeContainer get(String resourceGroupName, String registryName, String codeName); - - /** - * Create or update Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - CodeContainer createOrUpdate(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body); - - /** - * Create or update Code container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - CodeContainer createOrUpdate(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.java deleted file mode 100644 index b398b19524c7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.CodeVersionInner; - -/** - * Resource collection API of RegistryCodeVersions. - */ -public interface RegistryCodeVersions { - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @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 a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, String codeName); - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @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 a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, String codeName, String orderBy, - Integer top, String skip, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @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. - */ - void delete(String resourceGroupName, String registryName, String codeName, String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @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. - */ - void delete(String resourceGroupName, String registryName, String codeName, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @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 version along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, String codeName, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @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 version. - */ - CodeVersion get(String resourceGroupName, String registryName, String codeName, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - CodeVersion createOrUpdate(String resourceGroupName, String registryName, String codeName, String version, - CodeVersionInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - CodeVersion createOrUpdate(String resourceGroupName, String registryName, String codeName, String version, - CodeVersionInner body, Context context); - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response}. - */ - Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, - String registryName, String codeName, String version, PendingUploadRequestDto body, Context context); - - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response. - */ - PendingUploadResponseDto createOrGetStartPendingUpload(String resourceGroupName, String registryName, - String codeName, String version, PendingUploadRequestDto body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.java deleted file mode 100644 index 08e328a774f8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.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.machinelearning.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.machinelearning.fluent.models.ComponentContainerInner; - -/** - * Resource collection API of RegistryComponentContainers. - */ -public interface RegistryComponentContainers { - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName); - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @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 a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, String skip, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @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. - */ - void delete(String resourceGroupName, String registryName, String componentName); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @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. - */ - void delete(String resourceGroupName, String registryName, String componentName, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @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 container along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, String componentName, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @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 container. - */ - ComponentContainer get(String resourceGroupName, String registryName, String componentName); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - ComponentContainer createOrUpdate(String resourceGroupName, String registryName, String componentName, - ComponentContainerInner body); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - ComponentContainer createOrUpdate(String resourceGroupName, String registryName, String componentName, - ComponentContainerInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.java deleted file mode 100644 index 9caf1ec17f94..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.ComponentVersionInner; - -/** - * Resource collection API of RegistryComponentVersions. - */ -public interface RegistryComponentVersions { - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @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 a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, String componentName); - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @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 a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, String componentName, - String orderBy, Integer top, String skip, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @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. - */ - void delete(String resourceGroupName, String registryName, String componentName, String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @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. - */ - void delete(String resourceGroupName, String registryName, String componentName, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @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 version along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, String componentName, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @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 version. - */ - ComponentVersion get(String resourceGroupName, String registryName, String componentName, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - ComponentVersion createOrUpdate(String resourceGroupName, String registryName, String componentName, String version, - ComponentVersionInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - ComponentVersion createOrUpdate(String resourceGroupName, String registryName, String componentName, String version, - ComponentVersionInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataContainers.java deleted file mode 100644 index ca72b55e9d64..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataContainers.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.machinelearning.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.machinelearning.fluent.models.DataContainerInner; - -/** - * Resource collection API of RegistryDataContainers. - */ -public interface RegistryDataContainers { - /** - * List Data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName); - - /** - * List Data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @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. - */ - void delete(String resourceGroupName, String registryName, String name); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @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. - */ - void delete(String resourceGroupName, String registryName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @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 container along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, String name, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @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 container. - */ - DataContainer get(String resourceGroupName, String registryName, String name); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - DataContainer createOrUpdate(String resourceGroupName, String registryName, String name, DataContainerInner body); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - DataContainer createOrUpdate(String resourceGroupName, String registryName, String name, DataContainerInner body, - Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataReferences.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataReferences.java deleted file mode 100644 index 61a2ed21e36f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataReferences.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.machinelearning.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of RegistryDataReferences. - */ -public interface RegistryDataReferences { - /** - * Get blob reference SAS Uri. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data reference name. - * @param version Version identifier. - * @param body Asset id and blob uri. - * @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 blob reference SAS Uri along with {@link Response}. - */ - Response getBlobReferenceSasWithResponse(String resourceGroupName, - String registryName, String name, String version, GetBlobReferenceSasRequestDto body, Context context); - - /** - * Get blob reference SAS Uri. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data reference name. - * @param version Version identifier. - * @param body Asset id and blob uri. - * @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 blob reference SAS Uri. - */ - GetBlobReferenceSasResponseDto getBlobReferenceSas(String resourceGroupName, String registryName, String name, - String version, GetBlobReferenceSasRequestDto body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataVersions.java deleted file mode 100644 index 79b18d9e5879..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataVersions.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.DataVersionBaseInner; - -/** - * Resource collection API of RegistryDataVersions. - */ -public interface RegistryDataVersions { - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @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 a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, String name); - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @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 a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, String name, String orderBy, - Integer top, String skip, String tags, ListViewType listViewType, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @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. - */ - void delete(String resourceGroupName, String registryName, String name, String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @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. - */ - void delete(String resourceGroupName, String registryName, String name, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, String name, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @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 version. - */ - DataVersionBase get(String resourceGroupName, String registryName, String name, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - DataVersionBase createOrUpdate(String resourceGroupName, String registryName, String name, String version, - DataVersionBaseInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - DataVersionBase createOrUpdate(String resourceGroupName, String registryName, String name, String version, - DataVersionBaseInner body, Context context); - - /** - * Generate a storage location and credential for the client to upload a data asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response}. - */ - Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, - String registryName, String name, String version, PendingUploadRequestDto body, Context context); - - /** - * Generate a storage location and credential for the client to upload a data asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response. - */ - PendingUploadResponseDto createOrGetStartPendingUpload(String resourceGroupName, String registryName, String name, - String version, PendingUploadRequestDto body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java deleted file mode 100644 index 6c608f18c208..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.EnvironmentContainerInner; - -/** - * Resource collection API of RegistryEnvironmentContainers. - */ -public interface RegistryEnvironmentContainers { - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName); - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @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. - */ - void delete(String resourceGroupName, String registryName, String environmentName); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @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. - */ - void delete(String resourceGroupName, String registryName, String environmentName, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, - String environmentName, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @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 container. - */ - EnvironmentContainer get(String resourceGroupName, String registryName, String environmentName); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - EnvironmentContainer createOrUpdate(String resourceGroupName, String registryName, String environmentName, - EnvironmentContainerInner body); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - EnvironmentContainer createOrUpdate(String resourceGroupName, String registryName, String environmentName, - EnvironmentContainerInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.java deleted file mode 100644 index 938b160055ad..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.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.machinelearning.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.machinelearning.fluent.models.EnvironmentVersionInner; - -/** - * Resource collection API of RegistryEnvironmentVersions. - */ -public interface RegistryEnvironmentVersions { - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @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 a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, String environmentName); - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, String environmentName, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @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. - */ - void delete(String resourceGroupName, String registryName, String environmentName, String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @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. - */ - void delete(String resourceGroupName, String registryName, String environmentName, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, String environmentName, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - EnvironmentVersion get(String resourceGroupName, String registryName, String environmentName, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - EnvironmentVersion createOrUpdate(String resourceGroupName, String registryName, String environmentName, - String version, EnvironmentVersionInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - EnvironmentVersion createOrUpdate(String resourceGroupName, String registryName, String environmentName, - String version, EnvironmentVersionInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.java deleted file mode 100644 index 838c746104ce..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The RegistryListCredentialsResult model. - */ -@Fluent -public final class RegistryListCredentialsResult implements JsonSerializable { - /* - * The location property. - */ - private String location; - - /* - * The username property. - */ - private String username; - - /* - * The passwords property. - */ - private List passwords; - - /** - * Creates an instance of RegistryListCredentialsResult class. - */ - public RegistryListCredentialsResult() { - } - - /** - * Get the location property: The location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Get the username property: The username property. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Get the passwords property: The passwords property. - * - * @return the passwords value. - */ - public List passwords() { - return this.passwords; - } - - /** - * Set the passwords property: The passwords property. - * - * @param passwords the passwords value to set. - * @return the RegistryListCredentialsResult object itself. - */ - public RegistryListCredentialsResult withPasswords(List passwords) { - this.passwords = passwords; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (passwords() != null) { - passwords().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("passwords", this.passwords, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryListCredentialsResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryListCredentialsResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryListCredentialsResult. - */ - public static RegistryListCredentialsResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryListCredentialsResult deserializedRegistryListCredentialsResult - = new RegistryListCredentialsResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("location".equals(fieldName)) { - deserializedRegistryListCredentialsResult.location = reader.getString(); - } else if ("username".equals(fieldName)) { - deserializedRegistryListCredentialsResult.username = reader.getString(); - } else if ("passwords".equals(fieldName)) { - List passwords = reader.readArray(reader1 -> Password.fromJson(reader1)); - deserializedRegistryListCredentialsResult.passwords = passwords; - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryListCredentialsResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java deleted file mode 100644 index 1f7e2ec89c37..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.ModelContainerInner; - -/** - * Resource collection API of RegistryModelContainers. - */ -public interface RegistryModelContainers { - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @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 a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName); - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @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. - */ - void delete(String resourceGroupName, String registryName, String modelName); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @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. - */ - void delete(String resourceGroupName, String registryName, String modelName, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @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 container along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, String modelName, - Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @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 container. - */ - ModelContainer get(String resourceGroupName, String registryName, String modelName); - - /** - * Create or update model container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - ModelContainer createOrUpdate(String resourceGroupName, String registryName, String modelName, - ModelContainerInner body); - - /** - * Create or update model container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - ModelContainer createOrUpdate(String resourceGroupName, String registryName, String modelName, - ModelContainerInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.java deleted file mode 100644 index 214dc3c40ca9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.ModelVersionInner; - -/** - * Resource collection API of RegistryModelVersions. - */ -public interface RegistryModelVersions { - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @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 a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, String modelName); - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Version identifier. - * @param description Model description. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String registryName, String modelName, String skip, - String orderBy, Integer top, String version, String description, String tags, String properties, - ListViewType listViewType, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @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. - */ - void delete(String resourceGroupName, String registryName, String modelName, String version); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @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. - */ - void delete(String resourceGroupName, String registryName, String modelName, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String registryName, String modelName, - String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version. - */ - ModelVersion get(String resourceGroupName, String registryName, String modelName, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - ModelVersion createOrUpdate(String resourceGroupName, String registryName, String modelName, String version, - ModelVersionInner body); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. - */ - ModelVersion createOrUpdate(String resourceGroupName, String registryName, String modelName, String version, - ModelVersionInner body, Context context); - - /** - * Generate a storage location and credential for the client to upload a model asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response body along with {@link Response}. - */ - Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, - String registryName, String modelName, String version, PendingUploadRequestDto body, Context context); - - /** - * Generate a storage location and credential for the client to upload a model asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @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 response. - */ - PendingUploadResponseDto createOrGetStartPendingUpload(String resourceGroupName, String registryName, - String modelName, String version, PendingUploadRequestDto body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPartialManagedServiceIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPartialManagedServiceIdentity.java deleted file mode 100644 index 758eeba7764a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPartialManagedServiceIdentity.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; -import java.util.UUID; - -/** - * Managed service identity (system assigned and/or user assigned identities). - */ -@Fluent -public final class RegistryPartialManagedServiceIdentity extends ManagedServiceIdentity { - /* - * The service principal ID of the system assigned identity. This property will only be provided for a system - * assigned identity. - */ - private UUID principalId; - - /* - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned - * identity. - */ - private UUID tenantId; - - /** - * Creates an instance of RegistryPartialManagedServiceIdentity class. - */ - public RegistryPartialManagedServiceIdentity() { - } - - /** - * 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. - */ - @Override - 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. - */ - @Override - public UUID tenantId() { - return this.tenantId; - } - - /** - * {@inheritDoc} - */ - @Override - public RegistryPartialManagedServiceIdentity withType(ManagedServiceIdentityType type) { - super.withType(type); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RegistryPartialManagedServiceIdentity - withUserAssignedIdentities(Map userAssignedIdentities) { - super.withUserAssignedIdentities(userAssignedIdentities); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", type() == null ? null : type().toString()); - jsonWriter.writeMapField("userAssignedIdentities", userAssignedIdentities(), - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryPartialManagedServiceIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryPartialManagedServiceIdentity if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RegistryPartialManagedServiceIdentity. - */ - public static RegistryPartialManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryPartialManagedServiceIdentity deserializedRegistryPartialManagedServiceIdentity - = new RegistryPartialManagedServiceIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedRegistryPartialManagedServiceIdentity - .withType(ManagedServiceIdentityType.fromString(reader.getString())); - } else if ("principalId".equals(fieldName)) { - deserializedRegistryPartialManagedServiceIdentity.principalId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("tenantId".equals(fieldName)) { - deserializedRegistryPartialManagedServiceIdentity.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("userAssignedIdentities".equals(fieldName)) { - Map userAssignedIdentities - = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); - deserializedRegistryPartialManagedServiceIdentity - .withUserAssignedIdentities(userAssignedIdentities); - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryPartialManagedServiceIdentity; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateEndpointConnection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateEndpointConnection.java deleted file mode 100644 index 40c7480f9645..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateEndpointConnection.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.RegistryPrivateEndpointConnectionProperties; -import java.io.IOException; -import java.util.List; - -/** - * Private endpoint connection definition. - */ -@Fluent -public final class RegistryPrivateEndpointConnection implements JsonSerializable { - /* - * This is the private endpoint connection name created on SRP - * Full resource id: - * /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.MachineLearningServices/{resourceType}/{ - * resourceName}/registryPrivateEndpointConnections/{peConnectionName} - */ - private String id; - - /* - * Same as workspace location. - */ - private String location; - - /* - * Properties of the Private Endpoint Connection - */ - private RegistryPrivateEndpointConnectionProperties innerProperties; - - /** - * Creates an instance of RegistryPrivateEndpointConnection class. - */ - public RegistryPrivateEndpointConnection() { - } - - /** - * Get the id property: This is the private endpoint connection name created on SRP - * Full resource id: - * /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.MachineLearningServices/{resourceType}/{resourceName}/registryPrivateEndpointConnections/{peConnectionName}. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: This is the private endpoint connection name created on SRP - * Full resource id: - * /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.MachineLearningServices/{resourceType}/{resourceName}/registryPrivateEndpointConnections/{peConnectionName}. - * - * @param id the id value to set. - * @return the RegistryPrivateEndpointConnection object itself. - */ - public RegistryPrivateEndpointConnection withId(String id) { - this.id = id; - return this; - } - - /** - * Get the location property: Same as workspace location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Same as workspace location. - * - * @param location the location value to set. - * @return the RegistryPrivateEndpointConnection object itself. - */ - public RegistryPrivateEndpointConnection withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the innerProperties property: Properties of the Private Endpoint Connection. - * - * @return the innerProperties value. - */ - private RegistryPrivateEndpointConnectionProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the groupIds property: The group ids. - * - * @return the groupIds value. - */ - public List groupIds() { - return this.innerProperties() == null ? null : this.innerProperties().groupIds(); - } - - /** - * Set the groupIds property: The group ids. - * - * @param groupIds the groupIds value to set. - * @return the RegistryPrivateEndpointConnection object itself. - */ - public RegistryPrivateEndpointConnection withGroupIds(List groupIds) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryPrivateEndpointConnectionProperties(); - } - this.innerProperties().withGroupIds(groupIds); - return this; - } - - /** - * Get the privateEndpoint property: The PE network resource that is linked to this PE connection. - * - * @return the privateEndpoint value. - */ - public PrivateEndpointResource privateEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); - } - - /** - * Set the privateEndpoint property: The PE network resource that is linked to this PE connection. - * - * @param privateEndpoint the privateEndpoint value to set. - * @return the RegistryPrivateEndpointConnection object itself. - */ - public RegistryPrivateEndpointConnection withPrivateEndpoint(PrivateEndpointResource privateEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryPrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateEndpoint(privateEndpoint); - return this; - } - - /** - * Get the registryPrivateLinkServiceConnectionState property: The connection state. - * - * @return the registryPrivateLinkServiceConnectionState value. - */ - public RegistryPrivateLinkServiceConnectionState registryPrivateLinkServiceConnectionState() { - return this.innerProperties() == null - ? null - : this.innerProperties().registryPrivateLinkServiceConnectionState(); - } - - /** - * Set the registryPrivateLinkServiceConnectionState property: The connection state. - * - * @param registryPrivateLinkServiceConnectionState the registryPrivateLinkServiceConnectionState value to set. - * @return the RegistryPrivateEndpointConnection object itself. - */ - public RegistryPrivateEndpointConnection withRegistryPrivateLinkServiceConnectionState( - RegistryPrivateLinkServiceConnectionState registryPrivateLinkServiceConnectionState) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryPrivateEndpointConnectionProperties(); - } - this.innerProperties().withRegistryPrivateLinkServiceConnectionState(registryPrivateLinkServiceConnectionState); - return this; - } - - /** - * Get the provisioningState property: One of null, "Succeeded", "Provisioning", "Failed". While not approved, it's - * null. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Set the provisioningState property: One of null, "Succeeded", "Provisioning", "Failed". While not approved, it's - * null. - * - * @param provisioningState the provisioningState value to set. - * @return the RegistryPrivateEndpointConnection object itself. - */ - public RegistryPrivateEndpointConnection withProvisioningState(String provisioningState) { - if (this.innerProperties() == null) { - this.innerProperties = new RegistryPrivateEndpointConnectionProperties(); - } - this.innerProperties().withProvisioningState(provisioningState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryPrivateEndpointConnection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryPrivateEndpointConnection if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryPrivateEndpointConnection. - */ - public static RegistryPrivateEndpointConnection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryPrivateEndpointConnection deserializedRegistryPrivateEndpointConnection - = new RegistryPrivateEndpointConnection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedRegistryPrivateEndpointConnection.id = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedRegistryPrivateEndpointConnection.location = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedRegistryPrivateEndpointConnection.innerProperties - = RegistryPrivateEndpointConnectionProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryPrivateEndpointConnection; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateLinkServiceConnectionState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateLinkServiceConnectionState.java deleted file mode 100644 index e1a5718b593d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateLinkServiceConnectionState.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The connection state. - */ -@Fluent -public final class RegistryPrivateLinkServiceConnectionState - implements JsonSerializable { - /* - * Some RP chose "None". Other RPs use this for region expansion. - */ - private String actionsRequired; - - /* - * User-defined message that, per NRP doc, may be used for approval-related message. - */ - private String description; - - /* - * Connection status of the service consumer with the service provider - */ - private EndpointServiceConnectionStatus status; - - /** - * Creates an instance of RegistryPrivateLinkServiceConnectionState class. - */ - public RegistryPrivateLinkServiceConnectionState() { - } - - /** - * Get the actionsRequired property: Some RP chose "None". Other RPs use this for region expansion. - * - * @return the actionsRequired value. - */ - public String actionsRequired() { - return this.actionsRequired; - } - - /** - * Set the actionsRequired property: Some RP chose "None". Other RPs use this for region expansion. - * - * @param actionsRequired the actionsRequired value to set. - * @return the RegistryPrivateLinkServiceConnectionState object itself. - */ - public RegistryPrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { - this.actionsRequired = actionsRequired; - return this; - } - - /** - * Get the description property: User-defined message that, per NRP doc, may be used for approval-related message. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: User-defined message that, per NRP doc, may be used for approval-related message. - * - * @param description the description value to set. - * @return the RegistryPrivateLinkServiceConnectionState object itself. - */ - public RegistryPrivateLinkServiceConnectionState withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the status property: Connection status of the service consumer with the service provider. - * - * @return the status value. - */ - public EndpointServiceConnectionStatus status() { - return this.status; - } - - /** - * Set the status property: Connection status of the service consumer with the service provider. - * - * @param status the status value to set. - * @return the RegistryPrivateLinkServiceConnectionState object itself. - */ - public RegistryPrivateLinkServiceConnectionState withStatus(EndpointServiceConnectionStatus status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("actionsRequired", this.actionsRequired); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryPrivateLinkServiceConnectionState from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryPrivateLinkServiceConnectionState if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryPrivateLinkServiceConnectionState. - */ - public static RegistryPrivateLinkServiceConnectionState fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryPrivateLinkServiceConnectionState deserializedRegistryPrivateLinkServiceConnectionState - = new RegistryPrivateLinkServiceConnectionState(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("actionsRequired".equals(fieldName)) { - deserializedRegistryPrivateLinkServiceConnectionState.actionsRequired = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedRegistryPrivateLinkServiceConnectionState.description = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedRegistryPrivateLinkServiceConnectionState.status - = EndpointServiceConnectionStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryPrivateLinkServiceConnectionState; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.java deleted file mode 100644 index 2d6c2590a760..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Details for each region the registry is in. - */ -@Fluent -public final class RegistryRegionArmDetails implements JsonSerializable { - /* - * List of ACR accounts - */ - private List acrDetails; - - /* - * The location where the registry exists - */ - private String location; - - /* - * List of storage accounts - */ - private List storageAccountDetails; - - /** - * Creates an instance of RegistryRegionArmDetails class. - */ - public RegistryRegionArmDetails() { - } - - /** - * Get the acrDetails property: List of ACR accounts. - * - * @return the acrDetails value. - */ - public List acrDetails() { - return this.acrDetails; - } - - /** - * Set the acrDetails property: List of ACR accounts. - * - * @param acrDetails the acrDetails value to set. - * @return the RegistryRegionArmDetails object itself. - */ - public RegistryRegionArmDetails withAcrDetails(List acrDetails) { - this.acrDetails = acrDetails; - return this; - } - - /** - * Get the location property: The location where the registry exists. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The location where the registry exists. - * - * @param location the location value to set. - * @return the RegistryRegionArmDetails object itself. - */ - public RegistryRegionArmDetails withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the storageAccountDetails property: List of storage accounts. - * - * @return the storageAccountDetails value. - */ - public List storageAccountDetails() { - return this.storageAccountDetails; - } - - /** - * Set the storageAccountDetails property: List of storage accounts. - * - * @param storageAccountDetails the storageAccountDetails value to set. - * @return the RegistryRegionArmDetails object itself. - */ - public RegistryRegionArmDetails withStorageAccountDetails(List storageAccountDetails) { - this.storageAccountDetails = storageAccountDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (acrDetails() != null) { - acrDetails().forEach(e -> e.validate()); - } - if (storageAccountDetails() != null) { - storageAccountDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("acrDetails", this.acrDetails, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeArrayField("storageAccountDetails", this.storageAccountDetails, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryRegionArmDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryRegionArmDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryRegionArmDetails. - */ - public static RegistryRegionArmDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryRegionArmDetails deserializedRegistryRegionArmDetails = new RegistryRegionArmDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("acrDetails".equals(fieldName)) { - List acrDetails = reader.readArray(reader1 -> AcrDetails.fromJson(reader1)); - deserializedRegistryRegionArmDetails.acrDetails = acrDetails; - } else if ("location".equals(fieldName)) { - deserializedRegistryRegionArmDetails.location = reader.getString(); - } else if ("storageAccountDetails".equals(fieldName)) { - List storageAccountDetails - = reader.readArray(reader1 -> StorageAccountDetails.fromJson(reader1)); - deserializedRegistryRegionArmDetails.storageAccountDetails = storageAccountDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryRegionArmDetails; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryTrackedResourceArmPaginatedResult.java deleted file mode 100644 index f4ac0bd7dc69..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryTrackedResourceArmPaginatedResult.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of Registry entities. - */ -@Fluent -public final class RegistryTrackedResourceArmPaginatedResult - implements JsonSerializable { - /* - * The link to the next page of Registry objects. If null, there are no additional pages. - */ - private String nextLink; - - /* - * An array of objects of type Registry. - */ - private List value; - - /** - * Creates an instance of RegistryTrackedResourceArmPaginatedResult class. - */ - public RegistryTrackedResourceArmPaginatedResult() { - } - - /** - * Get the nextLink property: The link to the next page of Registry objects. If null, there are no additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of Registry objects. If null, there are no additional pages. - * - * @param nextLink the nextLink value to set. - * @return the RegistryTrackedResourceArmPaginatedResult object itself. - */ - public RegistryTrackedResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: An array of objects of type Registry. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type Registry. - * - * @param value the value value to set. - * @return the RegistryTrackedResourceArmPaginatedResult object itself. - */ - public RegistryTrackedResourceArmPaginatedResult 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) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryTrackedResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryTrackedResourceArmPaginatedResult if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryTrackedResourceArmPaginatedResult. - */ - public static RegistryTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryTrackedResourceArmPaginatedResult deserializedRegistryTrackedResourceArmPaginatedResult - = new RegistryTrackedResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nextLink".equals(fieldName)) { - deserializedRegistryTrackedResourceArmPaginatedResult.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> RegistryInner.fromJson(reader1)); - deserializedRegistryTrackedResourceArmPaginatedResult.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryTrackedResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Regression.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Regression.java deleted file mode 100644 index 9ed55c8ac80f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Regression.java +++ /dev/null @@ -1,470 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Regression task in AutoML Table vertical. - */ -@Fluent -public final class Regression extends AutoMLVertical { - /* - * [Required] Task type for AutoMLJob. - */ - private TaskType taskType = TaskType.REGRESSION; - - /* - * Primary metric for regression task. - */ - private RegressionPrimaryMetrics primaryMetric; - - /* - * Inputs for training phase for an AutoML Job. - */ - private RegressionTrainingSettings trainingSettings; - - /* - * Execution constraints for AutoMLJob. - */ - private TableVerticalLimitSettings limitSettings; - - /* - * Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - */ - private NCrossValidations nCrossValidations; - - /* - * Columns to use for CVSplit data. - */ - private List cvSplitColumnNames; - - /* - * The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the - * data to be weighted up or down. - */ - private String weightColumnName; - - /* - * Validation data inputs. - */ - private MLTableJobInput validationData; - - /* - * Test data input. - */ - private MLTableJobInput testData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - private Double validationDataSize; - - /* - * The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - private Double testDataSize; - - /* - * Featurization inputs needed for AutoML job. - */ - private TableVerticalFeaturizationSettings featurizationSettings; - - /** - * Creates an instance of Regression class. - */ - public Regression() { - } - - /** - * Get the taskType property: [Required] Task type for AutoMLJob. - * - * @return the taskType value. - */ - @Override - public TaskType taskType() { - return this.taskType; - } - - /** - * Get the primaryMetric property: Primary metric for regression task. - * - * @return the primaryMetric value. - */ - public RegressionPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric for regression task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the Regression object itself. - */ - public Regression withPrimaryMetric(RegressionPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - - /** - * Get the trainingSettings property: Inputs for training phase for an AutoML Job. - * - * @return the trainingSettings value. - */ - public RegressionTrainingSettings trainingSettings() { - return this.trainingSettings; - } - - /** - * Set the trainingSettings property: Inputs for training phase for an AutoML Job. - * - * @param trainingSettings the trainingSettings value to set. - * @return the Regression object itself. - */ - public Regression withTrainingSettings(RegressionTrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; - return this; - } - - /** - * Get the limitSettings property: Execution constraints for AutoMLJob. - * - * @return the limitSettings value. - */ - public TableVerticalLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: Execution constraints for AutoMLJob. - * - * @param limitSettings the limitSettings value to set. - * @return the Regression object itself. - */ - public Regression withLimitSettings(TableVerticalLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - * - * @return the nCrossValidations value. - */ - public NCrossValidations nCrossValidations() { - return this.nCrossValidations; - } - - /** - * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - * - * @param nCrossValidations the nCrossValidations value to set. - * @return the Regression object itself. - */ - public Regression withNCrossValidations(NCrossValidations nCrossValidations) { - this.nCrossValidations = nCrossValidations; - return this; - } - - /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @return the cvSplitColumnNames value. - */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; - } - - /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. - * @return the Regression object itself. - */ - public Regression withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; - return this; - } - - /** - * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @return the weightColumnName value. - */ - public String weightColumnName() { - return this.weightColumnName; - } - - /** - * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @param weightColumnName the weightColumnName value to set. - * @return the Regression object itself. - */ - public Regression withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the Regression object itself. - */ - public Regression withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public MLTableJobInput testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the Regression object itself. - */ - public Regression withTestData(MLTableJobInput testData) { - this.testData = testData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the Regression object itself. - */ - public Regression withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @return the testDataSize value. - */ - public Double testDataSize() { - return this.testDataSize; - } - - /** - * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @param testDataSize the testDataSize value to set. - * @return the Regression object itself. - */ - public Regression withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; - return this; - } - - /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @return the featurizationSettings value. - */ - public TableVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; - } - - /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @param featurizationSettings the featurizationSettings value to set. - * @return the Regression object itself. - */ - public Regression withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Regression withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Regression withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Regression withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (trainingSettings() != null) { - trainingSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - if (nCrossValidations() != null) { - nCrossValidations().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - if (testData() != null) { - testData().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("trainingData", trainingData()); - jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); - jsonWriter.writeStringField("targetColumnName", targetColumnName()); - jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); - jsonWriter.writeJsonField("trainingSettings", this.trainingSettings); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); - jsonWriter.writeArrayField("cvSplitColumnNames", this.cvSplitColumnNames, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("weightColumnName", this.weightColumnName); - jsonWriter.writeJsonField("validationData", this.validationData); - jsonWriter.writeJsonField("testData", this.testData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); - jsonWriter.writeNumberField("testDataSize", this.testDataSize); - jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Regression from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Regression if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the Regression. - */ - public static Regression fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Regression deserializedRegression = new Regression(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("trainingData".equals(fieldName)) { - deserializedRegression.withTrainingData(MLTableJobInput.fromJson(reader)); - } else if ("logVerbosity".equals(fieldName)) { - deserializedRegression.withLogVerbosity(LogVerbosity.fromString(reader.getString())); - } else if ("targetColumnName".equals(fieldName)) { - deserializedRegression.withTargetColumnName(reader.getString()); - } else if ("taskType".equals(fieldName)) { - deserializedRegression.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedRegression.primaryMetric = RegressionPrimaryMetrics.fromString(reader.getString()); - } else if ("trainingSettings".equals(fieldName)) { - deserializedRegression.trainingSettings = RegressionTrainingSettings.fromJson(reader); - } else if ("limitSettings".equals(fieldName)) { - deserializedRegression.limitSettings = TableVerticalLimitSettings.fromJson(reader); - } else if ("nCrossValidations".equals(fieldName)) { - deserializedRegression.nCrossValidations = NCrossValidations.fromJson(reader); - } else if ("cvSplitColumnNames".equals(fieldName)) { - List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); - deserializedRegression.cvSplitColumnNames = cvSplitColumnNames; - } else if ("weightColumnName".equals(fieldName)) { - deserializedRegression.weightColumnName = reader.getString(); - } else if ("validationData".equals(fieldName)) { - deserializedRegression.validationData = MLTableJobInput.fromJson(reader); - } else if ("testData".equals(fieldName)) { - deserializedRegression.testData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedRegression.validationDataSize = reader.getNullable(JsonReader::getDouble); - } else if ("testDataSize".equals(fieldName)) { - deserializedRegression.testDataSize = reader.getNullable(JsonReader::getDouble); - } else if ("featurizationSettings".equals(fieldName)) { - deserializedRegression.featurizationSettings = TableVerticalFeaturizationSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRegression; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.java deleted file mode 100644 index b57e1bd35f2f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum for all Regression models supported by AutoML. - */ -public final class RegressionModels extends ExpandableStringEnum { - /** - * Static value ElasticNet for RegressionModels. - */ - public static final RegressionModels ELASTIC_NET = fromString("ElasticNet"); - - /** - * Static value GradientBoosting for RegressionModels. - */ - public static final RegressionModels GRADIENT_BOOSTING = fromString("GradientBoosting"); - - /** - * Static value DecisionTree for RegressionModels. - */ - public static final RegressionModels DECISION_TREE = fromString("DecisionTree"); - - /** - * Static value KNN for RegressionModels. - */ - public static final RegressionModels KNN = fromString("KNN"); - - /** - * Static value LassoLars for RegressionModels. - */ - public static final RegressionModels LASSO_LARS = fromString("LassoLars"); - - /** - * Static value SGD for RegressionModels. - */ - public static final RegressionModels SGD = fromString("SGD"); - - /** - * Static value RandomForest for RegressionModels. - */ - public static final RegressionModels RANDOM_FOREST = fromString("RandomForest"); - - /** - * Static value ExtremeRandomTrees for RegressionModels. - */ - public static final RegressionModels EXTREME_RANDOM_TREES = fromString("ExtremeRandomTrees"); - - /** - * Static value LightGBM for RegressionModels. - */ - public static final RegressionModels LIGHT_GBM = fromString("LightGBM"); - - /** - * Static value XGBoostRegressor for RegressionModels. - */ - public static final RegressionModels XGBOOST_REGRESSOR = fromString("XGBoostRegressor"); - - /** - * Creates a new instance of RegressionModels value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RegressionModels() { - } - - /** - * Creates or finds a RegressionModels from its string representation. - * - * @param name a name to look for. - * @return the corresponding RegressionModels. - */ - public static RegressionModels fromString(String name) { - return fromString(name, RegressionModels.class); - } - - /** - * Gets known RegressionModels values. - * - * @return known RegressionModels values. - */ - public static Collection values() { - return values(RegressionModels.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java deleted file mode 100644 index 012b72021bdd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Primary metrics for Regression task. - */ -public final class RegressionPrimaryMetrics extends ExpandableStringEnum { - /** - * Static value SpearmanCorrelation for RegressionPrimaryMetrics. - */ - public static final RegressionPrimaryMetrics SPEARMAN_CORRELATION = fromString("SpearmanCorrelation"); - - /** - * Static value NormalizedRootMeanSquaredError for RegressionPrimaryMetrics. - */ - public static final RegressionPrimaryMetrics NORMALIZED_ROOT_MEAN_SQUARED_ERROR - = fromString("NormalizedRootMeanSquaredError"); - - /** - * Static value R2Score for RegressionPrimaryMetrics. - */ - public static final RegressionPrimaryMetrics R2SCORE = fromString("R2Score"); - - /** - * Static value NormalizedMeanAbsoluteError for RegressionPrimaryMetrics. - */ - public static final RegressionPrimaryMetrics NORMALIZED_MEAN_ABSOLUTE_ERROR - = fromString("NormalizedMeanAbsoluteError"); - - /** - * Creates a new instance of RegressionPrimaryMetrics value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RegressionPrimaryMetrics() { - } - - /** - * Creates or finds a RegressionPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding RegressionPrimaryMetrics. - */ - public static RegressionPrimaryMetrics fromString(String name) { - return fromString(name, RegressionPrimaryMetrics.class); - } - - /** - * Gets known RegressionPrimaryMetrics values. - * - * @return known RegressionPrimaryMetrics values. - */ - public static Collection values() { - return values(RegressionPrimaryMetrics.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java deleted file mode 100644 index aaf2bce55082..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; -import java.util.List; - -/** - * Regression Training related configuration. - */ -@Fluent -public final class RegressionTrainingSettings extends TrainingSettings { - /* - * Allowed models for regression task. - */ - private List allowedTrainingAlgorithms; - - /* - * Blocked models for regression task. - */ - private List blockedTrainingAlgorithms; - - /** - * Creates an instance of RegressionTrainingSettings class. - */ - public RegressionTrainingSettings() { - } - - /** - * Get the allowedTrainingAlgorithms property: Allowed models for regression task. - * - * @return the allowedTrainingAlgorithms value. - */ - public List allowedTrainingAlgorithms() { - return this.allowedTrainingAlgorithms; - } - - /** - * Set the allowedTrainingAlgorithms property: Allowed models for regression task. - * - * @param allowedTrainingAlgorithms the allowedTrainingAlgorithms value to set. - * @return the RegressionTrainingSettings object itself. - */ - public RegressionTrainingSettings withAllowedTrainingAlgorithms(List allowedTrainingAlgorithms) { - this.allowedTrainingAlgorithms = allowedTrainingAlgorithms; - return this; - } - - /** - * Get the blockedTrainingAlgorithms property: Blocked models for regression task. - * - * @return the blockedTrainingAlgorithms value. - */ - public List blockedTrainingAlgorithms() { - return this.blockedTrainingAlgorithms; - } - - /** - * Set the blockedTrainingAlgorithms property: Blocked models for regression task. - * - * @param blockedTrainingAlgorithms the blockedTrainingAlgorithms value to set. - * @return the RegressionTrainingSettings object itself. - */ - public RegressionTrainingSettings withBlockedTrainingAlgorithms(List blockedTrainingAlgorithms) { - this.blockedTrainingAlgorithms = blockedTrainingAlgorithms; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RegressionTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { - super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RegressionTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { - super.withStackEnsembleSettings(stackEnsembleSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RegressionTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { - super.withEnableStackEnsemble(enableStackEnsemble); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RegressionTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { - super.withEnableVoteEnsemble(enableVoteEnsemble); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RegressionTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { - super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RegressionTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { - super.withEnableModelExplainability(enableModelExplainability); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RegressionTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { - super.withEnableDnnTraining(enableDnnTraining); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enableOnnxCompatibleModels", enableOnnxCompatibleModels()); - jsonWriter.writeJsonField("stackEnsembleSettings", stackEnsembleSettings()); - jsonWriter.writeBooleanField("enableStackEnsemble", enableStackEnsemble()); - jsonWriter.writeBooleanField("enableVoteEnsemble", enableVoteEnsemble()); - jsonWriter.writeStringField("ensembleModelDownloadTimeout", - CoreUtils.durationToStringWithDays(ensembleModelDownloadTimeout())); - jsonWriter.writeBooleanField("enableModelExplainability", enableModelExplainability()); - jsonWriter.writeBooleanField("enableDnnTraining", enableDnnTraining()); - jsonWriter.writeArrayField("allowedTrainingAlgorithms", this.allowedTrainingAlgorithms, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeArrayField("blockedTrainingAlgorithms", this.blockedTrainingAlgorithms, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegressionTrainingSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegressionTrainingSettings if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RegressionTrainingSettings. - */ - public static RegressionTrainingSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegressionTrainingSettings deserializedRegressionTrainingSettings = new RegressionTrainingSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enableOnnxCompatibleModels".equals(fieldName)) { - deserializedRegressionTrainingSettings - .withEnableOnnxCompatibleModels(reader.getNullable(JsonReader::getBoolean)); - } else if ("stackEnsembleSettings".equals(fieldName)) { - deserializedRegressionTrainingSettings - .withStackEnsembleSettings(StackEnsembleSettings.fromJson(reader)); - } else if ("enableStackEnsemble".equals(fieldName)) { - deserializedRegressionTrainingSettings - .withEnableStackEnsemble(reader.getNullable(JsonReader::getBoolean)); - } else if ("enableVoteEnsemble".equals(fieldName)) { - deserializedRegressionTrainingSettings - .withEnableVoteEnsemble(reader.getNullable(JsonReader::getBoolean)); - } else if ("ensembleModelDownloadTimeout".equals(fieldName)) { - deserializedRegressionTrainingSettings.withEnsembleModelDownloadTimeout( - reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()))); - } else if ("enableModelExplainability".equals(fieldName)) { - deserializedRegressionTrainingSettings - .withEnableModelExplainability(reader.getNullable(JsonReader::getBoolean)); - } else if ("enableDnnTraining".equals(fieldName)) { - deserializedRegressionTrainingSettings - .withEnableDnnTraining(reader.getNullable(JsonReader::getBoolean)); - } else if ("allowedTrainingAlgorithms".equals(fieldName)) { - List allowedTrainingAlgorithms - = reader.readArray(reader1 -> RegressionModels.fromString(reader1.getString())); - deserializedRegressionTrainingSettings.allowedTrainingAlgorithms = allowedTrainingAlgorithms; - } else if ("blockedTrainingAlgorithms".equals(fieldName)) { - List blockedTrainingAlgorithms - = reader.readArray(reader1 -> RegressionModels.fromString(reader1.getString())); - deserializedRegressionTrainingSettings.blockedTrainingAlgorithms = blockedTrainingAlgorithms; - } else { - reader.skipChildren(); - } - } - - return deserializedRegressionTrainingSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.java deleted file mode 100644 index 8553656691b2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Close remote Login Access Port - * - * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all - * nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - * - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all - * public nodes. It can be default only during cluster creation time, after creation it will be either enabled or - * disabled. - */ -public final class RemoteLoginPortPublicAccess extends ExpandableStringEnum { - /** - * Static value Enabled for RemoteLoginPortPublicAccess. - */ - public static final RemoteLoginPortPublicAccess ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for RemoteLoginPortPublicAccess. - */ - public static final RemoteLoginPortPublicAccess DISABLED = fromString("Disabled"); - - /** - * Static value NotSpecified for RemoteLoginPortPublicAccess. - */ - public static final RemoteLoginPortPublicAccess NOT_SPECIFIED = fromString("NotSpecified"); - - /** - * Creates a new instance of RemoteLoginPortPublicAccess value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RemoteLoginPortPublicAccess() { - } - - /** - * Creates or finds a RemoteLoginPortPublicAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding RemoteLoginPortPublicAccess. - */ - public static RemoteLoginPortPublicAccess fromString(String name) { - return fromString(name, RemoteLoginPortPublicAccess.class); - } - - /** - * Gets known RemoteLoginPortPublicAccess values. - * - * @return known RemoteLoginPortPublicAccess values. - */ - public static Collection values() { - return values(RemoteLoginPortPublicAccess.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestLogging.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestLogging.java deleted file mode 100644 index ee29411190b8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestLogging.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The RequestLogging model. - */ -@Fluent -public final class RequestLogging implements JsonSerializable { - /* - * For payload logging, we only collect payload by default. If customers also want to collect the specified headers, - * they can set them in captureHeaders so that backend will collect those headers along with payload. - */ - private List captureHeaders; - - /** - * Creates an instance of RequestLogging class. - */ - public RequestLogging() { - } - - /** - * Get the captureHeaders property: For payload logging, we only collect payload by default. If customers also want - * to collect the specified headers, they can set them in captureHeaders so that backend will collect those headers - * along with payload. - * - * @return the captureHeaders value. - */ - public List captureHeaders() { - return this.captureHeaders; - } - - /** - * Set the captureHeaders property: For payload logging, we only collect payload by default. If customers also want - * to collect the specified headers, they can set them in captureHeaders so that backend will collect those headers - * along with payload. - * - * @param captureHeaders the captureHeaders value to set. - * @return the RequestLogging object itself. - */ - public RequestLogging withCaptureHeaders(List captureHeaders) { - this.captureHeaders = captureHeaders; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("captureHeaders", this.captureHeaders, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RequestLogging from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RequestLogging if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RequestLogging. - */ - public static RequestLogging fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RequestLogging deserializedRequestLogging = new RequestLogging(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("captureHeaders".equals(fieldName)) { - List captureHeaders = reader.readArray(reader1 -> reader1.getString()); - deserializedRequestLogging.captureHeaders = captureHeaders; - } else { - reader.skipChildren(); - } - } - - return deserializedRequestLogging; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.java deleted file mode 100644 index 2c08db43b2b7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The ResourceBase model. - */ -@Fluent -public class ResourceBase implements JsonSerializable { - /* - * The asset description text. - */ - private String description; - - /* - * Tag dictionary. Tags can be added, removed, and updated. - */ - private Map tags; - - /* - * The asset property dictionary. - */ - private Map properties; - - /** - * Creates an instance of ResourceBase class. - */ - public ResourceBase() { - } - - /** - * Get the description property: The asset description text. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The asset description text. - * - * @param description the description value to set. - * @return the ResourceBase object itself. - */ - public ResourceBase withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the tags property: Tag dictionary. Tags can be added, removed, and updated. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Tag dictionary. Tags can be added, removed, and updated. - * - * @param tags the tags value to set. - * @return the ResourceBase object itself. - */ - public ResourceBase withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the properties property: The asset property dictionary. - * - * @return the properties value. - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties property: The asset property dictionary. - * - * @param properties the properties value to set. - * @return the ResourceBase object itself. - */ - public ResourceBase withProperties(Map properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResourceBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResourceBase if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ResourceBase. - */ - public static ResourceBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResourceBase deserializedResourceBase = new ResourceBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedResourceBase.description = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedResourceBase.tags = tags; - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedResourceBase.properties = properties; - } else { - reader.skipChildren(); - } - } - - return deserializedResourceBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceConfiguration.java deleted file mode 100644 index 5cbf10d7ade1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceConfiguration.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The ResourceConfiguration model. - */ -@Fluent -public class ResourceConfiguration implements JsonSerializable { - /* - * Optional number of instances or nodes used by the compute target. - */ - private Integer instanceCount; - - /* - * Optional type of VM used as supported by the compute target. - */ - private String instanceType; - - /* - * Additional properties bag. - */ - private Map properties; - - /** - * Creates an instance of ResourceConfiguration class. - */ - public ResourceConfiguration() { - } - - /** - * Get the instanceCount property: Optional number of instances or nodes used by the compute target. - * - * @return the instanceCount value. - */ - public Integer instanceCount() { - return this.instanceCount; - } - - /** - * Set the instanceCount property: Optional number of instances or nodes used by the compute target. - * - * @param instanceCount the instanceCount value to set. - * @return the ResourceConfiguration object itself. - */ - public ResourceConfiguration withInstanceCount(Integer instanceCount) { - this.instanceCount = instanceCount; - return this; - } - - /** - * Get the instanceType property: Optional type of VM used as supported by the compute target. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Set the instanceType property: Optional type of VM used as supported by the compute target. - * - * @param instanceType the instanceType value to set. - * @return the ResourceConfiguration object itself. - */ - public ResourceConfiguration withInstanceType(String instanceType) { - this.instanceType = instanceType; - return this; - } - - /** - * Get the properties property: Additional properties bag. - * - * @return the properties value. - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties property: Additional properties bag. - * - * @param properties the properties value to set. - * @return the ResourceConfiguration object itself. - */ - public ResourceConfiguration withProperties(Map properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("instanceCount", this.instanceCount); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeUntyped(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResourceConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResourceConfiguration if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ResourceConfiguration. - */ - public static ResourceConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResourceConfiguration deserializedResourceConfiguration = new ResourceConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceCount".equals(fieldName)) { - deserializedResourceConfiguration.instanceCount = reader.getNullable(JsonReader::getInt); - } else if ("instanceType".equals(fieldName)) { - deserializedResourceConfiguration.instanceType = reader.getString(); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedResourceConfiguration.properties = properties; - } else { - reader.skipChildren(); - } - } - - return deserializedResourceConfiguration; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.java deleted file mode 100644 index 194c1b119a67..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet. - */ -@Fluent -public final class ResourceId implements JsonSerializable { - /* - * The ID of the resource - */ - private String id; - - /** - * Creates an instance of ResourceId class. - */ - public ResourceId() { - } - - /** - * Get the id property: The ID of the resource. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The ID of the resource. - * - * @param id the id value to set. - * @return the ResourceId object itself. - */ - public ResourceId withId(String id) { - this.id = id; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property id in model ResourceId")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ResourceId.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResourceId from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResourceId if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ResourceId. - */ - public static ResourceId fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResourceId deserializedResourceId = new ResourceId(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedResourceId.id = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedResourceId; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.java deleted file mode 100644 index 383cf8440c9d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The Resource Name. - */ -@Immutable -public final class ResourceName implements JsonSerializable { - /* - * The name of the resource. - */ - private String value; - - /* - * The localized name of the resource. - */ - private String localizedValue; - - /** - * Creates an instance of ResourceName class. - */ - public ResourceName() { - } - - /** - * Get the value property: The name of the resource. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Get the localizedValue property: The localized name of the resource. - * - * @return the localizedValue value. - */ - public String localizedValue() { - return this.localizedValue; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResourceName from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResourceName if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ResourceName. - */ - public static ResourceName fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResourceName deserializedResourceName = new ResourceName(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - deserializedResourceName.value = reader.getString(); - } else if ("localizedValue".equals(fieldName)) { - deserializedResourceName.localizedValue = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedResourceName; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceQuota.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceQuota.java deleted file mode 100644 index 85bc8443984d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceQuota.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner; - -/** - * An immutable client-side representation of ResourceQuota. - */ -public interface ResourceQuota { - /** - * Gets the id property: Specifies the resource ID. - * - * @return the id value. - */ - String id(); - - /** - * Gets the amlWorkspaceLocation property: Region of the AML workspace in the id. - * - * @return the amlWorkspaceLocation value. - */ - String amlWorkspaceLocation(); - - /** - * Gets the type property: Specifies the resource type. - * - * @return the type value. - */ - String type(); - - /** - * Gets the name property: Name of the resource. - * - * @return the name value. - */ - ResourceName name(); - - /** - * Gets the limit property: The maximum permitted quota of the resource. - * - * @return the limit value. - */ - Long limit(); - - /** - * Gets the unit property: An enum describing the unit of quota measurement. - * - * @return the unit value. - */ - QuotaUnit unit(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner object. - * - * @return the inner object. - */ - ResourceQuotaInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingInputData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingInputData.java deleted file mode 100644 index d21abe38c714..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingInputData.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; -import java.util.Map; - -/** - * Rolling input data definition. - */ -@Fluent -public final class RollingInputData extends MonitoringInputDataBase { - /* - * [Required] Specifies the type of signal to monitor. - */ - private MonitoringInputDataType inputDataType = MonitoringInputDataType.ROLLING; - - /* - * [Required] The time offset between the end of the data window and the monitor's current run time. - */ - private Duration windowOffset; - - /* - * [Required] The size of the rolling data window. - */ - private Duration windowSize; - - /* - * Reference to the component asset used to preprocess the data. - */ - private String preprocessingComponentId; - - /** - * Creates an instance of RollingInputData class. - */ - public RollingInputData() { - } - - /** - * Get the inputDataType property: [Required] Specifies the type of signal to monitor. - * - * @return the inputDataType value. - */ - @Override - public MonitoringInputDataType inputDataType() { - return this.inputDataType; - } - - /** - * Get the windowOffset property: [Required] The time offset between the end of the data window and the monitor's - * current run time. - * - * @return the windowOffset value. - */ - public Duration windowOffset() { - return this.windowOffset; - } - - /** - * Set the windowOffset property: [Required] The time offset between the end of the data window and the monitor's - * current run time. - * - * @param windowOffset the windowOffset value to set. - * @return the RollingInputData object itself. - */ - public RollingInputData withWindowOffset(Duration windowOffset) { - this.windowOffset = windowOffset; - return this; - } - - /** - * Get the windowSize property: [Required] The size of the rolling data window. - * - * @return the windowSize value. - */ - public Duration windowSize() { - return this.windowSize; - } - - /** - * Set the windowSize property: [Required] The size of the rolling data window. - * - * @param windowSize the windowSize value to set. - * @return the RollingInputData object itself. - */ - public RollingInputData withWindowSize(Duration windowSize) { - this.windowSize = windowSize; - return this; - } - - /** - * Get the preprocessingComponentId property: Reference to the component asset used to preprocess the data. - * - * @return the preprocessingComponentId value. - */ - public String preprocessingComponentId() { - return this.preprocessingComponentId; - } - - /** - * Set the preprocessingComponentId property: Reference to the component asset used to preprocess the data. - * - * @param preprocessingComponentId the preprocessingComponentId value to set. - * @return the RollingInputData object itself. - */ - public RollingInputData withPreprocessingComponentId(String preprocessingComponentId) { - this.preprocessingComponentId = preprocessingComponentId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RollingInputData withDataContext(String dataContext) { - super.withDataContext(dataContext); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RollingInputData withJobInputType(JobInputType jobInputType) { - super.withJobInputType(jobInputType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RollingInputData withUri(String uri) { - super.withUri(uri); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RollingInputData withColumns(Map columns) { - super.withColumns(columns); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (windowOffset() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property windowOffset in model RollingInputData")); - } - if (windowSize() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property windowSize in model RollingInputData")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RollingInputData.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("jobInputType", jobInputType() == null ? null : jobInputType().toString()); - jsonWriter.writeStringField("uri", uri()); - jsonWriter.writeStringField("dataContext", dataContext()); - jsonWriter.writeMapField("columns", columns(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("windowOffset", CoreUtils.durationToStringWithDays(this.windowOffset)); - jsonWriter.writeStringField("windowSize", CoreUtils.durationToStringWithDays(this.windowSize)); - jsonWriter.writeStringField("inputDataType", this.inputDataType == null ? null : this.inputDataType.toString()); - jsonWriter.writeStringField("preprocessingComponentId", this.preprocessingComponentId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RollingInputData from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RollingInputData if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RollingInputData. - */ - public static RollingInputData fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RollingInputData deserializedRollingInputData = new RollingInputData(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobInputType".equals(fieldName)) { - deserializedRollingInputData.withJobInputType(JobInputType.fromString(reader.getString())); - } else if ("uri".equals(fieldName)) { - deserializedRollingInputData.withUri(reader.getString()); - } else if ("dataContext".equals(fieldName)) { - deserializedRollingInputData.withDataContext(reader.getString()); - } else if ("columns".equals(fieldName)) { - Map columns = reader.readMap(reader1 -> reader1.getString()); - deserializedRollingInputData.withColumns(columns); - } else if ("windowOffset".equals(fieldName)) { - deserializedRollingInputData.windowOffset - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("windowSize".equals(fieldName)) { - deserializedRollingInputData.windowSize - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("inputDataType".equals(fieldName)) { - deserializedRollingInputData.inputDataType = MonitoringInputDataType.fromString(reader.getString()); - } else if ("preprocessingComponentId".equals(fieldName)) { - deserializedRollingInputData.preprocessingComponentId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRollingInputData; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingRateType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingRateType.java deleted file mode 100644 index 718833559f87..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingRateType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for RollingRateType. - */ -public final class RollingRateType extends ExpandableStringEnum { - /** - * Static value Year for RollingRateType. - */ - public static final RollingRateType YEAR = fromString("Year"); - - /** - * Static value Month for RollingRateType. - */ - public static final RollingRateType MONTH = fromString("Month"); - - /** - * Static value Day for RollingRateType. - */ - public static final RollingRateType DAY = fromString("Day"); - - /** - * Static value Hour for RollingRateType. - */ - public static final RollingRateType HOUR = fromString("Hour"); - - /** - * Static value Minute for RollingRateType. - */ - public static final RollingRateType MINUTE = fromString("Minute"); - - /** - * Creates a new instance of RollingRateType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RollingRateType() { - } - - /** - * Creates or finds a RollingRateType from its string representation. - * - * @param name a name to look for. - * @return the corresponding RollingRateType. - */ - public static RollingRateType fromString(String name) { - return fromString(name, RollingRateType.class); - } - - /** - * Gets known RollingRateType values. - * - * @return known RollingRateType values. - */ - public static Collection values() { - return values(RollingRateType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java deleted file mode 100644 index 1bdf766427da..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Route.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The Route model. - */ -@Fluent -public final class Route implements JsonSerializable { - /* - * [Required] The path for the route. - */ - private String path; - - /* - * [Required] The port for the route. - */ - private int port; - - /** - * Creates an instance of Route class. - */ - public Route() { - } - - /** - * Get the path property: [Required] The path for the route. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: [Required] The path for the route. - * - * @param path the path value to set. - * @return the Route object itself. - */ - public Route withPath(String path) { - this.path = path; - return this; - } - - /** - * Get the port property: [Required] The port for the route. - * - * @return the port value. - */ - public int port() { - return this.port; - } - - /** - * Set the port property: [Required] The port for the route. - * - * @param port the port value to set. - * @return the Route object itself. - */ - public Route withPort(int port) { - this.port = port; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (path() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property path in model Route")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Route.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("path", this.path); - jsonWriter.writeIntField("port", this.port); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Route from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Route if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the Route. - */ - public static Route fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Route deserializedRoute = new Route(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("path".equals(fieldName)) { - deserializedRoute.path = reader.getString(); - } else if ("port".equals(fieldName)) { - deserializedRoute.port = reader.getInt(); - } else { - reader.skipChildren(); - } - } - - return deserializedRoute; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleAction.java deleted file mode 100644 index 650aad805d24..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleAction.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The action enum for networking rule. - */ -public final class RuleAction extends ExpandableStringEnum { - /** - * Static value Allow for RuleAction. - */ - public static final RuleAction ALLOW = fromString("Allow"); - - /** - * Static value Deny for RuleAction. - */ - public static final RuleAction DENY = fromString("Deny"); - - /** - * Creates a new instance of RuleAction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RuleAction() { - } - - /** - * Creates or finds a RuleAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding RuleAction. - */ - public static RuleAction fromString(String name) { - return fromString(name, RuleAction.class); - } - - /** - * Gets known RuleAction values. - * - * @return known RuleAction values. - */ - public static Collection values() { - return values(RuleAction.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleCategory.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleCategory.java deleted file mode 100644 index d5b1d8717269..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleCategory.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Category of a managed network Outbound Rule of a machine learning workspace. - */ -public final class RuleCategory extends ExpandableStringEnum { - /** - * Static value Required for RuleCategory. - */ - public static final RuleCategory REQUIRED = fromString("Required"); - - /** - * Static value Recommended for RuleCategory. - */ - public static final RuleCategory RECOMMENDED = fromString("Recommended"); - - /** - * Static value UserDefined for RuleCategory. - */ - public static final RuleCategory USER_DEFINED = fromString("UserDefined"); - - /** - * Static value Dependency for RuleCategory. - */ - public static final RuleCategory DEPENDENCY = fromString("Dependency"); - - /** - * Creates a new instance of RuleCategory value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RuleCategory() { - } - - /** - * Creates or finds a RuleCategory from its string representation. - * - * @param name a name to look for. - * @return the corresponding RuleCategory. - */ - public static RuleCategory fromString(String name) { - return fromString(name, RuleCategory.class); - } - - /** - * Gets known RuleCategory values. - * - * @return known RuleCategory values. - */ - public static Collection values() { - return values(RuleCategory.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleStatus.java deleted file mode 100644 index 102835e447a4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleStatus.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of a managed network Outbound Rule of a machine learning workspace. - */ -public final class RuleStatus extends ExpandableStringEnum { - /** - * Static value Inactive for RuleStatus. - */ - public static final RuleStatus INACTIVE = fromString("Inactive"); - - /** - * Static value Active for RuleStatus. - */ - public static final RuleStatus ACTIVE = fromString("Active"); - - /** - * Creates a new instance of RuleStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RuleStatus() { - } - - /** - * Creates or finds a RuleStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding RuleStatus. - */ - public static RuleStatus fromString(String name) { - return fromString(name, RuleStatus.class); - } - - /** - * Gets known RuleStatus values. - * - * @return known RuleStatus values. - */ - public static Collection values() { - return values(RuleStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleType.java deleted file mode 100644 index d3c426d67a90..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of a managed network Outbound Rule of a machine learning workspace. - */ -public final class RuleType extends ExpandableStringEnum { - /** - * Static value FQDN for RuleType. - */ - public static final RuleType FQDN = fromString("FQDN"); - - /** - * Static value PrivateEndpoint for RuleType. - */ - public static final RuleType PRIVATE_ENDPOINT = fromString("PrivateEndpoint"); - - /** - * Static value ServiceTag for RuleType. - */ - public static final RuleType SERVICE_TAG = fromString("ServiceTag"); - - /** - * Creates a new instance of RuleType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RuleType() { - } - - /** - * Creates or finds a RuleType from its string representation. - * - * @param name a name to look for. - * @return the corresponding RuleType. - */ - public static RuleType fromString(String name) { - return fromString(name, RuleType.class); - } - - /** - * Gets known RuleType values. - * - * @return known RuleType values. - */ - public static Collection values() { - return values(RuleType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.java deleted file mode 100644 index 4846403c3bed..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The Sampling Algorithm used to generate hyperparameter values, along with properties to - * configure the algorithm. - */ -@Immutable -public class SamplingAlgorithm implements JsonSerializable { - /* - * [Required] The algorithm used for generating hyperparameter values, along with configuration properties - */ - private SamplingAlgorithmType samplingAlgorithmType = SamplingAlgorithmType.fromString("SamplingAlgorithm"); - - /** - * Creates an instance of SamplingAlgorithm class. - */ - public SamplingAlgorithm() { - } - - /** - * Get the samplingAlgorithmType property: [Required] The algorithm used for generating hyperparameter values, along - * with configuration properties. - * - * @return the samplingAlgorithmType value. - */ - public SamplingAlgorithmType samplingAlgorithmType() { - return this.samplingAlgorithmType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("samplingAlgorithmType", - this.samplingAlgorithmType == null ? null : this.samplingAlgorithmType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SamplingAlgorithm from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SamplingAlgorithm if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SamplingAlgorithm. - */ - public static SamplingAlgorithm fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("samplingAlgorithmType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Bayesian".equals(discriminatorValue)) { - return BayesianSamplingAlgorithm.fromJson(readerToUse.reset()); - } else if ("Grid".equals(discriminatorValue)) { - return GridSamplingAlgorithm.fromJson(readerToUse.reset()); - } else if ("Random".equals(discriminatorValue)) { - return RandomSamplingAlgorithm.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static SamplingAlgorithm fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SamplingAlgorithm deserializedSamplingAlgorithm = new SamplingAlgorithm(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("samplingAlgorithmType".equals(fieldName)) { - deserializedSamplingAlgorithm.samplingAlgorithmType - = SamplingAlgorithmType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSamplingAlgorithm; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithmType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithmType.java deleted file mode 100644 index 2dc248a5747f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithmType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for SamplingAlgorithmType. - */ -public final class SamplingAlgorithmType extends ExpandableStringEnum { - /** - * Static value Grid for SamplingAlgorithmType. - */ - public static final SamplingAlgorithmType GRID = fromString("Grid"); - - /** - * Static value Random for SamplingAlgorithmType. - */ - public static final SamplingAlgorithmType RANDOM = fromString("Random"); - - /** - * Static value Bayesian for SamplingAlgorithmType. - */ - public static final SamplingAlgorithmType BAYESIAN = fromString("Bayesian"); - - /** - * Creates a new instance of SamplingAlgorithmType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SamplingAlgorithmType() { - } - - /** - * Creates or finds a SamplingAlgorithmType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SamplingAlgorithmType. - */ - public static SamplingAlgorithmType fromString(String name) { - return fromString(name, SamplingAlgorithmType.class); - } - - /** - * Gets known SamplingAlgorithmType values. - * - * @return known SamplingAlgorithmType values. - */ - public static Collection values() { - return values(SamplingAlgorithmType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java deleted file mode 100644 index 33ccc29791fe..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; - -/** - * The SasAuthTypeWorkspaceConnectionProperties model. - */ -@Fluent -public final class SasAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /* - * Authentication type of the connection target - */ - private ConnectionAuthType authType = ConnectionAuthType.SAS; - - /* - * The credentials property. - */ - private WorkspaceConnectionSharedAccessSignature credentials; - - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - - /** - * Creates an instance of SasAuthTypeWorkspaceConnectionProperties class. - */ - public SasAuthTypeWorkspaceConnectionProperties() { - } - - /** - * Get the authType property: Authentication type of the connection target. - * - * @return the authType value. - */ - @Override - public ConnectionAuthType authType() { - return this.authType; - } - - /** - * Get the credentials property: The credentials property. - * - * @return the credentials value. - */ - public WorkspaceConnectionSharedAccessSignature credentials() { - return this.credentials; - } - - /** - * Set the credentials property: The credentials property. - * - * @param credentials the credentials value to set. - * @return the SasAuthTypeWorkspaceConnectionProperties object itself. - */ - public SasAuthTypeWorkspaceConnectionProperties - withCredentials(WorkspaceConnectionSharedAccessSignature credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. - */ - @Override - public ConnectionGroup group() { - return this.group; - } - - /** - * {@inheritDoc} - */ - @Override - public SasAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SasAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SasAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SasAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SasAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SasAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { - super.withSharedUserList(sharedUserList); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SasAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SasAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", category() == null ? null : category().toString()); - jsonWriter.writeStringField("expiryTime", - expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); - jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); - jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("sharedUserList", sharedUserList(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeJsonField("credentials", this.credentials); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SasAuthTypeWorkspaceConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SasAuthTypeWorkspaceConnectionProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SasAuthTypeWorkspaceConnectionProperties. - */ - public static SasAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SasAuthTypeWorkspaceConnectionProperties deserializedSasAuthTypeWorkspaceConnectionProperties - = new SasAuthTypeWorkspaceConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties - .withCategory(ConnectionCategory.fromString(reader.getString())); - } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); - } else if ("expiryTime".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("group".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); - } else if ("isSharedToAll".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties - .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); - } else if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedSasAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); - } else if ("sharedUserList".equals(fieldName)) { - List sharedUserList = reader.readArray(reader1 -> reader1.getString()); - deserializedSasAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties.authType - = ConnectionAuthType.fromString(reader.getString()); - } else if ("credentials".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties.credentials - = WorkspaceConnectionSharedAccessSignature.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSasAuthTypeWorkspaceConnectionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredential.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredential.java deleted file mode 100644 index cd31e7be4d1c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredential.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Access with full SAS uri. - */ -@Fluent -public final class SasCredential extends DataReferenceCredential { - /* - * [Required] Credential type used to authentication with storage. - */ - private DataReferenceCredentialType credentialType = DataReferenceCredentialType.SAS; - - /* - * Full SAS Uri, including the storage, container/blob path and SAS token - */ - private String sasUri; - - /** - * Creates an instance of SasCredential class. - */ - public SasCredential() { - } - - /** - * Get the credentialType property: [Required] Credential type used to authentication with storage. - * - * @return the credentialType value. - */ - @Override - public DataReferenceCredentialType credentialType() { - return this.credentialType; - } - - /** - * Get the sasUri property: Full SAS Uri, including the storage, container/blob path and SAS token. - * - * @return the sasUri value. - */ - public String sasUri() { - return this.sasUri; - } - - /** - * Set the sasUri property: Full SAS Uri, including the storage, container/blob path and SAS token. - * - * @param sasUri the sasUri value to set. - * @return the SasCredential object itself. - */ - public SasCredential withSasUri(String sasUri) { - this.sasUri = sasUri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("credentialType", - this.credentialType == null ? null : this.credentialType.toString()); - jsonWriter.writeStringField("sasUri", this.sasUri); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SasCredential from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SasCredential if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SasCredential. - */ - public static SasCredential fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SasCredential deserializedSasCredential = new SasCredential(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("credentialType".equals(fieldName)) { - deserializedSasCredential.credentialType - = DataReferenceCredentialType.fromString(reader.getString()); - } else if ("sasUri".equals(fieldName)) { - deserializedSasCredential.sasUri = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSasCredential; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredentialDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredentialDto.java deleted file mode 100644 index 435c44e23b65..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredentialDto.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The SasCredentialDto model. - */ -@Fluent -public final class SasCredentialDto extends PendingUploadCredentialDto { - /* - * [Required] Credential type used to authentication with storage. - */ - private PendingUploadCredentialType credentialType = PendingUploadCredentialType.SAS; - - /* - * Full SAS Uri, including the storage, container/blob path and SAS token - */ - private String sasUri; - - /** - * Creates an instance of SasCredentialDto class. - */ - public SasCredentialDto() { - } - - /** - * Get the credentialType property: [Required] Credential type used to authentication with storage. - * - * @return the credentialType value. - */ - @Override - public PendingUploadCredentialType credentialType() { - return this.credentialType; - } - - /** - * Get the sasUri property: Full SAS Uri, including the storage, container/blob path and SAS token. - * - * @return the sasUri value. - */ - public String sasUri() { - return this.sasUri; - } - - /** - * Set the sasUri property: Full SAS Uri, including the storage, container/blob path and SAS token. - * - * @param sasUri the sasUri value to set. - * @return the SasCredentialDto object itself. - */ - public SasCredentialDto withSasUri(String sasUri) { - this.sasUri = sasUri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("credentialType", - this.credentialType == null ? null : this.credentialType.toString()); - jsonWriter.writeStringField("sasUri", this.sasUri); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SasCredentialDto from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SasCredentialDto if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SasCredentialDto. - */ - public static SasCredentialDto fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SasCredentialDto deserializedSasCredentialDto = new SasCredentialDto(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("credentialType".equals(fieldName)) { - deserializedSasCredentialDto.credentialType - = PendingUploadCredentialType.fromString(reader.getString()); - } else if ("sasUri".equals(fieldName)) { - deserializedSasCredentialDto.sasUri = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSasCredentialDto; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.java deleted file mode 100644 index 6fd6dec72378..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * SAS datastore credentials configuration. - */ -@Fluent -public final class SasDatastoreCredentials extends DatastoreCredentials { - /* - * [Required] Credential type used to authentication with storage. - */ - private CredentialsType credentialsType = CredentialsType.SAS; - - /* - * [Required] Storage container secrets. - */ - private SasDatastoreSecrets secrets; - - /** - * Creates an instance of SasDatastoreCredentials class. - */ - public SasDatastoreCredentials() { - } - - /** - * Get the credentialsType property: [Required] Credential type used to authentication with storage. - * - * @return the credentialsType value. - */ - @Override - public CredentialsType credentialsType() { - return this.credentialsType; - } - - /** - * Get the secrets property: [Required] Storage container secrets. - * - * @return the secrets value. - */ - public SasDatastoreSecrets secrets() { - return this.secrets; - } - - /** - * Set the secrets property: [Required] Storage container secrets. - * - * @param secrets the secrets value to set. - * @return the SasDatastoreCredentials object itself. - */ - public SasDatastoreCredentials withSecrets(SasDatastoreSecrets secrets) { - this.secrets = secrets; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (secrets() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property secrets in model SasDatastoreCredentials")); - } else { - secrets().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SasDatastoreCredentials.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("secrets", this.secrets); - jsonWriter.writeStringField("credentialsType", - this.credentialsType == null ? null : this.credentialsType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SasDatastoreCredentials from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SasDatastoreCredentials if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SasDatastoreCredentials. - */ - public static SasDatastoreCredentials fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SasDatastoreCredentials deserializedSasDatastoreCredentials = new SasDatastoreCredentials(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("secrets".equals(fieldName)) { - deserializedSasDatastoreCredentials.secrets = SasDatastoreSecrets.fromJson(reader); - } else if ("credentialsType".equals(fieldName)) { - deserializedSasDatastoreCredentials.credentialsType - = CredentialsType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSasDatastoreCredentials; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java deleted file mode 100644 index 47aca7a15101..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import java.io.IOException; - -/** - * Datastore SAS secrets. - */ -@Fluent -public final class SasDatastoreSecrets extends DatastoreSecretsInner { - /* - * [Required] Credential type used to authentication with storage. - */ - private SecretsType secretsType = SecretsType.SAS; - - /* - * Storage container SAS token. - */ - private String sasToken; - - /** - * Creates an instance of SasDatastoreSecrets class. - */ - public SasDatastoreSecrets() { - } - - /** - * Get the secretsType property: [Required] Credential type used to authentication with storage. - * - * @return the secretsType value. - */ - @Override - public SecretsType secretsType() { - return this.secretsType; - } - - /** - * Get the sasToken property: Storage container SAS token. - * - * @return the sasToken value. - */ - public String sasToken() { - return this.sasToken; - } - - /** - * Set the sasToken property: Storage container SAS token. - * - * @param sasToken the sasToken value to set. - * @return the SasDatastoreSecrets object itself. - */ - public SasDatastoreSecrets withSasToken(String sasToken) { - this.sasToken = sasToken; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("secretsType", this.secretsType == null ? null : this.secretsType.toString()); - jsonWriter.writeStringField("sasToken", this.sasToken); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SasDatastoreSecrets from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SasDatastoreSecrets if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SasDatastoreSecrets. - */ - public static SasDatastoreSecrets fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SasDatastoreSecrets deserializedSasDatastoreSecrets = new SasDatastoreSecrets(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("secretsType".equals(fieldName)) { - deserializedSasDatastoreSecrets.secretsType = SecretsType.fromString(reader.getString()); - } else if ("sasToken".equals(fieldName)) { - deserializedSasDatastoreSecrets.sasToken = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSasDatastoreSecrets; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettings.java deleted file mode 100644 index 943e18f36e2b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettings.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; - -/** - * scale settings for AML Compute. - */ -@Fluent -public final class ScaleSettings implements JsonSerializable { - /* - * Max number of nodes to use - */ - private int maxNodeCount; - - /* - * Min number of nodes to use - */ - private Integer minNodeCount; - - /* - * Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format. - */ - private Duration nodeIdleTimeBeforeScaleDown; - - /** - * Creates an instance of ScaleSettings class. - */ - public ScaleSettings() { - } - - /** - * Get the maxNodeCount property: Max number of nodes to use. - * - * @return the maxNodeCount value. - */ - public int maxNodeCount() { - return this.maxNodeCount; - } - - /** - * Set the maxNodeCount property: Max number of nodes to use. - * - * @param maxNodeCount the maxNodeCount value to set. - * @return the ScaleSettings object itself. - */ - public ScaleSettings withMaxNodeCount(int maxNodeCount) { - this.maxNodeCount = maxNodeCount; - return this; - } - - /** - * Get the minNodeCount property: Min number of nodes to use. - * - * @return the minNodeCount value. - */ - public Integer minNodeCount() { - return this.minNodeCount; - } - - /** - * Set the minNodeCount property: Min number of nodes to use. - * - * @param minNodeCount the minNodeCount value to set. - * @return the ScaleSettings object itself. - */ - public ScaleSettings withMinNodeCount(Integer minNodeCount) { - this.minNodeCount = minNodeCount; - return this; - } - - /** - * Get the nodeIdleTimeBeforeScaleDown property: Node Idle Time before scaling down amlCompute. This string needs to - * be in the RFC Format. - * - * @return the nodeIdleTimeBeforeScaleDown value. - */ - public Duration nodeIdleTimeBeforeScaleDown() { - return this.nodeIdleTimeBeforeScaleDown; - } - - /** - * Set the nodeIdleTimeBeforeScaleDown property: Node Idle Time before scaling down amlCompute. This string needs to - * be in the RFC Format. - * - * @param nodeIdleTimeBeforeScaleDown the nodeIdleTimeBeforeScaleDown value to set. - * @return the ScaleSettings object itself. - */ - public ScaleSettings withNodeIdleTimeBeforeScaleDown(Duration nodeIdleTimeBeforeScaleDown) { - this.nodeIdleTimeBeforeScaleDown = nodeIdleTimeBeforeScaleDown; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeIntField("maxNodeCount", this.maxNodeCount); - jsonWriter.writeNumberField("minNodeCount", this.minNodeCount); - jsonWriter.writeStringField("nodeIdleTimeBeforeScaleDown", - CoreUtils.durationToStringWithDays(this.nodeIdleTimeBeforeScaleDown)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScaleSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScaleSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScaleSettings. - */ - public static ScaleSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScaleSettings deserializedScaleSettings = new ScaleSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxNodeCount".equals(fieldName)) { - deserializedScaleSettings.maxNodeCount = reader.getInt(); - } else if ("minNodeCount".equals(fieldName)) { - deserializedScaleSettings.minNodeCount = reader.getNullable(JsonReader::getInt); - } else if ("nodeIdleTimeBeforeScaleDown".equals(fieldName)) { - deserializedScaleSettings.nodeIdleTimeBeforeScaleDown - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedScaleSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.java deleted file mode 100644 index b9b9ba136573..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Desired scale settings for the amlCompute. - */ -@Fluent -public final class ScaleSettingsInformation implements JsonSerializable { - /* - * scale settings for AML Compute - */ - private ScaleSettings scaleSettings; - - /** - * Creates an instance of ScaleSettingsInformation class. - */ - public ScaleSettingsInformation() { - } - - /** - * Get the scaleSettings property: scale settings for AML Compute. - * - * @return the scaleSettings value. - */ - public ScaleSettings scaleSettings() { - return this.scaleSettings; - } - - /** - * Set the scaleSettings property: scale settings for AML Compute. - * - * @param scaleSettings the scaleSettings value to set. - * @return the ScaleSettingsInformation object itself. - */ - public ScaleSettingsInformation withScaleSettings(ScaleSettings scaleSettings) { - this.scaleSettings = scaleSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scaleSettings() != null) { - scaleSettings().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("scaleSettings", this.scaleSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScaleSettingsInformation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScaleSettingsInformation if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ScaleSettingsInformation. - */ - public static ScaleSettingsInformation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScaleSettingsInformation deserializedScaleSettingsInformation = new ScaleSettingsInformation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scaleSettings".equals(fieldName)) { - deserializedScaleSettingsInformation.scaleSettings = ScaleSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScaleSettingsInformation; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleType.java deleted file mode 100644 index 079d04a2b872..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for ScaleType. - */ -public final class ScaleType extends ExpandableStringEnum { - /** - * Static value Default for ScaleType. - */ - public static final ScaleType DEFAULT = fromString("Default"); - - /** - * Static value TargetUtilization for ScaleType. - */ - public static final ScaleType TARGET_UTILIZATION = fromString("TargetUtilization"); - - /** - * Creates a new instance of ScaleType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScaleType() { - } - - /** - * Creates or finds a ScaleType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScaleType. - */ - public static ScaleType fromString(String name) { - return fromString(name, ScaleType.class); - } - - /** - * Gets known ScaleType values. - * - * @return known ScaleType values. - */ - public static Collection values() { - return values(ScaleType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.java deleted file mode 100644 index 7a1c484a85b4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.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.machinelearning.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; - -/** - * An immutable client-side representation of Schedule. - */ -public interface Schedule { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - ScheduleProperties 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.machinelearning.fluent.models.ScheduleInner object. - * - * @return the inner object. - */ - ScheduleInner innerModel(); - - /** - * The entirety of the Schedule definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The Schedule definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Schedule definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the Schedule definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the Schedule definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(ScheduleProperties properties); - } - - /** - * The stage of the Schedule 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - Schedule create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Schedule create(Context context); - } - } - - /** - * Begins update for the Schedule resource. - * - * @return the stage of resource update. - */ - Schedule.Update update(); - - /** - * The template for Schedule update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Schedule apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Schedule apply(Context context); - } - - /** - * The Schedule update stages. - */ - interface UpdateStages { - /** - * The stage of the Schedule update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(ScheduleProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Schedule refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Schedule refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java deleted file mode 100644 index 8efcd708c16f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ScheduleActionBase model. - */ -@Immutable -public class ScheduleActionBase implements JsonSerializable { - /* - * [Required] Specifies the action type of the schedule - */ - private ScheduleActionType actionType = ScheduleActionType.fromString("ScheduleActionBase"); - - /** - * Creates an instance of ScheduleActionBase class. - */ - public ScheduleActionBase() { - } - - /** - * Get the actionType property: [Required] Specifies the action type of the schedule. - * - * @return the actionType value. - */ - public ScheduleActionType actionType() { - return this.actionType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("actionType", this.actionType == null ? null : this.actionType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScheduleActionBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScheduleActionBase if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ScheduleActionBase. - */ - public static ScheduleActionBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("actionType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("CreateMonitor".equals(discriminatorValue)) { - return CreateMonitorAction.fromJson(readerToUse.reset()); - } else if ("InvokeBatchEndpoint".equals(discriminatorValue)) { - return EndpointScheduleAction.fromJson(readerToUse.reset()); - } else if ("CreateJob".equals(discriminatorValue)) { - return JobScheduleAction.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ScheduleActionBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScheduleActionBase deserializedScheduleActionBase = new ScheduleActionBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("actionType".equals(fieldName)) { - deserializedScheduleActionBase.actionType = ScheduleActionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedScheduleActionBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java deleted file mode 100644 index d241042768cc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for ScheduleActionType. - */ -public final class ScheduleActionType extends ExpandableStringEnum { - /** - * Static value CreateJob for ScheduleActionType. - */ - public static final ScheduleActionType CREATE_JOB = fromString("CreateJob"); - - /** - * Static value InvokeBatchEndpoint for ScheduleActionType. - */ - public static final ScheduleActionType INVOKE_BATCH_ENDPOINT = fromString("InvokeBatchEndpoint"); - - /** - * Static value CreateMonitor for ScheduleActionType. - */ - public static final ScheduleActionType CREATE_MONITOR = fromString("CreateMonitor"); - - /** - * Creates a new instance of ScheduleActionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScheduleActionType() { - } - - /** - * Creates or finds a ScheduleActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScheduleActionType. - */ - public static ScheduleActionType fromString(String name) { - return fromString(name, ScheduleActionType.class); - } - - /** - * Gets known ScheduleActionType values. - * - * @return known ScheduleActionType values. - */ - public static Collection values() { - return values(ScheduleActionType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.java deleted file mode 100644 index aa0e42bdf3d9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ScheduleBase model. - */ -@Fluent -public final class ScheduleBase implements JsonSerializable { - /* - * A system assigned id for the schedule. - */ - private String id; - - /* - * The current deployment state of schedule. - */ - private ScheduleProvisioningState provisioningStatus; - - /* - * Is the schedule enabled or disabled? - */ - private ScheduleStatus status; - - /** - * Creates an instance of ScheduleBase class. - */ - public ScheduleBase() { - } - - /** - * Get the id property: A system assigned id for the schedule. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: A system assigned id for the schedule. - * - * @param id the id value to set. - * @return the ScheduleBase object itself. - */ - public ScheduleBase withId(String id) { - this.id = id; - return this; - } - - /** - * Get the provisioningStatus property: The current deployment state of schedule. - * - * @return the provisioningStatus value. - */ - public ScheduleProvisioningState provisioningStatus() { - return this.provisioningStatus; - } - - /** - * Set the provisioningStatus property: The current deployment state of schedule. - * - * @param provisioningStatus the provisioningStatus value to set. - * @return the ScheduleBase object itself. - */ - public ScheduleBase withProvisioningStatus(ScheduleProvisioningState provisioningStatus) { - this.provisioningStatus = provisioningStatus; - return this; - } - - /** - * Get the status property: Is the schedule enabled or disabled?. - * - * @return the status value. - */ - public ScheduleStatus status() { - return this.status; - } - - /** - * Set the status property: Is the schedule enabled or disabled?. - * - * @param status the status value to set. - * @return the ScheduleBase object itself. - */ - public ScheduleBase withStatus(ScheduleStatus status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("provisioningStatus", - this.provisioningStatus == null ? null : this.provisioningStatus.toString()); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScheduleBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScheduleBase if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ScheduleBase. - */ - public static ScheduleBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScheduleBase deserializedScheduleBase = new ScheduleBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedScheduleBase.id = reader.getString(); - } else if ("provisioningStatus".equals(fieldName)) { - deserializedScheduleBase.provisioningStatus - = ScheduleProvisioningState.fromString(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedScheduleBase.status = ScheduleStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedScheduleBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.java deleted file mode 100644 index 90a9b93aaef0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for ScheduleListViewType. - */ -public final class ScheduleListViewType extends ExpandableStringEnum { - /** - * Static value EnabledOnly for ScheduleListViewType. - */ - public static final ScheduleListViewType ENABLED_ONLY = fromString("EnabledOnly"); - - /** - * Static value DisabledOnly for ScheduleListViewType. - */ - public static final ScheduleListViewType DISABLED_ONLY = fromString("DisabledOnly"); - - /** - * Static value All for ScheduleListViewType. - */ - public static final ScheduleListViewType ALL = fromString("All"); - - /** - * Creates a new instance of ScheduleListViewType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScheduleListViewType() { - } - - /** - * Creates or finds a ScheduleListViewType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScheduleListViewType. - */ - public static ScheduleListViewType fromString(String name) { - return fromString(name, ScheduleListViewType.class); - } - - /** - * Gets known ScheduleListViewType values. - * - * @return known ScheduleListViewType values. - */ - public static Collection values() { - return values(ScheduleListViewType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java deleted file mode 100644 index 6cd0572ffa4e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Base definition of a schedule. - */ -@Fluent -public final class ScheduleProperties extends ResourceBase { - /* - * Display name of schedule. - */ - private String displayName; - - /* - * Is the schedule enabled? - */ - private Boolean isEnabled; - - /* - * [Required] Specifies the trigger details - */ - private TriggerBase trigger; - - /* - * [Required] Specifies the action of the schedule - */ - private ScheduleActionBase action; - - /* - * Provisioning state for the schedule. - */ - private ScheduleProvisioningStatus provisioningState; - - /** - * Creates an instance of ScheduleProperties class. - */ - public ScheduleProperties() { - } - - /** - * Get the displayName property: Display name of schedule. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Display name of schedule. - * - * @param displayName the displayName value to set. - * @return the ScheduleProperties object itself. - */ - public ScheduleProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the isEnabled property: Is the schedule enabled?. - * - * @return the isEnabled value. - */ - public Boolean isEnabled() { - return this.isEnabled; - } - - /** - * Set the isEnabled property: Is the schedule enabled?. - * - * @param isEnabled the isEnabled value to set. - * @return the ScheduleProperties object itself. - */ - public ScheduleProperties withIsEnabled(Boolean isEnabled) { - this.isEnabled = isEnabled; - return this; - } - - /** - * Get the trigger property: [Required] Specifies the trigger details. - * - * @return the trigger value. - */ - public TriggerBase trigger() { - return this.trigger; - } - - /** - * Set the trigger property: [Required] Specifies the trigger details. - * - * @param trigger the trigger value to set. - * @return the ScheduleProperties object itself. - */ - public ScheduleProperties withTrigger(TriggerBase trigger) { - this.trigger = trigger; - return this; - } - - /** - * Get the action property: [Required] Specifies the action of the schedule. - * - * @return the action value. - */ - public ScheduleActionBase action() { - return this.action; - } - - /** - * Set the action property: [Required] Specifies the action of the schedule. - * - * @param action the action value to set. - * @return the ScheduleProperties object itself. - */ - public ScheduleProperties withAction(ScheduleActionBase action) { - this.action = action; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the schedule. - * - * @return the provisioningState value. - */ - public ScheduleProvisioningStatus provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public ScheduleProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ScheduleProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ScheduleProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (trigger() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property trigger in model ScheduleProperties")); - } else { - trigger().validate(); - } - if (action() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property action in model ScheduleProperties")); - } else { - action().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ScheduleProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("trigger", this.trigger); - jsonWriter.writeJsonField("action", this.action); - jsonWriter.writeStringField("displayName", this.displayName); - jsonWriter.writeBooleanField("isEnabled", this.isEnabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScheduleProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScheduleProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScheduleProperties. - */ - public static ScheduleProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScheduleProperties deserializedScheduleProperties = new ScheduleProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedScheduleProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedScheduleProperties.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedScheduleProperties.withProperties(properties); - } else if ("trigger".equals(fieldName)) { - deserializedScheduleProperties.trigger = TriggerBase.fromJson(reader); - } else if ("action".equals(fieldName)) { - deserializedScheduleProperties.action = ScheduleActionBase.fromJson(reader); - } else if ("displayName".equals(fieldName)) { - deserializedScheduleProperties.displayName = reader.getString(); - } else if ("isEnabled".equals(fieldName)) { - deserializedScheduleProperties.isEnabled = reader.getNullable(JsonReader::getBoolean); - } else if ("provisioningState".equals(fieldName)) { - deserializedScheduleProperties.provisioningState - = ScheduleProvisioningStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedScheduleProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java deleted file mode 100644 index 605cf95e34ca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The current deployment state of schedule. - */ -public final class ScheduleProvisioningState extends ExpandableStringEnum { - /** - * Static value Completed for ScheduleProvisioningState. - */ - public static final ScheduleProvisioningState COMPLETED = fromString("Completed"); - - /** - * Static value Provisioning for ScheduleProvisioningState. - */ - public static final ScheduleProvisioningState PROVISIONING = fromString("Provisioning"); - - /** - * Static value Failed for ScheduleProvisioningState. - */ - public static final ScheduleProvisioningState FAILED = fromString("Failed"); - - /** - * Creates a new instance of ScheduleProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScheduleProvisioningState() { - } - - /** - * Creates or finds a ScheduleProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScheduleProvisioningState. - */ - public static ScheduleProvisioningState fromString(String name) { - return fromString(name, ScheduleProvisioningState.class); - } - - /** - * Gets known ScheduleProvisioningState values. - * - * @return known ScheduleProvisioningState values. - */ - public static Collection values() { - return values(ScheduleProvisioningState.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.java deleted file mode 100644 index 6aebb75209ec..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for ScheduleProvisioningStatus. - */ -public final class ScheduleProvisioningStatus extends ExpandableStringEnum { - /** - * Static value Creating for ScheduleProvisioningStatus. - */ - public static final ScheduleProvisioningStatus CREATING = fromString("Creating"); - - /** - * Static value Updating for ScheduleProvisioningStatus. - */ - public static final ScheduleProvisioningStatus UPDATING = fromString("Updating"); - - /** - * Static value Deleting for ScheduleProvisioningStatus. - */ - public static final ScheduleProvisioningStatus DELETING = fromString("Deleting"); - - /** - * Static value Succeeded for ScheduleProvisioningStatus. - */ - public static final ScheduleProvisioningStatus SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for ScheduleProvisioningStatus. - */ - public static final ScheduleProvisioningStatus FAILED = fromString("Failed"); - - /** - * Static value Canceled for ScheduleProvisioningStatus. - */ - public static final ScheduleProvisioningStatus CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of ScheduleProvisioningStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScheduleProvisioningStatus() { - } - - /** - * Creates or finds a ScheduleProvisioningStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScheduleProvisioningStatus. - */ - public static ScheduleProvisioningStatus fromString(String name) { - return fromString(name, ScheduleProvisioningStatus.class); - } - - /** - * Gets known ScheduleProvisioningStatus values. - * - * @return known ScheduleProvisioningStatus values. - */ - public static Collection values() { - return values(ScheduleProvisioningStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.java deleted file mode 100644 index 89e82abf154e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of Schedule entities. - */ -@Fluent -public final class ScheduleResourceArmPaginatedResult implements JsonSerializable { - /* - * An array of objects of type Schedule. - */ - private List value; - - /* - * The link to the next page of Schedule objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of ScheduleResourceArmPaginatedResult class. - */ - public ScheduleResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type Schedule. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type Schedule. - * - * @param value the value value to set. - * @return the ScheduleResourceArmPaginatedResult object itself. - */ - public ScheduleResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of Schedule objects. If null, there are no additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of Schedule objects. If null, there are no additional pages. - * - * @param nextLink the nextLink value to set. - * @return the ScheduleResourceArmPaginatedResult object itself. - */ - public ScheduleResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScheduleResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScheduleResourceArmPaginatedResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ScheduleResourceArmPaginatedResult. - */ - public static ScheduleResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScheduleResourceArmPaginatedResult deserializedScheduleResourceArmPaginatedResult - = new ScheduleResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ScheduleInner.fromJson(reader1)); - deserializedScheduleResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedScheduleResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedScheduleResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java deleted file mode 100644 index bc2d402ad4d5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Is the schedule enabled or disabled?. - */ -public final class ScheduleStatus extends ExpandableStringEnum { - /** - * Static value Enabled for ScheduleStatus. - */ - public static final ScheduleStatus ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for ScheduleStatus. - */ - public static final ScheduleStatus DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of ScheduleStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScheduleStatus() { - } - - /** - * Creates or finds a ScheduleStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScheduleStatus. - */ - public static ScheduleStatus fromString(String name) { - return fromString(name, ScheduleStatus.class); - } - - /** - * Gets known ScheduleStatus values. - * - * @return known ScheduleStatus values. - */ - public static Collection values() { - return values(ScheduleStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java deleted file mode 100644 index 8a1f5f25c1c1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 Schedules. - */ -public interface Schedules { - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of Schedule entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @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 a paginated list of Schedule entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ScheduleListViewType listViewType, Context context); - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @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 schedule along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @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 schedule. - */ - Schedule get(String resourceGroupName, String workspaceName, String name); - - /** - * Get schedule. - * - * @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 schedule along with {@link Response}. - */ - Schedule getById(String id); - - /** - * Get schedule. - * - * @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 schedule along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete schedule. - * - * @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. - */ - void deleteById(String id); - - /** - * Delete schedule. - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Schedule resource. - * - * @param name resource name. - * @return the first stage of the new Schedule definition. - */ - Schedule.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java deleted file mode 100644 index 583b1a9dd62d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Script reference. - */ -@Fluent -public final class ScriptReference implements JsonSerializable { - /* - * The storage source of the script: workspace. - */ - private String scriptSource; - - /* - * The location of scripts in the mounted volume. - */ - private String scriptData; - - /* - * Optional command line arguments passed to the script to run. - */ - private String scriptArguments; - - /* - * Optional time period passed to timeout command. - */ - private String timeout; - - /** - * Creates an instance of ScriptReference class. - */ - public ScriptReference() { - } - - /** - * Get the scriptSource property: The storage source of the script: workspace. - * - * @return the scriptSource value. - */ - public String scriptSource() { - return this.scriptSource; - } - - /** - * Set the scriptSource property: The storage source of the script: workspace. - * - * @param scriptSource the scriptSource value to set. - * @return the ScriptReference object itself. - */ - public ScriptReference withScriptSource(String scriptSource) { - this.scriptSource = scriptSource; - return this; - } - - /** - * Get the scriptData property: The location of scripts in the mounted volume. - * - * @return the scriptData value. - */ - public String scriptData() { - return this.scriptData; - } - - /** - * Set the scriptData property: The location of scripts in the mounted volume. - * - * @param scriptData the scriptData value to set. - * @return the ScriptReference object itself. - */ - public ScriptReference withScriptData(String scriptData) { - this.scriptData = scriptData; - return this; - } - - /** - * Get the scriptArguments property: Optional command line arguments passed to the script to run. - * - * @return the scriptArguments value. - */ - public String scriptArguments() { - return this.scriptArguments; - } - - /** - * Set the scriptArguments property: Optional command line arguments passed to the script to run. - * - * @param scriptArguments the scriptArguments value to set. - * @return the ScriptReference object itself. - */ - public ScriptReference withScriptArguments(String scriptArguments) { - this.scriptArguments = scriptArguments; - return this; - } - - /** - * Get the timeout property: Optional time period passed to timeout command. - * - * @return the timeout value. - */ - public String timeout() { - return this.timeout; - } - - /** - * Set the timeout property: Optional time period passed to timeout command. - * - * @param timeout the timeout value to set. - * @return the ScriptReference object itself. - */ - public ScriptReference withTimeout(String timeout) { - this.timeout = timeout; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("scriptSource", this.scriptSource); - jsonWriter.writeStringField("scriptData", this.scriptData); - jsonWriter.writeStringField("scriptArguments", this.scriptArguments); - jsonWriter.writeStringField("timeout", this.timeout); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScriptReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScriptReference if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ScriptReference. - */ - public static ScriptReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScriptReference deserializedScriptReference = new ScriptReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scriptSource".equals(fieldName)) { - deserializedScriptReference.scriptSource = reader.getString(); - } else if ("scriptData".equals(fieldName)) { - deserializedScriptReference.scriptData = reader.getString(); - } else if ("scriptArguments".equals(fieldName)) { - deserializedScriptReference.scriptArguments = reader.getString(); - } else if ("timeout".equals(fieldName)) { - deserializedScriptReference.timeout = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedScriptReference; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.java deleted file mode 100644 index 6e04eaa8859a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Customized setup scripts. - */ -@Fluent -public final class ScriptsToExecute implements JsonSerializable { - /* - * Script that's run every time the machine starts. - */ - private ScriptReference startupScript; - - /* - * Script that's run only once during provision of the compute. - */ - private ScriptReference creationScript; - - /** - * Creates an instance of ScriptsToExecute class. - */ - public ScriptsToExecute() { - } - - /** - * Get the startupScript property: Script that's run every time the machine starts. - * - * @return the startupScript value. - */ - public ScriptReference startupScript() { - return this.startupScript; - } - - /** - * Set the startupScript property: Script that's run every time the machine starts. - * - * @param startupScript the startupScript value to set. - * @return the ScriptsToExecute object itself. - */ - public ScriptsToExecute withStartupScript(ScriptReference startupScript) { - this.startupScript = startupScript; - return this; - } - - /** - * Get the creationScript property: Script that's run only once during provision of the compute. - * - * @return the creationScript value. - */ - public ScriptReference creationScript() { - return this.creationScript; - } - - /** - * Set the creationScript property: Script that's run only once during provision of the compute. - * - * @param creationScript the creationScript value to set. - * @return the ScriptsToExecute object itself. - */ - public ScriptsToExecute withCreationScript(ScriptReference creationScript) { - this.creationScript = creationScript; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (startupScript() != null) { - startupScript().validate(); - } - if (creationScript() != null) { - creationScript().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("startupScript", this.startupScript); - jsonWriter.writeJsonField("creationScript", this.creationScript); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScriptsToExecute from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScriptsToExecute if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ScriptsToExecute. - */ - public static ScriptsToExecute fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScriptsToExecute deserializedScriptsToExecute = new ScriptsToExecute(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("startupScript".equals(fieldName)) { - deserializedScriptsToExecute.startupScript = ScriptReference.fromJson(reader); - } else if ("creationScript".equals(fieldName)) { - deserializedScriptsToExecute.creationScript = ScriptReference.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScriptsToExecute; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.java deleted file mode 100644 index 2bdc415ee3d8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Forecasting seasonality. - */ -@Immutable -public class Seasonality implements JsonSerializable { - /* - * [Required] Seasonality mode. - */ - private SeasonalityMode mode = SeasonalityMode.fromString("Seasonality"); - - /** - * Creates an instance of Seasonality class. - */ - public Seasonality() { - } - - /** - * Get the mode property: [Required] Seasonality mode. - * - * @return the mode value. - */ - public SeasonalityMode mode() { - return this.mode; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Seasonality from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Seasonality if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the Seasonality. - */ - public static Seasonality fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("mode".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Auto".equals(discriminatorValue)) { - return AutoSeasonality.fromJson(readerToUse.reset()); - } else if ("Custom".equals(discriminatorValue)) { - return CustomSeasonality.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static Seasonality fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Seasonality deserializedSeasonality = new Seasonality(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedSeasonality.mode = SeasonalityMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSeasonality; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.java deleted file mode 100644 index bc816386e04b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Forecasting seasonality mode. - */ -public final class SeasonalityMode extends ExpandableStringEnum { - /** - * Static value Auto for SeasonalityMode. - */ - public static final SeasonalityMode AUTO = fromString("Auto"); - - /** - * Static value Custom for SeasonalityMode. - */ - public static final SeasonalityMode CUSTOM = fromString("Custom"); - - /** - * Creates a new instance of SeasonalityMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SeasonalityMode() { - } - - /** - * Creates or finds a SeasonalityMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding SeasonalityMode. - */ - public static SeasonalityMode fromString(String name) { - return fromString(name, SeasonalityMode.class); - } - - /** - * Gets known SeasonalityMode values. - * - * @return known SeasonalityMode values. - */ - public static Collection values() { - return values(SeasonalityMode.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.java deleted file mode 100644 index 7652428a933d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine the datastore secrets type. - */ -public final class SecretsType extends ExpandableStringEnum { - /** - * Static value AccountKey for SecretsType. - */ - public static final SecretsType ACCOUNT_KEY = fromString("AccountKey"); - - /** - * Static value Certificate for SecretsType. - */ - public static final SecretsType CERTIFICATE = fromString("Certificate"); - - /** - * Static value Sas for SecretsType. - */ - public static final SecretsType SAS = fromString("Sas"); - - /** - * Static value ServicePrincipal for SecretsType. - */ - public static final SecretsType SERVICE_PRINCIPAL = fromString("ServicePrincipal"); - - /** - * Creates a new instance of SecretsType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SecretsType() { - } - - /** - * Creates or finds a SecretsType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SecretsType. - */ - public static SecretsType fromString(String name) { - return fromString(name, SecretsType.class); - } - - /** - * Gets known SecretsType values. - * - * @return known SecretsType values. - */ - public static Collection values() { - return values(SecretsType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessComputeSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessComputeSettings.java deleted file mode 100644 index 67d84ce9fe0d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessComputeSettings.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ServerlessComputeSettings model. - */ -@Fluent -public final class ServerlessComputeSettings implements JsonSerializable { - /* - * The resource ID of an existing virtual network subnet in which serverless compute nodes should be deployed - */ - private String serverlessComputeCustomSubnet; - - /* - * The flag to signal if serverless compute nodes deployed in custom vNet would have no public IP addresses for a - * workspace with private endpoint - */ - private Boolean serverlessComputeNoPublicIp; - - /** - * Creates an instance of ServerlessComputeSettings class. - */ - public ServerlessComputeSettings() { - } - - /** - * Get the serverlessComputeCustomSubnet property: The resource ID of an existing virtual network subnet in which - * serverless compute nodes should be deployed. - * - * @return the serverlessComputeCustomSubnet value. - */ - public String serverlessComputeCustomSubnet() { - return this.serverlessComputeCustomSubnet; - } - - /** - * Set the serverlessComputeCustomSubnet property: The resource ID of an existing virtual network subnet in which - * serverless compute nodes should be deployed. - * - * @param serverlessComputeCustomSubnet the serverlessComputeCustomSubnet value to set. - * @return the ServerlessComputeSettings object itself. - */ - public ServerlessComputeSettings withServerlessComputeCustomSubnet(String serverlessComputeCustomSubnet) { - this.serverlessComputeCustomSubnet = serverlessComputeCustomSubnet; - return this; - } - - /** - * Get the serverlessComputeNoPublicIp property: The flag to signal if serverless compute nodes deployed in custom - * vNet would have no public IP addresses for a workspace with private endpoint. - * - * @return the serverlessComputeNoPublicIp value. - */ - public Boolean serverlessComputeNoPublicIp() { - return this.serverlessComputeNoPublicIp; - } - - /** - * Set the serverlessComputeNoPublicIp property: The flag to signal if serverless compute nodes deployed in custom - * vNet would have no public IP addresses for a workspace with private endpoint. - * - * @param serverlessComputeNoPublicIp the serverlessComputeNoPublicIp value to set. - * @return the ServerlessComputeSettings object itself. - */ - public ServerlessComputeSettings withServerlessComputeNoPublicIp(Boolean serverlessComputeNoPublicIp) { - this.serverlessComputeNoPublicIp = serverlessComputeNoPublicIp; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("serverlessComputeCustomSubnet", this.serverlessComputeCustomSubnet); - jsonWriter.writeBooleanField("serverlessComputeNoPublicIP", this.serverlessComputeNoPublicIp); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServerlessComputeSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServerlessComputeSettings if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ServerlessComputeSettings. - */ - public static ServerlessComputeSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServerlessComputeSettings deserializedServerlessComputeSettings = new ServerlessComputeSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serverlessComputeCustomSubnet".equals(fieldName)) { - deserializedServerlessComputeSettings.serverlessComputeCustomSubnet = reader.getString(); - } else if ("serverlessComputeNoPublicIP".equals(fieldName)) { - deserializedServerlessComputeSettings.serverlessComputeNoPublicIp - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedServerlessComputeSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoint.java deleted file mode 100644 index 4a6d2f5d405c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoint.java +++ /dev/null @@ -1,389 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.ServerlessEndpointInner; -import java.util.Map; - -/** - * An immutable client-side representation of ServerlessEndpoint. - */ -public interface ServerlessEndpoint { - /** - * 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: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - ServerlessEndpointProperties properties(); - - /** - * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - String kind(); - - /** - * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - Sku sku(); - - /** - * 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.machinelearning.fluent.models.ServerlessEndpointInner object. - * - * @return the inner object. - */ - ServerlessEndpointInner innerModel(); - - /** - * The entirety of the ServerlessEndpoint definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The ServerlessEndpoint definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ServerlessEndpoint definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the ServerlessEndpoint 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 ServerlessEndpoint definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the ServerlessEndpoint definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(ServerlessEndpointProperties properties); - } - - /** - * The stage of the ServerlessEndpoint 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.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithSku { - /** - * Executes the create request. - * - * @return the created resource. - */ - ServerlessEndpoint create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ServerlessEndpoint create(Context context); - } - - /** - * The stage of the ServerlessEndpoint 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 ServerlessEndpoint definition allowing to specify kind. - */ - interface WithKind { - /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. - * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. - * @return the next definition stage. - */ - WithCreate withKind(String kind); - } - - /** - * The stage of the ServerlessEndpoint definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the ServerlessEndpoint definition allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. - * - * @param sku Sku details required for ARM contract for Autoscaling. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - } - - /** - * Begins update for the ServerlessEndpoint resource. - * - * @return the stage of resource update. - */ - ServerlessEndpoint.Update update(); - - /** - * The template for ServerlessEndpoint update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, UpdateStages.WithIdentity { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ServerlessEndpoint apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ServerlessEndpoint apply(Context context); - } - - /** - * The ServerlessEndpoint update stages. - */ - interface UpdateStages { - /** - * The stage of the ServerlessEndpoint 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 ServerlessEndpoint update allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. - * - * @param sku Sku details required for ARM contract for Autoscaling. - * @return the next definition stage. - */ - Update withSku(PartialSku sku); - } - - /** - * The stage of the ServerlessEndpoint update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - Update withIdentity(PartialManagedServiceIdentity identity); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ServerlessEndpoint refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ServerlessEndpoint refresh(Context context); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @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 keys for endpoint authentication along with {@link Response}. - */ - Response listKeysWithResponse(Context context); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @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 keys for endpoint authentication. - */ - EndpointAuthKeys listKeys(); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. - */ - EndpointAuthKeys regenerateKeys(RegenerateEndpointKeysRequest body); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. - */ - EndpointAuthKeys regenerateKeys(RegenerateEndpointKeysRequest body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointProperties.java deleted file mode 100644 index c9a8c938e016..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ServerlessEndpointProperties model. - */ -@Fluent -public final class ServerlessEndpointProperties implements JsonSerializable { - /* - * The model settings (model id) for the model being serviced on the ServerlessEndpoint. - */ - private ModelSettings modelSettings; - - /* - * [Required] Specifies the authentication mode for the Serverless endpoint. - */ - private ServerlessInferenceEndpointAuthMode authMode; - - /* - * The inference uri to target when making requests against the serverless endpoint - */ - private ServerlessInferenceEndpoint inferenceEndpoint; - - /* - * Provisioning state for the endpoint. - */ - private EndpointProvisioningState provisioningState; - - /* - * The current state of the ServerlessEndpoint. - */ - private ServerlessEndpointState endpointState; - - /* - * The MarketplaceSubscription Azure ID associated to this ServerlessEndpoint. - */ - private String marketplaceSubscriptionId; - - /* - * Specifies the content safety options. If omitted, the default content safety settings will be configured - */ - private ContentSafety contentSafety; - - /** - * Creates an instance of ServerlessEndpointProperties class. - */ - public ServerlessEndpointProperties() { - } - - /** - * Get the modelSettings property: The model settings (model id) for the model being serviced on the - * ServerlessEndpoint. - * - * @return the modelSettings value. - */ - public ModelSettings modelSettings() { - return this.modelSettings; - } - - /** - * Set the modelSettings property: The model settings (model id) for the model being serviced on the - * ServerlessEndpoint. - * - * @param modelSettings the modelSettings value to set. - * @return the ServerlessEndpointProperties object itself. - */ - public ServerlessEndpointProperties withModelSettings(ModelSettings modelSettings) { - this.modelSettings = modelSettings; - return this; - } - - /** - * Get the authMode property: [Required] Specifies the authentication mode for the Serverless endpoint. - * - * @return the authMode value. - */ - public ServerlessInferenceEndpointAuthMode authMode() { - return this.authMode; - } - - /** - * Set the authMode property: [Required] Specifies the authentication mode for the Serverless endpoint. - * - * @param authMode the authMode value to set. - * @return the ServerlessEndpointProperties object itself. - */ - public ServerlessEndpointProperties withAuthMode(ServerlessInferenceEndpointAuthMode authMode) { - this.authMode = authMode; - return this; - } - - /** - * Get the inferenceEndpoint property: The inference uri to target when making requests against the serverless - * endpoint. - * - * @return the inferenceEndpoint value. - */ - public ServerlessInferenceEndpoint inferenceEndpoint() { - return this.inferenceEndpoint; - } - - /** - * Get the provisioningState property: Provisioning state for the endpoint. - * - * @return the provisioningState value. - */ - public EndpointProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the endpointState property: The current state of the ServerlessEndpoint. - * - * @return the endpointState value. - */ - public ServerlessEndpointState endpointState() { - return this.endpointState; - } - - /** - * Get the marketplaceSubscriptionId property: The MarketplaceSubscription Azure ID associated to this - * ServerlessEndpoint. - * - * @return the marketplaceSubscriptionId value. - */ - public String marketplaceSubscriptionId() { - return this.marketplaceSubscriptionId; - } - - /** - * Get the contentSafety property: Specifies the content safety options. If omitted, the default content safety - * settings will be configured. - * - * @return the contentSafety value. - */ - public ContentSafety contentSafety() { - return this.contentSafety; - } - - /** - * Set the contentSafety property: Specifies the content safety options. If omitted, the default content safety - * settings will be configured. - * - * @param contentSafety the contentSafety value to set. - * @return the ServerlessEndpointProperties object itself. - */ - public ServerlessEndpointProperties withContentSafety(ContentSafety contentSafety) { - this.contentSafety = contentSafety; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (modelSettings() != null) { - modelSettings().validate(); - } - if (authMode() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property authMode in model ServerlessEndpointProperties")); - } - if (inferenceEndpoint() != null) { - inferenceEndpoint().validate(); - } - if (contentSafety() != null) { - contentSafety().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ServerlessEndpointProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authMode", this.authMode == null ? null : this.authMode.toString()); - jsonWriter.writeJsonField("modelSettings", this.modelSettings); - jsonWriter.writeJsonField("contentSafety", this.contentSafety); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServerlessEndpointProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServerlessEndpointProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ServerlessEndpointProperties. - */ - public static ServerlessEndpointProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServerlessEndpointProperties deserializedServerlessEndpointProperties = new ServerlessEndpointProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("authMode".equals(fieldName)) { - deserializedServerlessEndpointProperties.authMode - = ServerlessInferenceEndpointAuthMode.fromString(reader.getString()); - } else if ("modelSettings".equals(fieldName)) { - deserializedServerlessEndpointProperties.modelSettings = ModelSettings.fromJson(reader); - } else if ("inferenceEndpoint".equals(fieldName)) { - deserializedServerlessEndpointProperties.inferenceEndpoint - = ServerlessInferenceEndpoint.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedServerlessEndpointProperties.provisioningState - = EndpointProvisioningState.fromString(reader.getString()); - } else if ("endpointState".equals(fieldName)) { - deserializedServerlessEndpointProperties.endpointState - = ServerlessEndpointState.fromString(reader.getString()); - } else if ("marketplaceSubscriptionId".equals(fieldName)) { - deserializedServerlessEndpointProperties.marketplaceSubscriptionId = reader.getString(); - } else if ("contentSafety".equals(fieldName)) { - deserializedServerlessEndpointProperties.contentSafety = ContentSafety.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedServerlessEndpointProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointState.java deleted file mode 100644 index a224cd14a6b8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointState.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * State of the Serverless Endpoint. - */ -public final class ServerlessEndpointState extends ExpandableStringEnum { - /** - * Static value Unknown for ServerlessEndpointState. - */ - public static final ServerlessEndpointState UNKNOWN = fromString("Unknown"); - - /** - * Static value Creating for ServerlessEndpointState. - */ - public static final ServerlessEndpointState CREATING = fromString("Creating"); - - /** - * Static value Deleting for ServerlessEndpointState. - */ - public static final ServerlessEndpointState DELETING = fromString("Deleting"); - - /** - * Static value Suspending for ServerlessEndpointState. - */ - public static final ServerlessEndpointState SUSPENDING = fromString("Suspending"); - - /** - * Static value Reinstating for ServerlessEndpointState. - */ - public static final ServerlessEndpointState REINSTATING = fromString("Reinstating"); - - /** - * Static value Online for ServerlessEndpointState. - */ - public static final ServerlessEndpointState ONLINE = fromString("Online"); - - /** - * Static value Suspended for ServerlessEndpointState. - */ - public static final ServerlessEndpointState SUSPENDED = fromString("Suspended"); - - /** - * Static value CreationFailed for ServerlessEndpointState. - */ - public static final ServerlessEndpointState CREATION_FAILED = fromString("CreationFailed"); - - /** - * Static value DeletionFailed for ServerlessEndpointState. - */ - public static final ServerlessEndpointState DELETION_FAILED = fromString("DeletionFailed"); - - /** - * Creates a new instance of ServerlessEndpointState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ServerlessEndpointState() { - } - - /** - * Creates or finds a ServerlessEndpointState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ServerlessEndpointState. - */ - public static ServerlessEndpointState fromString(String name) { - return fromString(name, ServerlessEndpointState.class); - } - - /** - * Gets known ServerlessEndpointState values. - * - * @return known ServerlessEndpointState values. - */ - public static Collection values() { - return values(ServerlessEndpointState.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointTrackedResourceArmPaginatedResult.java deleted file mode 100644 index a67ca4585e12..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointTrackedResourceArmPaginatedResult.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of ServerlessEndpoint entities. - */ -@Fluent -public final class ServerlessEndpointTrackedResourceArmPaginatedResult - implements JsonSerializable { - /* - * An array of objects of type ServerlessEndpoint. - */ - private List value; - - /* - * The link to the next page of ServerlessEndpoint objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of ServerlessEndpointTrackedResourceArmPaginatedResult class. - */ - public ServerlessEndpointTrackedResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type ServerlessEndpoint. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type ServerlessEndpoint. - * - * @param value the value value to set. - * @return the ServerlessEndpointTrackedResourceArmPaginatedResult object itself. - */ - public ServerlessEndpointTrackedResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of ServerlessEndpoint objects. If null, there are no - * additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of ServerlessEndpoint objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the ServerlessEndpointTrackedResourceArmPaginatedResult object itself. - */ - public ServerlessEndpointTrackedResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServerlessEndpointTrackedResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServerlessEndpointTrackedResourceArmPaginatedResult if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ServerlessEndpointTrackedResourceArmPaginatedResult. - */ - public static ServerlessEndpointTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ServerlessEndpointTrackedResourceArmPaginatedResult deserializedServerlessEndpointTrackedResourceArmPaginatedResult - = new ServerlessEndpointTrackedResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ServerlessEndpointInner.fromJson(reader1)); - deserializedServerlessEndpointTrackedResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedServerlessEndpointTrackedResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedServerlessEndpointTrackedResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoints.java deleted file mode 100644 index 66664125c7bb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoints.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.machinelearning.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 ServerlessEndpoints. - */ -public interface ServerlessEndpoints { - /** - * List Serverless Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 a paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List Serverless Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 a paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context); - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get Serverless Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 serverless Endpoint along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Get Serverless Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 serverless Endpoint. - */ - ServerlessEndpoint get(String resourceGroupName, String workspaceName, String name); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 keys for endpoint authentication along with {@link Response}. - */ - Response listKeysWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @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 keys for endpoint authentication. - */ - EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String name); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. - */ - EndpointAuthKeys regenerateKeys(String resourceGroupName, String workspaceName, String name, - RegenerateEndpointKeysRequest body); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. - */ - EndpointAuthKeys regenerateKeys(String resourceGroupName, String workspaceName, String name, - RegenerateEndpointKeysRequest body, Context context); - - /** - * Get Serverless Endpoint. - * - * @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 serverless Endpoint along with {@link Response}. - */ - ServerlessEndpoint getById(String id); - - /** - * Get Serverless Endpoint. - * - * @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 serverless Endpoint along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @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. - */ - void deleteById(String id); - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ServerlessEndpoint resource. - * - * @param name resource name. - * @return the first stage of the new ServerlessEndpoint definition. - */ - ServerlessEndpoint.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpoint.java deleted file mode 100644 index 98103042d85e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpoint.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The ServerlessInferenceEndpoint model. - */ -@Fluent -public final class ServerlessInferenceEndpoint implements JsonSerializable { - /* - * [Required] The inference uri to target when making requests against the Serverless Endpoint. - */ - private String uri; - - /* - * Specifies any required headers to target this serverless endpoint. - */ - private Map headers; - - /** - * Creates an instance of ServerlessInferenceEndpoint class. - */ - public ServerlessInferenceEndpoint() { - } - - /** - * Get the uri property: [Required] The inference uri to target when making requests against the Serverless - * Endpoint. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: [Required] The inference uri to target when making requests against the Serverless - * Endpoint. - * - * @param uri the uri value to set. - * @return the ServerlessInferenceEndpoint object itself. - */ - public ServerlessInferenceEndpoint withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the headers property: Specifies any required headers to target this serverless endpoint. - * - * @return the headers value. - */ - public Map headers() { - return this.headers; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (uri() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property uri in model ServerlessInferenceEndpoint")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ServerlessInferenceEndpoint.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("uri", this.uri); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServerlessInferenceEndpoint from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServerlessInferenceEndpoint if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ServerlessInferenceEndpoint. - */ - public static ServerlessInferenceEndpoint fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServerlessInferenceEndpoint deserializedServerlessInferenceEndpoint = new ServerlessInferenceEndpoint(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("uri".equals(fieldName)) { - deserializedServerlessInferenceEndpoint.uri = reader.getString(); - } else if ("headers".equals(fieldName)) { - Map headers = reader.readMap(reader1 -> reader1.getString()); - deserializedServerlessInferenceEndpoint.headers = headers; - } else { - reader.skipChildren(); - } - } - - return deserializedServerlessInferenceEndpoint; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpointAuthMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpointAuthMode.java deleted file mode 100644 index 7dcd97bc44f8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpointAuthMode.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for ServerlessInferenceEndpointAuthMode. - */ -public final class ServerlessInferenceEndpointAuthMode - extends ExpandableStringEnum { - /** - * Static value Key for ServerlessInferenceEndpointAuthMode. - */ - public static final ServerlessInferenceEndpointAuthMode KEY = fromString("Key"); - - /** - * Creates a new instance of ServerlessInferenceEndpointAuthMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ServerlessInferenceEndpointAuthMode() { - } - - /** - * Creates or finds a ServerlessInferenceEndpointAuthMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding ServerlessInferenceEndpointAuthMode. - */ - public static ServerlessInferenceEndpointAuthMode fromString(String name) { - return fromString(name, ServerlessInferenceEndpointAuthMode.class); - } - - /** - * Gets known ServerlessInferenceEndpointAuthMode values. - * - * @return known ServerlessInferenceEndpointAuthMode values. - */ - public static Collection values() { - return values(ServerlessInferenceEndpointAuthMode.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceDataAccessAuthIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceDataAccessAuthIdentity.java deleted file mode 100644 index 47ba7fbd2cc7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceDataAccessAuthIdentity.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for ServiceDataAccessAuthIdentity. - */ -public final class ServiceDataAccessAuthIdentity extends ExpandableStringEnum { - /** - * Static value None for ServiceDataAccessAuthIdentity. - */ - public static final ServiceDataAccessAuthIdentity NONE = fromString("None"); - - /** - * Static value WorkspaceSystemAssignedIdentity for ServiceDataAccessAuthIdentity. - */ - public static final ServiceDataAccessAuthIdentity WORKSPACE_SYSTEM_ASSIGNED_IDENTITY - = fromString("WorkspaceSystemAssignedIdentity"); - - /** - * Static value WorkspaceUserAssignedIdentity for ServiceDataAccessAuthIdentity. - */ - public static final ServiceDataAccessAuthIdentity WORKSPACE_USER_ASSIGNED_IDENTITY - = fromString("WorkspaceUserAssignedIdentity"); - - /** - * Creates a new instance of ServiceDataAccessAuthIdentity value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ServiceDataAccessAuthIdentity() { - } - - /** - * Creates or finds a ServiceDataAccessAuthIdentity from its string representation. - * - * @param name a name to look for. - * @return the corresponding ServiceDataAccessAuthIdentity. - */ - public static ServiceDataAccessAuthIdentity fromString(String name) { - return fromString(name, ServiceDataAccessAuthIdentity.class); - } - - /** - * Gets known ServiceDataAccessAuthIdentity values. - * - * @return known ServiceDataAccessAuthIdentity values. - */ - public static Collection values() { - return values(ServiceDataAccessAuthIdentity.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.java deleted file mode 100644 index 3d0853b9b566..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ServiceManagedResourcesSettings model. - */ -@Fluent -public final class ServiceManagedResourcesSettings implements JsonSerializable { - /* - * The settings for the service managed cosmosdb account. - */ - private CosmosDbSettings cosmosDb; - - /** - * Creates an instance of ServiceManagedResourcesSettings class. - */ - public ServiceManagedResourcesSettings() { - } - - /** - * Get the cosmosDb property: The settings for the service managed cosmosdb account. - * - * @return the cosmosDb value. - */ - public CosmosDbSettings cosmosDb() { - return this.cosmosDb; - } - - /** - * Set the cosmosDb property: The settings for the service managed cosmosdb account. - * - * @param cosmosDb the cosmosDb value to set. - * @return the ServiceManagedResourcesSettings object itself. - */ - public ServiceManagedResourcesSettings withCosmosDb(CosmosDbSettings cosmosDb) { - this.cosmosDb = cosmosDb; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (cosmosDb() != null) { - cosmosDb().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("cosmosDb", this.cosmosDb); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServiceManagedResourcesSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServiceManagedResourcesSettings if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ServiceManagedResourcesSettings. - */ - public static ServiceManagedResourcesSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServiceManagedResourcesSettings deserializedServiceManagedResourcesSettings - = new ServiceManagedResourcesSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("cosmosDb".equals(fieldName)) { - deserializedServiceManagedResourcesSettings.cosmosDb = CosmosDbSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedServiceManagedResourcesSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.java deleted file mode 100644 index 651ca1082d69..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.java +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; - -/** - * The ServicePrincipalAuthTypeWorkspaceConnectionProperties model. - */ -@Fluent -public final class ServicePrincipalAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /* - * Authentication type of the connection target - */ - private ConnectionAuthType authType = ConnectionAuthType.SERVICE_PRINCIPAL; - - /* - * The credentials property. - */ - private WorkspaceConnectionServicePrincipal credentials; - - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - - /** - * Creates an instance of ServicePrincipalAuthTypeWorkspaceConnectionProperties class. - */ - public ServicePrincipalAuthTypeWorkspaceConnectionProperties() { - } - - /** - * Get the authType property: Authentication type of the connection target. - * - * @return the authType value. - */ - @Override - public ConnectionAuthType authType() { - return this.authType; - } - - /** - * Get the credentials property: The credentials property. - * - * @return the credentials value. - */ - public WorkspaceConnectionServicePrincipal credentials() { - return this.credentials; - } - - /** - * Set the credentials property: The credentials property. - * - * @param credentials the credentials value to set. - * @return the ServicePrincipalAuthTypeWorkspaceConnectionProperties object itself. - */ - public ServicePrincipalAuthTypeWorkspaceConnectionProperties - withCredentials(WorkspaceConnectionServicePrincipal credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. - */ - @Override - public ConnectionGroup group() { - return this.group; - } - - /** - * {@inheritDoc} - */ - @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { - super.withSharedUserList(sharedUserList); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", category() == null ? null : category().toString()); - jsonWriter.writeStringField("expiryTime", - expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); - jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); - jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("sharedUserList", sharedUserList(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeJsonField("credentials", this.credentials); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServicePrincipalAuthTypeWorkspaceConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServicePrincipalAuthTypeWorkspaceConnectionProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ServicePrincipalAuthTypeWorkspaceConnectionProperties. - */ - public static ServicePrincipalAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ServicePrincipalAuthTypeWorkspaceConnectionProperties deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties - = new ServicePrincipalAuthTypeWorkspaceConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties - .withCategory(ConnectionCategory.fromString(reader.getString())); - } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); - } else if ("expiryTime".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("group".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); - } else if ("isSharedToAll".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties - .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); - } else if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); - } else if ("sharedUserList".equals(fieldName)) { - List sharedUserList = reader.readArray(reader1 -> reader1.getString()); - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties - .withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.authType - = ConnectionAuthType.fromString(reader.getString()); - } else if ("credentials".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.credentials - = WorkspaceConnectionServicePrincipal.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java deleted file mode 100644 index 66e170dda417..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Objects; -import java.util.UUID; - -/** - * Service Principal datastore credentials configuration. - */ -@Fluent -public final class ServicePrincipalDatastoreCredentials extends DatastoreCredentials { - /* - * [Required] Credential type used to authentication with storage. - */ - private CredentialsType credentialsType = CredentialsType.SERVICE_PRINCIPAL; - - /* - * Authority URL used for authentication. - */ - private String authorityUrl; - - /* - * Resource the service principal has access to. - */ - private String resourceUrl; - - /* - * [Required] ID of the tenant to which the service principal belongs. - */ - private UUID tenantId; - - /* - * [Required] Service principal client ID. - */ - private UUID clientId; - - /* - * [Required] Service principal secrets. - */ - private ServicePrincipalDatastoreSecrets secrets; - - /** - * Creates an instance of ServicePrincipalDatastoreCredentials class. - */ - public ServicePrincipalDatastoreCredentials() { - } - - /** - * Get the credentialsType property: [Required] Credential type used to authentication with storage. - * - * @return the credentialsType value. - */ - @Override - public CredentialsType credentialsType() { - return this.credentialsType; - } - - /** - * Get the authorityUrl property: Authority URL used for authentication. - * - * @return the authorityUrl value. - */ - public String authorityUrl() { - return this.authorityUrl; - } - - /** - * Set the authorityUrl property: Authority URL used for authentication. - * - * @param authorityUrl the authorityUrl value to set. - * @return the ServicePrincipalDatastoreCredentials object itself. - */ - public ServicePrincipalDatastoreCredentials withAuthorityUrl(String authorityUrl) { - this.authorityUrl = authorityUrl; - return this; - } - - /** - * Get the resourceUrl property: Resource the service principal has access to. - * - * @return the resourceUrl value. - */ - public String resourceUrl() { - return this.resourceUrl; - } - - /** - * Set the resourceUrl property: Resource the service principal has access to. - * - * @param resourceUrl the resourceUrl value to set. - * @return the ServicePrincipalDatastoreCredentials object itself. - */ - public ServicePrincipalDatastoreCredentials withResourceUrl(String resourceUrl) { - this.resourceUrl = resourceUrl; - return this; - } - - /** - * Get the tenantId property: [Required] ID of the tenant to which the service principal belongs. - * - * @return the tenantId value. - */ - public UUID tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: [Required] ID of the tenant to which the service principal belongs. - * - * @param tenantId the tenantId value to set. - * @return the ServicePrincipalDatastoreCredentials object itself. - */ - public ServicePrincipalDatastoreCredentials withTenantId(UUID tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the clientId property: [Required] Service principal client ID. - * - * @return the clientId value. - */ - public UUID clientId() { - return this.clientId; - } - - /** - * Set the clientId property: [Required] Service principal client ID. - * - * @param clientId the clientId value to set. - * @return the ServicePrincipalDatastoreCredentials object itself. - */ - public ServicePrincipalDatastoreCredentials withClientId(UUID clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the secrets property: [Required] Service principal secrets. - * - * @return the secrets value. - */ - public ServicePrincipalDatastoreSecrets secrets() { - return this.secrets; - } - - /** - * Set the secrets property: [Required] Service principal secrets. - * - * @param secrets the secrets value to set. - * @return the ServicePrincipalDatastoreCredentials object itself. - */ - public ServicePrincipalDatastoreCredentials withSecrets(ServicePrincipalDatastoreSecrets secrets) { - this.secrets = secrets; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (tenantId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property tenantId in model ServicePrincipalDatastoreCredentials")); - } - if (clientId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property clientId in model ServicePrincipalDatastoreCredentials")); - } - if (secrets() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property secrets in model ServicePrincipalDatastoreCredentials")); - } else { - secrets().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ServicePrincipalDatastoreCredentials.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("tenantId", Objects.toString(this.tenantId, null)); - jsonWriter.writeStringField("clientId", Objects.toString(this.clientId, null)); - jsonWriter.writeJsonField("secrets", this.secrets); - jsonWriter.writeStringField("credentialsType", - this.credentialsType == null ? null : this.credentialsType.toString()); - jsonWriter.writeStringField("authorityUrl", this.authorityUrl); - jsonWriter.writeStringField("resourceUrl", this.resourceUrl); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServicePrincipalDatastoreCredentials from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServicePrincipalDatastoreCredentials if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ServicePrincipalDatastoreCredentials. - */ - public static ServicePrincipalDatastoreCredentials fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServicePrincipalDatastoreCredentials deserializedServicePrincipalDatastoreCredentials - = new ServicePrincipalDatastoreCredentials(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tenantId".equals(fieldName)) { - deserializedServicePrincipalDatastoreCredentials.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("clientId".equals(fieldName)) { - deserializedServicePrincipalDatastoreCredentials.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("secrets".equals(fieldName)) { - deserializedServicePrincipalDatastoreCredentials.secrets - = ServicePrincipalDatastoreSecrets.fromJson(reader); - } else if ("credentialsType".equals(fieldName)) { - deserializedServicePrincipalDatastoreCredentials.credentialsType - = CredentialsType.fromString(reader.getString()); - } else if ("authorityUrl".equals(fieldName)) { - deserializedServicePrincipalDatastoreCredentials.authorityUrl = reader.getString(); - } else if ("resourceUrl".equals(fieldName)) { - deserializedServicePrincipalDatastoreCredentials.resourceUrl = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedServicePrincipalDatastoreCredentials; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.java deleted file mode 100644 index 98cbcf7f186d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import java.io.IOException; - -/** - * Datastore Service Principal secrets. - */ -@Fluent -public final class ServicePrincipalDatastoreSecrets extends DatastoreSecretsInner { - /* - * [Required] Credential type used to authentication with storage. - */ - private SecretsType secretsType = SecretsType.SERVICE_PRINCIPAL; - - /* - * Service principal secret. - */ - private String clientSecret; - - /** - * Creates an instance of ServicePrincipalDatastoreSecrets class. - */ - public ServicePrincipalDatastoreSecrets() { - } - - /** - * Get the secretsType property: [Required] Credential type used to authentication with storage. - * - * @return the secretsType value. - */ - @Override - public SecretsType secretsType() { - return this.secretsType; - } - - /** - * Get the clientSecret property: Service principal secret. - * - * @return the clientSecret value. - */ - public String clientSecret() { - return this.clientSecret; - } - - /** - * Set the clientSecret property: Service principal secret. - * - * @param clientSecret the clientSecret value to set. - * @return the ServicePrincipalDatastoreSecrets object itself. - */ - public ServicePrincipalDatastoreSecrets withClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("secretsType", this.secretsType == null ? null : this.secretsType.toString()); - jsonWriter.writeStringField("clientSecret", this.clientSecret); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServicePrincipalDatastoreSecrets from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServicePrincipalDatastoreSecrets if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ServicePrincipalDatastoreSecrets. - */ - public static ServicePrincipalDatastoreSecrets fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServicePrincipalDatastoreSecrets deserializedServicePrincipalDatastoreSecrets - = new ServicePrincipalDatastoreSecrets(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("secretsType".equals(fieldName)) { - deserializedServicePrincipalDatastoreSecrets.secretsType - = SecretsType.fromString(reader.getString()); - } else if ("clientSecret".equals(fieldName)) { - deserializedServicePrincipalDatastoreSecrets.clientSecret = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedServicePrincipalDatastoreSecrets; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagDestination.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagDestination.java deleted file mode 100644 index a574a3eb61d6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagDestination.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace. - */ -@Fluent -public final class ServiceTagDestination implements JsonSerializable { - /* - * The action enum for networking rule. - */ - private RuleAction action; - - /* - * Optional, if provided, the ServiceTag property will be ignored. - */ - private List addressPrefixes; - - /* - * The portRanges property. - */ - private String portRanges; - - /* - * The protocol property. - */ - private String protocol; - - /* - * The serviceTag property. - */ - private String serviceTag; - - /** - * Creates an instance of ServiceTagDestination class. - */ - public ServiceTagDestination() { - } - - /** - * Get the action property: The action enum for networking rule. - * - * @return the action value. - */ - public RuleAction action() { - return this.action; - } - - /** - * Set the action property: The action enum for networking rule. - * - * @param action the action value to set. - * @return the ServiceTagDestination object itself. - */ - public ServiceTagDestination withAction(RuleAction action) { - this.action = action; - return this; - } - - /** - * Get the addressPrefixes property: Optional, if provided, the ServiceTag property will be ignored. - * - * @return the addressPrefixes value. - */ - public List addressPrefixes() { - return this.addressPrefixes; - } - - /** - * Get the portRanges property: The portRanges property. - * - * @return the portRanges value. - */ - public String portRanges() { - return this.portRanges; - } - - /** - * Set the portRanges property: The portRanges property. - * - * @param portRanges the portRanges value to set. - * @return the ServiceTagDestination object itself. - */ - public ServiceTagDestination withPortRanges(String portRanges) { - this.portRanges = portRanges; - return this; - } - - /** - * Get the protocol property: The protocol property. - * - * @return the protocol value. - */ - public String protocol() { - return this.protocol; - } - - /** - * Set the protocol property: The protocol property. - * - * @param protocol the protocol value to set. - * @return the ServiceTagDestination object itself. - */ - public ServiceTagDestination withProtocol(String protocol) { - this.protocol = protocol; - return this; - } - - /** - * Get the serviceTag property: The serviceTag property. - * - * @return the serviceTag value. - */ - public String serviceTag() { - return this.serviceTag; - } - - /** - * Set the serviceTag property: The serviceTag property. - * - * @param serviceTag the serviceTag value to set. - * @return the ServiceTagDestination object itself. - */ - public ServiceTagDestination withServiceTag(String serviceTag) { - this.serviceTag = serviceTag; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); - jsonWriter.writeStringField("portRanges", this.portRanges); - jsonWriter.writeStringField("protocol", this.protocol); - jsonWriter.writeStringField("serviceTag", this.serviceTag); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServiceTagDestination from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServiceTagDestination if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ServiceTagDestination. - */ - public static ServiceTagDestination fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServiceTagDestination deserializedServiceTagDestination = new ServiceTagDestination(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("action".equals(fieldName)) { - deserializedServiceTagDestination.action = RuleAction.fromString(reader.getString()); - } else if ("addressPrefixes".equals(fieldName)) { - List addressPrefixes = reader.readArray(reader1 -> reader1.getString()); - deserializedServiceTagDestination.addressPrefixes = addressPrefixes; - } else if ("portRanges".equals(fieldName)) { - deserializedServiceTagDestination.portRanges = reader.getString(); - } else if ("protocol".equals(fieldName)) { - deserializedServiceTagDestination.protocol = reader.getString(); - } else if ("serviceTag".equals(fieldName)) { - deserializedServiceTagDestination.serviceTag = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedServiceTagDestination; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagOutboundRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagOutboundRule.java deleted file mode 100644 index 742b73db9dc8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagOutboundRule.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Service Tag Outbound Rule for the managed network of a machine learning workspace. - */ -@Fluent -public final class ServiceTagOutboundRule extends OutboundRule { - /* - * Type of a managed network Outbound Rule of a machine learning workspace. - */ - private RuleType type = RuleType.SERVICE_TAG; - - /* - * Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace. - */ - private ServiceTagDestination destination; - - /** - * Creates an instance of ServiceTagOutboundRule class. - */ - public ServiceTagOutboundRule() { - } - - /** - * Get the type property: Type of a managed network Outbound Rule of a machine learning workspace. - * - * @return the type value. - */ - @Override - public RuleType type() { - return this.type; - } - - /** - * Get the destination property: Service Tag destination for a Service Tag Outbound Rule for the managed network of - * a machine learning workspace. - * - * @return the destination value. - */ - public ServiceTagDestination destination() { - return this.destination; - } - - /** - * Set the destination property: Service Tag destination for a Service Tag Outbound Rule for the managed network of - * a machine learning workspace. - * - * @param destination the destination value to set. - * @return the ServiceTagOutboundRule object itself. - */ - public ServiceTagOutboundRule withDestination(ServiceTagDestination destination) { - this.destination = destination; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServiceTagOutboundRule withCategory(RuleCategory category) { - super.withCategory(category); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServiceTagOutboundRule withStatus(RuleStatus status) { - super.withStatus(status); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (destination() != null) { - destination().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", category() == null ? null : category().toString()); - jsonWriter.writeStringField("status", status() == null ? null : status().toString()); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeJsonField("destination", this.destination); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServiceTagOutboundRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServiceTagOutboundRule if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ServiceTagOutboundRule. - */ - public static ServiceTagOutboundRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServiceTagOutboundRule deserializedServiceTagOutboundRule = new ServiceTagOutboundRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedServiceTagOutboundRule.withCategory(RuleCategory.fromString(reader.getString())); - } else if ("status".equals(fieldName)) { - deserializedServiceTagOutboundRule.withStatus(RuleStatus.fromString(reader.getString())); - } else if ("type".equals(fieldName)) { - deserializedServiceTagOutboundRule.type = RuleType.fromString(reader.getString()); - } else if ("destination".equals(fieldName)) { - deserializedServiceTagOutboundRule.destination = ServiceTagDestination.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedServiceTagOutboundRule; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.java deleted file mode 100644 index f4c6309c0d0e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Details of customized scripts to execute for setting up the cluster. - */ -@Fluent -public final class SetupScripts implements JsonSerializable { - /* - * Customized setup scripts - */ - private ScriptsToExecute scripts; - - /** - * Creates an instance of SetupScripts class. - */ - public SetupScripts() { - } - - /** - * Get the scripts property: Customized setup scripts. - * - * @return the scripts value. - */ - public ScriptsToExecute scripts() { - return this.scripts; - } - - /** - * Set the scripts property: Customized setup scripts. - * - * @param scripts the scripts value to set. - * @return the SetupScripts object itself. - */ - public SetupScripts withScripts(ScriptsToExecute scripts) { - this.scripts = scripts; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scripts() != null) { - scripts().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("scripts", this.scripts); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SetupScripts from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SetupScripts if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SetupScripts. - */ - public static SetupScripts fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SetupScripts deserializedSetupScripts = new SetupScripts(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scripts".equals(fieldName)) { - deserializedSetupScripts.scripts = ScriptsToExecute.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSetupScripts; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.java deleted file mode 100644 index 06fbc71b599a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.java +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.SharedPrivateLinkResourceProperty; -import java.io.IOException; - -/** - * The SharedPrivateLinkResource model. - */ -@Fluent -public final class SharedPrivateLinkResource implements JsonSerializable { - /* - * Unique name of the private link. - */ - private String name; - - /* - * Resource properties. - */ - private SharedPrivateLinkResourceProperty innerProperties; - - /** - * Creates an instance of SharedPrivateLinkResource class. - */ - public SharedPrivateLinkResource() { - } - - /** - * Get the name property: Unique name of the private link. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Unique name of the private link. - * - * @param name the name value to set. - * @return the SharedPrivateLinkResource object itself. - */ - public SharedPrivateLinkResource withName(String name) { - this.name = name; - return this; - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private SharedPrivateLinkResourceProperty innerProperties() { - return this.innerProperties; - } - - /** - * Get the privateLinkResourceId property: The resource id that private link links to. - * - * @return the privateLinkResourceId value. - */ - public String privateLinkResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkResourceId(); - } - - /** - * Set the privateLinkResourceId property: The resource id that private link links to. - * - * @param privateLinkResourceId the privateLinkResourceId value to set. - * @return the SharedPrivateLinkResource object itself. - */ - public SharedPrivateLinkResource withPrivateLinkResourceId(String privateLinkResourceId) { - if (this.innerProperties() == null) { - this.innerProperties = new SharedPrivateLinkResourceProperty(); - } - this.innerProperties().withPrivateLinkResourceId(privateLinkResourceId); - return this; - } - - /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - public String groupId() { - return this.innerProperties() == null ? null : this.innerProperties().groupId(); - } - - /** - * Set the groupId property: The private link resource group id. - * - * @param groupId the groupId value to set. - * @return the SharedPrivateLinkResource object itself. - */ - public SharedPrivateLinkResource withGroupId(String groupId) { - if (this.innerProperties() == null) { - this.innerProperties = new SharedPrivateLinkResourceProperty(); - } - this.innerProperties().withGroupId(groupId); - return this; - } - - /** - * Get the requestMessage property: Request message. - * - * @return the requestMessage value. - */ - public String requestMessage() { - return this.innerProperties() == null ? null : this.innerProperties().requestMessage(); - } - - /** - * Set the requestMessage property: Request message. - * - * @param requestMessage the requestMessage value to set. - * @return the SharedPrivateLinkResource object itself. - */ - public SharedPrivateLinkResource withRequestMessage(String requestMessage) { - if (this.innerProperties() == null) { - this.innerProperties = new SharedPrivateLinkResourceProperty(); - } - this.innerProperties().withRequestMessage(requestMessage); - return this; - } - - /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @return the status value. - */ - public PrivateEndpointServiceConnectionStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @param status the status value to set. - * @return the SharedPrivateLinkResource object itself. - */ - public SharedPrivateLinkResource withStatus(PrivateEndpointServiceConnectionStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new SharedPrivateLinkResourceProperty(); - } - this.innerProperties().withStatus(status); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SharedPrivateLinkResource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SharedPrivateLinkResource if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SharedPrivateLinkResource. - */ - public static SharedPrivateLinkResource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SharedPrivateLinkResource deserializedSharedPrivateLinkResource = new SharedPrivateLinkResource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedSharedPrivateLinkResource.name = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedSharedPrivateLinkResource.innerProperties - = SharedPrivateLinkResourceProperty.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSharedPrivateLinkResource; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.java deleted file mode 100644 index c0432d8030ad..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The parameter defining how if AutoML should handle short time series. - */ -public final class ShortSeriesHandlingConfiguration extends ExpandableStringEnum { - /** - * Static value None for ShortSeriesHandlingConfiguration. - */ - public static final ShortSeriesHandlingConfiguration NONE = fromString("None"); - - /** - * Static value Auto for ShortSeriesHandlingConfiguration. - */ - public static final ShortSeriesHandlingConfiguration AUTO = fromString("Auto"); - - /** - * Static value Pad for ShortSeriesHandlingConfiguration. - */ - public static final ShortSeriesHandlingConfiguration PAD = fromString("Pad"); - - /** - * Static value Drop for ShortSeriesHandlingConfiguration. - */ - public static final ShortSeriesHandlingConfiguration DROP = fromString("Drop"); - - /** - * Creates a new instance of ShortSeriesHandlingConfiguration value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ShortSeriesHandlingConfiguration() { - } - - /** - * Creates or finds a ShortSeriesHandlingConfiguration from its string representation. - * - * @param name a name to look for. - * @return the corresponding ShortSeriesHandlingConfiguration. - */ - public static ShortSeriesHandlingConfiguration fromString(String name) { - return fromString(name, ShortSeriesHandlingConfiguration.class); - } - - /** - * Gets known ShortSeriesHandlingConfiguration values. - * - * @return known ShortSeriesHandlingConfiguration values. - */ - public static Collection values() { - return values(ShortSeriesHandlingConfiguration.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Sku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Sku.java deleted file mode 100644 index 43243f6100f7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Sku.java +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The resource model definition representing SKU. - */ -@Fluent -public final class Sku implements JsonSerializable { - /* - * The name of the SKU. Ex - P3. It is typically a letter+number code - */ - private String name; - - /* - * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is - * not required on a PUT. - */ - private SkuTier tier; - - /* - * The SKU size. When the name field is the combination of tier and some other value, this would be the standalone - * code. - */ - private String size; - - /* - * If the service has different generations of hardware, for the same SKU, then that can be captured here. - */ - private String family; - - /* - * If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible - * for the resource this may be omitted. - */ - private Integer capacity; - - /** - * Creates an instance of Sku class. - */ - public Sku() { - } - - /** - * Get the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. - * - * @param name the name value to set. - * @return the Sku object itself. - */ - public Sku withName(String name) { - this.name = name; - return this; - } - - /** - * Get the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. - * - * @return the tier value. - */ - public SkuTier tier() { - return this.tier; - } - - /** - * Set the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. - * - * @param tier the tier value to set. - * @return the Sku object itself. - */ - public Sku withTier(SkuTier tier) { - this.tier = tier; - return this; - } - - /** - * Get the size property: The SKU size. When the name field is the combination of tier and some other value, this - * would be the standalone code. - * - * @return the size value. - */ - public String size() { - return this.size; - } - - /** - * Set the size property: The SKU size. When the name field is the combination of tier and some other value, this - * would be the standalone code. - * - * @param size the size value to set. - * @return the Sku object itself. - */ - public Sku withSize(String size) { - this.size = size; - return this; - } - - /** - * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. - * - * @return the family value. - */ - public String family() { - return this.family; - } - - /** - * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. - * - * @param family the family value to set. - * @return the Sku object itself. - */ - public Sku withFamily(String family) { - this.family = family; - return this; - } - - /** - * Get the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If - * scale out/in is not possible for the resource this may be omitted. - * - * @return the capacity value. - */ - public Integer capacity() { - return this.capacity; - } - - /** - * Set the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If - * scale out/in is not possible for the resource this may be omitted. - * - * @param capacity the capacity value to set. - * @return the Sku object itself. - */ - public Sku withCapacity(Integer capacity) { - this.capacity = capacity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Sku")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Sku.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("tier", this.tier == null ? null : this.tier.toString()); - jsonWriter.writeStringField("size", this.size); - jsonWriter.writeStringField("family", this.family); - jsonWriter.writeNumberField("capacity", this.capacity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Sku from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Sku if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the Sku. - */ - public static Sku fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Sku deserializedSku = new Sku(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedSku.name = reader.getString(); - } else if ("tier".equals(fieldName)) { - deserializedSku.tier = SkuTier.fromString(reader.getString()); - } else if ("size".equals(fieldName)) { - deserializedSku.size = reader.getString(); - } else if ("family".equals(fieldName)) { - deserializedSku.family = reader.getString(); - } else if ("capacity".equals(fieldName)) { - deserializedSku.capacity = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedSku; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.java deleted file mode 100644 index 50bdf48a59fc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * SKU capacity information. - */ -@Fluent -public final class SkuCapacity implements JsonSerializable { - /* - * Gets or sets the minimum. - */ - private Integer minimum; - - /* - * Gets or sets the maximum. - */ - private Integer maximum; - - /* - * Gets or sets the default capacity. - */ - private Integer defaultProperty; - - /* - * Gets or sets the type of the scale. - */ - private SkuScaleType scaleType; - - /** - * Creates an instance of SkuCapacity class. - */ - public SkuCapacity() { - } - - /** - * Get the minimum property: Gets or sets the minimum. - * - * @return the minimum value. - */ - public Integer minimum() { - return this.minimum; - } - - /** - * Set the minimum property: Gets or sets the minimum. - * - * @param minimum the minimum value to set. - * @return the SkuCapacity object itself. - */ - public SkuCapacity withMinimum(Integer minimum) { - this.minimum = minimum; - return this; - } - - /** - * Get the maximum property: Gets or sets the maximum. - * - * @return the maximum value. - */ - public Integer maximum() { - return this.maximum; - } - - /** - * Set the maximum property: Gets or sets the maximum. - * - * @param maximum the maximum value to set. - * @return the SkuCapacity object itself. - */ - public SkuCapacity withMaximum(Integer maximum) { - this.maximum = maximum; - return this; - } - - /** - * Get the defaultProperty property: Gets or sets the default capacity. - * - * @return the defaultProperty value. - */ - public Integer defaultProperty() { - return this.defaultProperty; - } - - /** - * Set the defaultProperty property: Gets or sets the default capacity. - * - * @param defaultProperty the defaultProperty value to set. - * @return the SkuCapacity object itself. - */ - public SkuCapacity withDefaultProperty(Integer defaultProperty) { - this.defaultProperty = defaultProperty; - return this; - } - - /** - * Get the scaleType property: Gets or sets the type of the scale. - * - * @return the scaleType value. - */ - public SkuScaleType scaleType() { - return this.scaleType; - } - - /** - * Set the scaleType property: Gets or sets the type of the scale. - * - * @param scaleType the scaleType value to set. - * @return the SkuCapacity object itself. - */ - public SkuCapacity withScaleType(SkuScaleType scaleType) { - this.scaleType = scaleType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("minimum", this.minimum); - jsonWriter.writeNumberField("maximum", this.maximum); - jsonWriter.writeNumberField("default", this.defaultProperty); - jsonWriter.writeStringField("scaleType", this.scaleType == null ? null : this.scaleType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SkuCapacity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SkuCapacity if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SkuCapacity. - */ - public static SkuCapacity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SkuCapacity deserializedSkuCapacity = new SkuCapacity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("minimum".equals(fieldName)) { - deserializedSkuCapacity.minimum = reader.getNullable(JsonReader::getInt); - } else if ("maximum".equals(fieldName)) { - deserializedSkuCapacity.maximum = reader.getNullable(JsonReader::getInt); - } else if ("default".equals(fieldName)) { - deserializedSkuCapacity.defaultProperty = reader.getNullable(JsonReader::getInt); - } else if ("scaleType".equals(fieldName)) { - deserializedSkuCapacity.scaleType = SkuScaleType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSkuCapacity; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResource.java deleted file mode 100644 index 3bbd83fa8bb0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResource.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; - -/** - * An immutable client-side representation of SkuResource. - */ -public interface SkuResource { - /** - * Gets the resourceType property: The resource type name. - * - * @return the resourceType value. - */ - String resourceType(); - - /** - * Gets the sku property: Gets or sets the Sku. - * - * @return the sku value. - */ - SkuSetting sku(); - - /** - * Gets the capacity property: Gets or sets the Sku Capacity. - * - * @return the capacity value. - */ - SkuCapacity capacity(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner object. - * - * @return the inner object. - */ - SkuResourceInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResourceArmPaginatedResult.java deleted file mode 100644 index 499c476bfaa5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResourceArmPaginatedResult.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * A paginated list of SkuResource entities. - */ -@Fluent -public final class SkuResourceArmPaginatedResult implements JsonSerializable { - /* - * An array of objects of type SkuResource. - */ - private List value; - - /* - * The link to the next page of SkuResource objects. If null, there are no additional pages. - */ - private String nextLink; - - /** - * Creates an instance of SkuResourceArmPaginatedResult class. - */ - public SkuResourceArmPaginatedResult() { - } - - /** - * Get the value property: An array of objects of type SkuResource. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type SkuResource. - * - * @param value the value value to set. - * @return the SkuResourceArmPaginatedResult object itself. - */ - public SkuResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of SkuResource objects. If null, there are no additional - * pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of SkuResource objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the SkuResourceArmPaginatedResult object itself. - */ - public SkuResourceArmPaginatedResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SkuResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SkuResourceArmPaginatedResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SkuResourceArmPaginatedResult. - */ - public static SkuResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SkuResourceArmPaginatedResult deserializedSkuResourceArmPaginatedResult - = new SkuResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> SkuResourceInner.fromJson(reader1)); - deserializedSkuResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedSkuResourceArmPaginatedResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSkuResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.java deleted file mode 100644 index 2d53080f8976..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Node scaling setting for the compute sku. - */ -public final class SkuScaleType extends ExpandableStringEnum { - /** - * Static value Automatic for SkuScaleType. - */ - public static final SkuScaleType AUTOMATIC = fromString("Automatic"); - - /** - * Static value Manual for SkuScaleType. - */ - public static final SkuScaleType MANUAL = fromString("Manual"); - - /** - * Static value None for SkuScaleType. - */ - public static final SkuScaleType NONE = fromString("None"); - - /** - * Creates a new instance of SkuScaleType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SkuScaleType() { - } - - /** - * Creates or finds a SkuScaleType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SkuScaleType. - */ - public static SkuScaleType fromString(String name) { - return fromString(name, SkuScaleType.class); - } - - /** - * Gets known SkuScaleType values. - * - * @return known SkuScaleType values. - */ - public static Collection values() { - return values(SkuScaleType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuSetting.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuSetting.java deleted file mode 100644 index a847b264d6ab..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuSetting.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * SkuSetting fulfills the need for stripped down SKU info in ARM contract. - */ -@Fluent -public final class SkuSetting implements JsonSerializable { - /* - * [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. - */ - private String name; - - /* - * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is - * not required on a PUT. - */ - private SkuTier tier; - - /** - * Creates an instance of SkuSetting class. - */ - public SkuSetting() { - } - - /** - * Get the name property: [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. - * - * @param name the name value to set. - * @return the SkuSetting object itself. - */ - public SkuSetting withName(String name) { - this.name = name; - return this; - } - - /** - * Get the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. - * - * @return the tier value. - */ - public SkuTier tier() { - return this.tier; - } - - /** - * Set the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. - * - * @param tier the tier value to set. - * @return the SkuSetting object itself. - */ - public SkuSetting withTier(SkuTier tier) { - this.tier = tier; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model SkuSetting")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SkuSetting.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("tier", this.tier == null ? null : this.tier.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SkuSetting from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SkuSetting if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SkuSetting. - */ - public static SkuSetting fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SkuSetting deserializedSkuSetting = new SkuSetting(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedSkuSetting.name = reader.getString(); - } else if ("tier".equals(fieldName)) { - deserializedSkuSetting.tier = SkuTier.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSkuSetting; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuTier.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuTier.java deleted file mode 100644 index 9fe163fb9c66..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuTier.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.machinelearning.models; - -/** - * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not - * required on a PUT. - */ -public enum SkuTier { - /** - * Enum value Free. - */ - FREE("Free"), - - /** - * Enum value Basic. - */ - BASIC("Basic"), - - /** - * Enum value Standard. - */ - STANDARD("Standard"), - - /** - * Enum value Premium. - */ - PREMIUM("Premium"); - - /** - * The actual serialized value for a SkuTier instance. - */ - private final String value; - - SkuTier(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a SkuTier instance. - * - * @param value the serialized value to parse. - * @return the parsed SkuTier object, or null if unable to parse. - */ - public static SkuTier fromString(String value) { - if (value == null) { - return null; - } - SkuTier[] items = SkuTier.values(); - for (SkuTier item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.java deleted file mode 100644 index 16600363c58d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Data source type. - */ -public final class SourceType extends ExpandableStringEnum { - /** - * Static value Dataset for SourceType. - */ - public static final SourceType DATASET = fromString("Dataset"); - - /** - * Static value Datastore for SourceType. - */ - public static final SourceType DATASTORE = fromString("Datastore"); - - /** - * Static value URI for SourceType. - */ - public static final SourceType URI = fromString("URI"); - - /** - * Creates a new instance of SourceType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SourceType() { - } - - /** - * Creates or finds a SourceType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SourceType. - */ - public static SourceType fromString(String name) { - return fromString(name, SourceType.class); - } - - /** - * Gets known SourceType values. - * - * @return known SourceType values. - */ - public static Collection values() { - return values(SourceType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJob.java deleted file mode 100644 index ad1ddf074bc6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJob.java +++ /dev/null @@ -1,673 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Spark job definition. - */ -@Fluent -public final class SparkJob extends JobBaseProperties { - /* - * [Required] Specifies the type of job. - */ - private JobType jobType = JobType.SPARK; - - /* - * Compute Resource configuration for the job. - */ - private SparkResourceConfiguration resources; - - /* - * Arguments for the job. - */ - private String args; - - /* - * [Required] arm-id of the code asset. - */ - private String codeId; - - /* - * [Required] The entry to execute on startup of the job. - */ - private SparkJobEntry entry; - - /* - * The ARM resource ID of the Environment specification for the job. - */ - private String environmentId; - - /* - * Mapping of input data bindings used in the job. - */ - private Map inputs; - - /* - * Mapping of output data bindings used in the job. - */ - private Map outputs; - - /* - * Python files used in the job. - */ - private List pyFiles; - - /* - * Jar files used in the job. - */ - private List jars; - - /* - * Files used in the job. - */ - private List files; - - /* - * Archive files used in the job. - */ - private List archives; - - /* - * Spark configured properties. - */ - private Map conf; - - /* - * Queue settings for the job - */ - private QueueSettings queueSettings; - - /* - * Environment variables included in the job. - */ - private Map environmentVariables; - - /* - * Status of the job. - */ - private JobStatus status; - - /** - * Creates an instance of SparkJob class. - */ - public SparkJob() { - } - - /** - * Get the jobType property: [Required] Specifies the type of job. - * - * @return the jobType value. - */ - @Override - public JobType jobType() { - return this.jobType; - } - - /** - * Get the resources property: Compute Resource configuration for the job. - * - * @return the resources value. - */ - public SparkResourceConfiguration resources() { - return this.resources; - } - - /** - * Set the resources property: Compute Resource configuration for the job. - * - * @param resources the resources value to set. - * @return the SparkJob object itself. - */ - public SparkJob withResources(SparkResourceConfiguration resources) { - this.resources = resources; - return this; - } - - /** - * Get the args property: Arguments for the job. - * - * @return the args value. - */ - public String args() { - return this.args; - } - - /** - * Set the args property: Arguments for the job. - * - * @param args the args value to set. - * @return the SparkJob object itself. - */ - public SparkJob withArgs(String args) { - this.args = args; - return this; - } - - /** - * Get the codeId property: [Required] arm-id of the code asset. - * - * @return the codeId value. - */ - public String codeId() { - return this.codeId; - } - - /** - * Set the codeId property: [Required] arm-id of the code asset. - * - * @param codeId the codeId value to set. - * @return the SparkJob object itself. - */ - public SparkJob withCodeId(String codeId) { - this.codeId = codeId; - return this; - } - - /** - * Get the entry property: [Required] The entry to execute on startup of the job. - * - * @return the entry value. - */ - public SparkJobEntry entry() { - return this.entry; - } - - /** - * Set the entry property: [Required] The entry to execute on startup of the job. - * - * @param entry the entry value to set. - * @return the SparkJob object itself. - */ - public SparkJob withEntry(SparkJobEntry entry) { - this.entry = entry; - return this; - } - - /** - * Get the environmentId property: The ARM resource ID of the Environment specification for the job. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId property: The ARM resource ID of the Environment specification for the job. - * - * @param environmentId the environmentId value to set. - * @return the SparkJob object itself. - */ - public SparkJob withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Get the inputs property: Mapping of input data bindings used in the job. - * - * @return the inputs value. - */ - public Map inputs() { - return this.inputs; - } - - /** - * Set the inputs property: Mapping of input data bindings used in the job. - * - * @param inputs the inputs value to set. - * @return the SparkJob object itself. - */ - public SparkJob withInputs(Map inputs) { - this.inputs = inputs; - return this; - } - - /** - * Get the outputs property: Mapping of output data bindings used in the job. - * - * @return the outputs value. - */ - public Map outputs() { - return this.outputs; - } - - /** - * Set the outputs property: Mapping of output data bindings used in the job. - * - * @param outputs the outputs value to set. - * @return the SparkJob object itself. - */ - public SparkJob withOutputs(Map outputs) { - this.outputs = outputs; - return this; - } - - /** - * Get the pyFiles property: Python files used in the job. - * - * @return the pyFiles value. - */ - public List pyFiles() { - return this.pyFiles; - } - - /** - * Set the pyFiles property: Python files used in the job. - * - * @param pyFiles the pyFiles value to set. - * @return the SparkJob object itself. - */ - public SparkJob withPyFiles(List pyFiles) { - this.pyFiles = pyFiles; - return this; - } - - /** - * Get the jars property: Jar files used in the job. - * - * @return the jars value. - */ - public List jars() { - return this.jars; - } - - /** - * Set the jars property: Jar files used in the job. - * - * @param jars the jars value to set. - * @return the SparkJob object itself. - */ - public SparkJob withJars(List jars) { - this.jars = jars; - return this; - } - - /** - * Get the files property: Files used in the job. - * - * @return the files value. - */ - public List files() { - return this.files; - } - - /** - * Set the files property: Files used in the job. - * - * @param files the files value to set. - * @return the SparkJob object itself. - */ - public SparkJob withFiles(List files) { - this.files = files; - return this; - } - - /** - * Get the archives property: Archive files used in the job. - * - * @return the archives value. - */ - public List archives() { - return this.archives; - } - - /** - * Set the archives property: Archive files used in the job. - * - * @param archives the archives value to set. - * @return the SparkJob object itself. - */ - public SparkJob withArchives(List archives) { - this.archives = archives; - return this; - } - - /** - * Get the conf property: Spark configured properties. - * - * @return the conf value. - */ - public Map conf() { - return this.conf; - } - - /** - * Set the conf property: Spark configured properties. - * - * @param conf the conf value to set. - * @return the SparkJob object itself. - */ - public SparkJob withConf(Map conf) { - this.conf = conf; - return this; - } - - /** - * Get the queueSettings property: Queue settings for the job. - * - * @return the queueSettings value. - */ - public QueueSettings queueSettings() { - return this.queueSettings; - } - - /** - * Set the queueSettings property: Queue settings for the job. - * - * @param queueSettings the queueSettings value to set. - * @return the SparkJob object itself. - */ - public SparkJob withQueueSettings(QueueSettings queueSettings) { - this.queueSettings = queueSettings; - return this; - } - - /** - * Get the environmentVariables property: Environment variables included in the job. - * - * @return the environmentVariables value. - */ - public Map environmentVariables() { - return this.environmentVariables; - } - - /** - * Set the environmentVariables property: Environment variables included in the job. - * - * @param environmentVariables the environmentVariables value to set. - * @return the SparkJob object itself. - */ - public SparkJob withEnvironmentVariables(Map environmentVariables) { - this.environmentVariables = environmentVariables; - return this; - } - - /** - * Get the status property: Status of the job. - * - * @return the status value. - */ - @Override - public JobStatus status() { - return this.status; - } - - /** - * {@inheritDoc} - */ - @Override - public SparkJob withDisplayName(String displayName) { - super.withDisplayName(displayName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SparkJob withExperimentName(String experimentName) { - super.withExperimentName(experimentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SparkJob withServices(Map services) { - super.withServices(services); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SparkJob withComputeId(String computeId) { - super.withComputeId(computeId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SparkJob withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SparkJob withIdentity(IdentityConfiguration identity) { - super.withIdentity(identity); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SparkJob withComponentId(String componentId) { - super.withComponentId(componentId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SparkJob withNotificationSetting(NotificationSetting notificationSetting) { - super.withNotificationSetting(notificationSetting); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SparkJob withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SparkJob withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SparkJob withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (resources() != null) { - resources().validate(); - } - if (codeId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property codeId in model SparkJob")); - } - if (entry() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property entry in model SparkJob")); - } else { - entry().validate(); - } - if (inputs() != null) { - inputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (outputs() != null) { - outputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (queueSettings() != null) { - queueSettings().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SparkJob.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("displayName", displayName()); - jsonWriter.writeStringField("experimentName", experimentName()); - jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", computeId()); - jsonWriter.writeBooleanField("isArchived", isArchived()); - jsonWriter.writeJsonField("identity", identity()); - jsonWriter.writeStringField("componentId", componentId()); - jsonWriter.writeJsonField("notificationSetting", notificationSetting()); - jsonWriter.writeStringField("codeId", this.codeId); - jsonWriter.writeJsonField("entry", this.entry); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeJsonField("resources", this.resources); - jsonWriter.writeStringField("args", this.args); - jsonWriter.writeStringField("environmentId", this.environmentId); - jsonWriter.writeMapField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("pyFiles", this.pyFiles, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("jars", this.jars, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("files", this.files, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("archives", this.archives, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("conf", this.conf, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("queueSettings", this.queueSettings); - jsonWriter.writeMapField("environmentVariables", this.environmentVariables, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SparkJob from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SparkJob if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SparkJob. - */ - public static SparkJob fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SparkJob deserializedSparkJob = new SparkJob(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedSparkJob.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedSparkJob.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedSparkJob.withProperties(properties); - } else if ("displayName".equals(fieldName)) { - deserializedSparkJob.withDisplayName(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedSparkJob.status = JobStatus.fromString(reader.getString()); - } else if ("experimentName".equals(fieldName)) { - deserializedSparkJob.withExperimentName(reader.getString()); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedSparkJob.withServices(services); - } else if ("computeId".equals(fieldName)) { - deserializedSparkJob.withComputeId(reader.getString()); - } else if ("isArchived".equals(fieldName)) { - deserializedSparkJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("identity".equals(fieldName)) { - deserializedSparkJob.withIdentity(IdentityConfiguration.fromJson(reader)); - } else if ("componentId".equals(fieldName)) { - deserializedSparkJob.withComponentId(reader.getString()); - } else if ("notificationSetting".equals(fieldName)) { - deserializedSparkJob.withNotificationSetting(NotificationSetting.fromJson(reader)); - } else if ("codeId".equals(fieldName)) { - deserializedSparkJob.codeId = reader.getString(); - } else if ("entry".equals(fieldName)) { - deserializedSparkJob.entry = SparkJobEntry.fromJson(reader); - } else if ("jobType".equals(fieldName)) { - deserializedSparkJob.jobType = JobType.fromString(reader.getString()); - } else if ("resources".equals(fieldName)) { - deserializedSparkJob.resources = SparkResourceConfiguration.fromJson(reader); - } else if ("args".equals(fieldName)) { - deserializedSparkJob.args = reader.getString(); - } else if ("environmentId".equals(fieldName)) { - deserializedSparkJob.environmentId = reader.getString(); - } else if ("inputs".equals(fieldName)) { - Map inputs = reader.readMap(reader1 -> JobInput.fromJson(reader1)); - deserializedSparkJob.inputs = inputs; - } else if ("outputs".equals(fieldName)) { - Map outputs = reader.readMap(reader1 -> JobOutput.fromJson(reader1)); - deserializedSparkJob.outputs = outputs; - } else if ("pyFiles".equals(fieldName)) { - List pyFiles = reader.readArray(reader1 -> reader1.getString()); - deserializedSparkJob.pyFiles = pyFiles; - } else if ("jars".equals(fieldName)) { - List jars = reader.readArray(reader1 -> reader1.getString()); - deserializedSparkJob.jars = jars; - } else if ("files".equals(fieldName)) { - List files = reader.readArray(reader1 -> reader1.getString()); - deserializedSparkJob.files = files; - } else if ("archives".equals(fieldName)) { - List archives = reader.readArray(reader1 -> reader1.getString()); - deserializedSparkJob.archives = archives; - } else if ("conf".equals(fieldName)) { - Map conf = reader.readMap(reader1 -> reader1.getString()); - deserializedSparkJob.conf = conf; - } else if ("queueSettings".equals(fieldName)) { - deserializedSparkJob.queueSettings = QueueSettings.fromJson(reader); - } else if ("environmentVariables".equals(fieldName)) { - Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); - deserializedSparkJob.environmentVariables = environmentVariables; - } else { - reader.skipChildren(); - } - } - - return deserializedSparkJob; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.java deleted file mode 100644 index 798b5708150d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Spark job entry point definition. - */ -@Immutable -public class SparkJobEntry implements JsonSerializable { - /* - * [Required] Type of the job's entry point. - */ - private SparkJobEntryType sparkJobEntryType = SparkJobEntryType.fromString("SparkJobEntry"); - - /** - * Creates an instance of SparkJobEntry class. - */ - public SparkJobEntry() { - } - - /** - * Get the sparkJobEntryType property: [Required] Type of the job's entry point. - * - * @return the sparkJobEntryType value. - */ - public SparkJobEntryType sparkJobEntryType() { - return this.sparkJobEntryType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sparkJobEntryType", - this.sparkJobEntryType == null ? null : this.sparkJobEntryType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SparkJobEntry from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SparkJobEntry if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SparkJobEntry. - */ - public static SparkJobEntry fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("sparkJobEntryType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("SparkJobPythonEntry".equals(discriminatorValue)) { - return SparkJobPythonEntry.fromJson(readerToUse.reset()); - } else if ("SparkJobScalaEntry".equals(discriminatorValue)) { - return SparkJobScalaEntry.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static SparkJobEntry fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SparkJobEntry deserializedSparkJobEntry = new SparkJobEntry(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sparkJobEntryType".equals(fieldName)) { - deserializedSparkJobEntry.sparkJobEntryType = SparkJobEntryType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSparkJobEntry; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntryType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntryType.java deleted file mode 100644 index faca97a178bd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntryType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for SparkJobEntryType. - */ -public final class SparkJobEntryType extends ExpandableStringEnum { - /** - * Static value SparkJobPythonEntry for SparkJobEntryType. - */ - public static final SparkJobEntryType SPARK_JOB_PYTHON_ENTRY = fromString("SparkJobPythonEntry"); - - /** - * Static value SparkJobScalaEntry for SparkJobEntryType. - */ - public static final SparkJobEntryType SPARK_JOB_SCALA_ENTRY = fromString("SparkJobScalaEntry"); - - /** - * Creates a new instance of SparkJobEntryType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SparkJobEntryType() { - } - - /** - * Creates or finds a SparkJobEntryType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SparkJobEntryType. - */ - public static SparkJobEntryType fromString(String name) { - return fromString(name, SparkJobEntryType.class); - } - - /** - * Gets known SparkJobEntryType values. - * - * @return known SparkJobEntryType values. - */ - public static Collection values() { - return values(SparkJobEntryType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.java deleted file mode 100644 index c2db6133028f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The SparkJobPythonEntry model. - */ -@Fluent -public final class SparkJobPythonEntry extends SparkJobEntry { - /* - * [Required] Type of the job's entry point. - */ - private SparkJobEntryType sparkJobEntryType = SparkJobEntryType.SPARK_JOB_PYTHON_ENTRY; - - /* - * [Required] Relative python file path for job entry point. - */ - private String file; - - /** - * Creates an instance of SparkJobPythonEntry class. - */ - public SparkJobPythonEntry() { - } - - /** - * Get the sparkJobEntryType property: [Required] Type of the job's entry point. - * - * @return the sparkJobEntryType value. - */ - @Override - public SparkJobEntryType sparkJobEntryType() { - return this.sparkJobEntryType; - } - - /** - * Get the file property: [Required] Relative python file path for job entry point. - * - * @return the file value. - */ - public String file() { - return this.file; - } - - /** - * Set the file property: [Required] Relative python file path for job entry point. - * - * @param file the file value to set. - * @return the SparkJobPythonEntry object itself. - */ - public SparkJobPythonEntry withFile(String file) { - this.file = file; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (file() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property file in model SparkJobPythonEntry")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SparkJobPythonEntry.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("file", this.file); - jsonWriter.writeStringField("sparkJobEntryType", - this.sparkJobEntryType == null ? null : this.sparkJobEntryType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SparkJobPythonEntry from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SparkJobPythonEntry if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SparkJobPythonEntry. - */ - public static SparkJobPythonEntry fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SparkJobPythonEntry deserializedSparkJobPythonEntry = new SparkJobPythonEntry(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("file".equals(fieldName)) { - deserializedSparkJobPythonEntry.file = reader.getString(); - } else if ("sparkJobEntryType".equals(fieldName)) { - deserializedSparkJobPythonEntry.sparkJobEntryType - = SparkJobEntryType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSparkJobPythonEntry; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.java deleted file mode 100644 index e735204c3b6d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The SparkJobScalaEntry model. - */ -@Fluent -public final class SparkJobScalaEntry extends SparkJobEntry { - /* - * [Required] Type of the job's entry point. - */ - private SparkJobEntryType sparkJobEntryType = SparkJobEntryType.SPARK_JOB_SCALA_ENTRY; - - /* - * [Required] Scala class name used as entry point. - */ - private String className; - - /** - * Creates an instance of SparkJobScalaEntry class. - */ - public SparkJobScalaEntry() { - } - - /** - * Get the sparkJobEntryType property: [Required] Type of the job's entry point. - * - * @return the sparkJobEntryType value. - */ - @Override - public SparkJobEntryType sparkJobEntryType() { - return this.sparkJobEntryType; - } - - /** - * Get the className property: [Required] Scala class name used as entry point. - * - * @return the className value. - */ - public String className() { - return this.className; - } - - /** - * Set the className property: [Required] Scala class name used as entry point. - * - * @param className the className value to set. - * @return the SparkJobScalaEntry object itself. - */ - public SparkJobScalaEntry withClassName(String className) { - this.className = className; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (className() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property className in model SparkJobScalaEntry")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SparkJobScalaEntry.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("className", this.className); - jsonWriter.writeStringField("sparkJobEntryType", - this.sparkJobEntryType == null ? null : this.sparkJobEntryType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SparkJobScalaEntry from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SparkJobScalaEntry if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SparkJobScalaEntry. - */ - public static SparkJobScalaEntry fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SparkJobScalaEntry deserializedSparkJobScalaEntry = new SparkJobScalaEntry(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("className".equals(fieldName)) { - deserializedSparkJobScalaEntry.className = reader.getString(); - } else if ("sparkJobEntryType".equals(fieldName)) { - deserializedSparkJobScalaEntry.sparkJobEntryType = SparkJobEntryType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSparkJobScalaEntry; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java deleted file mode 100644 index 49b2e0c596d7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The SparkResourceConfiguration model. - */ -@Fluent -public final class SparkResourceConfiguration implements JsonSerializable { - /* - * Optional type of VM used as supported by the compute target. - */ - private String instanceType; - - /* - * Version of spark runtime used for the job. - */ - private String runtimeVersion; - - /** - * Creates an instance of SparkResourceConfiguration class. - */ - public SparkResourceConfiguration() { - } - - /** - * Get the instanceType property: Optional type of VM used as supported by the compute target. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Set the instanceType property: Optional type of VM used as supported by the compute target. - * - * @param instanceType the instanceType value to set. - * @return the SparkResourceConfiguration object itself. - */ - public SparkResourceConfiguration withInstanceType(String instanceType) { - this.instanceType = instanceType; - return this; - } - - /** - * Get the runtimeVersion property: Version of spark runtime used for the job. - * - * @return the runtimeVersion value. - */ - public String runtimeVersion() { - return this.runtimeVersion; - } - - /** - * Set the runtimeVersion property: Version of spark runtime used for the job. - * - * @param runtimeVersion the runtimeVersion value to set. - * @return the SparkResourceConfiguration object itself. - */ - public SparkResourceConfiguration withRuntimeVersion(String runtimeVersion) { - this.runtimeVersion = runtimeVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("runtimeVersion", this.runtimeVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SparkResourceConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SparkResourceConfiguration if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SparkResourceConfiguration. - */ - public static SparkResourceConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SparkResourceConfiguration deserializedSparkResourceConfiguration = new SparkResourceConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceType".equals(fieldName)) { - deserializedSparkResourceConfiguration.instanceType = reader.getString(); - } else if ("runtimeVersion".equals(fieldName)) { - deserializedSparkResourceConfiguration.runtimeVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSparkResourceConfiguration; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.java deleted file mode 100644 index 0468dbf671a7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Access policy for SSH - * - * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this - * instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if - * applicable. - */ -public final class SshPublicAccess extends ExpandableStringEnum { - /** - * Static value Enabled for SshPublicAccess. - */ - public static final SshPublicAccess ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for SshPublicAccess. - */ - public static final SshPublicAccess DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of SshPublicAccess value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SshPublicAccess() { - } - - /** - * Creates or finds a SshPublicAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding SshPublicAccess. - */ - public static SshPublicAccess fromString(String name) { - return fromString(name, SshPublicAccess.class); - } - - /** - * Gets known SshPublicAccess values. - * - * @return known SshPublicAccess values. - */ - public static Collection values() { - return values(SshPublicAccess.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigStatus.java deleted file mode 100644 index dbd0ce120535..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigStatus.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enable or disable ssl for scoring. - */ -public final class SslConfigStatus extends ExpandableStringEnum { - /** - * Static value Disabled for SslConfigStatus. - */ - public static final SslConfigStatus DISABLED = fromString("Disabled"); - - /** - * Static value Enabled for SslConfigStatus. - */ - public static final SslConfigStatus ENABLED = fromString("Enabled"); - - /** - * Static value Auto for SslConfigStatus. - */ - public static final SslConfigStatus AUTO = fromString("Auto"); - - /** - * Creates a new instance of SslConfigStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SslConfigStatus() { - } - - /** - * Creates or finds a SslConfigStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding SslConfigStatus. - */ - public static SslConfigStatus fromString(String name) { - return fromString(name, SslConfigStatus.class); - } - - /** - * Gets known SslConfigStatus values. - * - * @return known SslConfigStatus values. - */ - public static Collection values() { - return values(SslConfigStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.java deleted file mode 100644 index e47753ea237d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ssl configuration for scoring. - */ -@Fluent -public final class SslConfiguration implements JsonSerializable { - /* - * Enable or disable ssl for scoring - */ - private SslConfigStatus status; - - /* - * Cert data - */ - private String cert; - - /* - * Key data - */ - private String key; - - /* - * CNAME of the cert - */ - private String cname; - - /* - * Leaf domain label of public endpoint - */ - private String leafDomainLabel; - - /* - * Indicates whether to overwrite existing domain label. - */ - private Boolean overwriteExistingDomain; - - /** - * Creates an instance of SslConfiguration class. - */ - public SslConfiguration() { - } - - /** - * Get the status property: Enable or disable ssl for scoring. - * - * @return the status value. - */ - public SslConfigStatus status() { - return this.status; - } - - /** - * Set the status property: Enable or disable ssl for scoring. - * - * @param status the status value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withStatus(SslConfigStatus status) { - this.status = status; - return this; - } - - /** - * Get the cert property: Cert data. - * - * @return the cert value. - */ - public String cert() { - return this.cert; - } - - /** - * Set the cert property: Cert data. - * - * @param cert the cert value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withCert(String cert) { - this.cert = cert; - return this; - } - - /** - * Get the key property: Key data. - * - * @return the key value. - */ - public String key() { - return this.key; - } - - /** - * Set the key property: Key data. - * - * @param key the key value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withKey(String key) { - this.key = key; - return this; - } - - /** - * Get the cname property: CNAME of the cert. - * - * @return the cname value. - */ - public String cname() { - return this.cname; - } - - /** - * Set the cname property: CNAME of the cert. - * - * @param cname the cname value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withCname(String cname) { - this.cname = cname; - return this; - } - - /** - * Get the leafDomainLabel property: Leaf domain label of public endpoint. - * - * @return the leafDomainLabel value. - */ - public String leafDomainLabel() { - return this.leafDomainLabel; - } - - /** - * Set the leafDomainLabel property: Leaf domain label of public endpoint. - * - * @param leafDomainLabel the leafDomainLabel value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withLeafDomainLabel(String leafDomainLabel) { - this.leafDomainLabel = leafDomainLabel; - return this; - } - - /** - * Get the overwriteExistingDomain property: Indicates whether to overwrite existing domain label. - * - * @return the overwriteExistingDomain value. - */ - public Boolean overwriteExistingDomain() { - return this.overwriteExistingDomain; - } - - /** - * Set the overwriteExistingDomain property: Indicates whether to overwrite existing domain label. - * - * @param overwriteExistingDomain the overwriteExistingDomain value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withOverwriteExistingDomain(Boolean overwriteExistingDomain) { - this.overwriteExistingDomain = overwriteExistingDomain; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeStringField("cert", this.cert); - jsonWriter.writeStringField("key", this.key); - jsonWriter.writeStringField("cname", this.cname); - jsonWriter.writeStringField("leafDomainLabel", this.leafDomainLabel); - jsonWriter.writeBooleanField("overwriteExistingDomain", this.overwriteExistingDomain); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SslConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SslConfiguration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SslConfiguration. - */ - public static SslConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SslConfiguration deserializedSslConfiguration = new SslConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedSslConfiguration.status = SslConfigStatus.fromString(reader.getString()); - } else if ("cert".equals(fieldName)) { - deserializedSslConfiguration.cert = reader.getString(); - } else if ("key".equals(fieldName)) { - deserializedSslConfiguration.key = reader.getString(); - } else if ("cname".equals(fieldName)) { - deserializedSslConfiguration.cname = reader.getString(); - } else if ("leafDomainLabel".equals(fieldName)) { - deserializedSslConfiguration.leafDomainLabel = reader.getString(); - } else if ("overwriteExistingDomain".equals(fieldName)) { - deserializedSslConfiguration.overwriteExistingDomain = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedSslConfiguration; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackEnsembleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackEnsembleSettings.java deleted file mode 100644 index ed6bf75444c2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackEnsembleSettings.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Advances setting to customize StackEnsemble run. - */ -@Fluent -public final class StackEnsembleSettings implements JsonSerializable { - /* - * The meta-learner is a model trained on the output of the individual heterogeneous models. - */ - private StackMetaLearnerType stackMetaLearnerType; - - /* - * Specifies the proportion of the training set (when choosing train and validation type of training) to be reserved - * for training the meta-learner. Default value is 0.2. - */ - private Double stackMetaLearnerTrainPercentage; - - /* - * Optional parameters to pass to the initializer of the meta-learner. - */ - private Object stackMetaLearnerKWargs; - - /** - * Creates an instance of StackEnsembleSettings class. - */ - public StackEnsembleSettings() { - } - - /** - * Get the stackMetaLearnerType property: The meta-learner is a model trained on the output of the individual - * heterogeneous models. - * - * @return the stackMetaLearnerType value. - */ - public StackMetaLearnerType stackMetaLearnerType() { - return this.stackMetaLearnerType; - } - - /** - * Set the stackMetaLearnerType property: The meta-learner is a model trained on the output of the individual - * heterogeneous models. - * - * @param stackMetaLearnerType the stackMetaLearnerType value to set. - * @return the StackEnsembleSettings object itself. - */ - public StackEnsembleSettings withStackMetaLearnerType(StackMetaLearnerType stackMetaLearnerType) { - this.stackMetaLearnerType = stackMetaLearnerType; - return this; - } - - /** - * Get the stackMetaLearnerTrainPercentage property: Specifies the proportion of the training set (when choosing - * train and validation type of training) to be reserved for training the meta-learner. Default value is 0.2. - * - * @return the stackMetaLearnerTrainPercentage value. - */ - public Double stackMetaLearnerTrainPercentage() { - return this.stackMetaLearnerTrainPercentage; - } - - /** - * Set the stackMetaLearnerTrainPercentage property: Specifies the proportion of the training set (when choosing - * train and validation type of training) to be reserved for training the meta-learner. Default value is 0.2. - * - * @param stackMetaLearnerTrainPercentage the stackMetaLearnerTrainPercentage value to set. - * @return the StackEnsembleSettings object itself. - */ - public StackEnsembleSettings withStackMetaLearnerTrainPercentage(Double stackMetaLearnerTrainPercentage) { - this.stackMetaLearnerTrainPercentage = stackMetaLearnerTrainPercentage; - return this; - } - - /** - * Get the stackMetaLearnerKWargs property: Optional parameters to pass to the initializer of the meta-learner. - * - * @return the stackMetaLearnerKWargs value. - */ - public Object stackMetaLearnerKWargs() { - return this.stackMetaLearnerKWargs; - } - - /** - * Set the stackMetaLearnerKWargs property: Optional parameters to pass to the initializer of the meta-learner. - * - * @param stackMetaLearnerKWargs the stackMetaLearnerKWargs value to set. - * @return the StackEnsembleSettings object itself. - */ - public StackEnsembleSettings withStackMetaLearnerKWargs(Object stackMetaLearnerKWargs) { - this.stackMetaLearnerKWargs = stackMetaLearnerKWargs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("stackMetaLearnerType", - this.stackMetaLearnerType == null ? null : this.stackMetaLearnerType.toString()); - jsonWriter.writeNumberField("stackMetaLearnerTrainPercentage", this.stackMetaLearnerTrainPercentage); - jsonWriter.writeUntypedField("stackMetaLearnerKWargs", this.stackMetaLearnerKWargs); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StackEnsembleSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StackEnsembleSettings if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the StackEnsembleSettings. - */ - public static StackEnsembleSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StackEnsembleSettings deserializedStackEnsembleSettings = new StackEnsembleSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("stackMetaLearnerType".equals(fieldName)) { - deserializedStackEnsembleSettings.stackMetaLearnerType - = StackMetaLearnerType.fromString(reader.getString()); - } else if ("stackMetaLearnerTrainPercentage".equals(fieldName)) { - deserializedStackEnsembleSettings.stackMetaLearnerTrainPercentage - = reader.getNullable(JsonReader::getDouble); - } else if ("stackMetaLearnerKWargs".equals(fieldName)) { - deserializedStackEnsembleSettings.stackMetaLearnerKWargs = reader.readUntyped(); - } else { - reader.skipChildren(); - } - } - - return deserializedStackEnsembleSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackMetaLearnerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackMetaLearnerType.java deleted file mode 100644 index 5276a57767cc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackMetaLearnerType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The meta-learner is a model trained on the output of the individual heterogeneous models. - * Default meta-learners are LogisticRegression for classification tasks (or LogisticRegressionCV if cross-validation is - * enabled) and ElasticNet for regression/forecasting tasks (or ElasticNetCV if cross-validation is enabled). - * This parameter can be one of the following strings: LogisticRegression, LogisticRegressionCV, LightGBMClassifier, - * ElasticNet, ElasticNetCV, LightGBMRegressor, or LinearRegression. - */ -public final class StackMetaLearnerType extends ExpandableStringEnum { - /** - * Static value None for StackMetaLearnerType. - */ - public static final StackMetaLearnerType NONE = fromString("None"); - - /** - * Static value LogisticRegression for StackMetaLearnerType. - */ - public static final StackMetaLearnerType LOGISTIC_REGRESSION = fromString("LogisticRegression"); - - /** - * Static value LogisticRegressionCV for StackMetaLearnerType. - */ - public static final StackMetaLearnerType LOGISTIC_REGRESSION_CV = fromString("LogisticRegressionCV"); - - /** - * Static value LightGBMClassifier for StackMetaLearnerType. - */ - public static final StackMetaLearnerType LIGHT_GBMCLASSIFIER = fromString("LightGBMClassifier"); - - /** - * Static value ElasticNet for StackMetaLearnerType. - */ - public static final StackMetaLearnerType ELASTIC_NET = fromString("ElasticNet"); - - /** - * Static value ElasticNetCV for StackMetaLearnerType. - */ - public static final StackMetaLearnerType ELASTIC_NET_CV = fromString("ElasticNetCV"); - - /** - * Static value LightGBMRegressor for StackMetaLearnerType. - */ - public static final StackMetaLearnerType LIGHT_GBMREGRESSOR = fromString("LightGBMRegressor"); - - /** - * Static value LinearRegression for StackMetaLearnerType. - */ - public static final StackMetaLearnerType LINEAR_REGRESSION = fromString("LinearRegression"); - - /** - * Creates a new instance of StackMetaLearnerType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public StackMetaLearnerType() { - } - - /** - * Creates or finds a StackMetaLearnerType from its string representation. - * - * @param name a name to look for. - * @return the corresponding StackMetaLearnerType. - */ - public static StackMetaLearnerType fromString(String name) { - return fromString(name, StackMetaLearnerType.class); - } - - /** - * Gets known StackMetaLearnerType values. - * - * @return known StackMetaLearnerType values. - */ - public static Collection values() { - return values(StackMetaLearnerType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StaticInputData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StaticInputData.java deleted file mode 100644 index c0d3cfe73f2e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StaticInputData.java +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.Map; - -/** - * Static input data definition. - */ -@Fluent -public final class StaticInputData extends MonitoringInputDataBase { - /* - * [Required] Specifies the type of signal to monitor. - */ - private MonitoringInputDataType inputDataType = MonitoringInputDataType.STATIC; - - /* - * [Required] The start date of the data window. - */ - private OffsetDateTime windowStart; - - /* - * [Required] The end date of the data window. - */ - private OffsetDateTime windowEnd; - - /* - * Reference to the component asset used to preprocess the data. - */ - private String preprocessingComponentId; - - /** - * Creates an instance of StaticInputData class. - */ - public StaticInputData() { - } - - /** - * Get the inputDataType property: [Required] Specifies the type of signal to monitor. - * - * @return the inputDataType value. - */ - @Override - public MonitoringInputDataType inputDataType() { - return this.inputDataType; - } - - /** - * Get the windowStart property: [Required] The start date of the data window. - * - * @return the windowStart value. - */ - public OffsetDateTime windowStart() { - return this.windowStart; - } - - /** - * Set the windowStart property: [Required] The start date of the data window. - * - * @param windowStart the windowStart value to set. - * @return the StaticInputData object itself. - */ - public StaticInputData withWindowStart(OffsetDateTime windowStart) { - this.windowStart = windowStart; - return this; - } - - /** - * Get the windowEnd property: [Required] The end date of the data window. - * - * @return the windowEnd value. - */ - public OffsetDateTime windowEnd() { - return this.windowEnd; - } - - /** - * Set the windowEnd property: [Required] The end date of the data window. - * - * @param windowEnd the windowEnd value to set. - * @return the StaticInputData object itself. - */ - public StaticInputData withWindowEnd(OffsetDateTime windowEnd) { - this.windowEnd = windowEnd; - return this; - } - - /** - * Get the preprocessingComponentId property: Reference to the component asset used to preprocess the data. - * - * @return the preprocessingComponentId value. - */ - public String preprocessingComponentId() { - return this.preprocessingComponentId; - } - - /** - * Set the preprocessingComponentId property: Reference to the component asset used to preprocess the data. - * - * @param preprocessingComponentId the preprocessingComponentId value to set. - * @return the StaticInputData object itself. - */ - public StaticInputData withPreprocessingComponentId(String preprocessingComponentId) { - this.preprocessingComponentId = preprocessingComponentId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public StaticInputData withDataContext(String dataContext) { - super.withDataContext(dataContext); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public StaticInputData withJobInputType(JobInputType jobInputType) { - super.withJobInputType(jobInputType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public StaticInputData withUri(String uri) { - super.withUri(uri); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public StaticInputData withColumns(Map columns) { - super.withColumns(columns); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (windowStart() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property windowStart in model StaticInputData")); - } - if (windowEnd() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property windowEnd in model StaticInputData")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(StaticInputData.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("jobInputType", jobInputType() == null ? null : jobInputType().toString()); - jsonWriter.writeStringField("uri", uri()); - jsonWriter.writeStringField("dataContext", dataContext()); - jsonWriter.writeMapField("columns", columns(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("windowStart", - this.windowStart == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.windowStart)); - jsonWriter.writeStringField("windowEnd", - this.windowEnd == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.windowEnd)); - jsonWriter.writeStringField("inputDataType", this.inputDataType == null ? null : this.inputDataType.toString()); - jsonWriter.writeStringField("preprocessingComponentId", this.preprocessingComponentId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StaticInputData from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StaticInputData if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the StaticInputData. - */ - public static StaticInputData fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StaticInputData deserializedStaticInputData = new StaticInputData(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobInputType".equals(fieldName)) { - deserializedStaticInputData.withJobInputType(JobInputType.fromString(reader.getString())); - } else if ("uri".equals(fieldName)) { - deserializedStaticInputData.withUri(reader.getString()); - } else if ("dataContext".equals(fieldName)) { - deserializedStaticInputData.withDataContext(reader.getString()); - } else if ("columns".equals(fieldName)) { - Map columns = reader.readMap(reader1 -> reader1.getString()); - deserializedStaticInputData.withColumns(columns); - } else if ("windowStart".equals(fieldName)) { - deserializedStaticInputData.windowStart = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("windowEnd".equals(fieldName)) { - deserializedStaticInputData.windowEnd = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("inputDataType".equals(fieldName)) { - deserializedStaticInputData.inputDataType = MonitoringInputDataType.fromString(reader.getString()); - } else if ("preprocessingComponentId".equals(fieldName)) { - deserializedStaticInputData.preprocessingComponentId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedStaticInputData; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java deleted file mode 100644 index cdd87410f6c6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Status.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Update Workspace Quota Status. - * - * Status of update workspace quota. - */ -public final class Status extends ExpandableStringEnum { - /** - * Static value Undefined for Status. - */ - public static final Status UNDEFINED = fromString("Undefined"); - - /** - * Static value Success for Status. - */ - public static final Status SUCCESS = fromString("Success"); - - /** - * Static value Failure for Status. - */ - public static final Status FAILURE = fromString("Failure"); - - /** - * Static value InvalidQuotaBelowClusterMinimum for Status. - */ - public static final Status INVALID_QUOTA_BELOW_CLUSTER_MINIMUM = fromString("InvalidQuotaBelowClusterMinimum"); - - /** - * Static value InvalidQuotaExceedsSubscriptionLimit for Status. - */ - public static final Status INVALID_QUOTA_EXCEEDS_SUBSCRIPTION_LIMIT - = fromString("InvalidQuotaExceedsSubscriptionLimit"); - - /** - * Static value InvalidVMFamilyName for Status. - */ - public static final Status INVALID_VMFAMILY_NAME = fromString("InvalidVMFamilyName"); - - /** - * Static value OperationNotSupportedForSku for Status. - */ - public static final Status OPERATION_NOT_SUPPORTED_FOR_SKU = fromString("OperationNotSupportedForSku"); - - /** - * Static value OperationNotEnabledForRegion for Status. - */ - public static final Status OPERATION_NOT_ENABLED_FOR_REGION = fromString("OperationNotEnabledForRegion"); - - /** - * Creates a new instance of Status value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Status() { - } - - /** - * Creates or finds a Status from its string representation. - * - * @param name a name to look for. - * @return the corresponding Status. - */ - public static Status fromString(String name) { - return fromString(name, Status.class); - } - - /** - * Gets known Status values. - * - * @return known Status values. - */ - public static Collection values() { - return values(Status.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.java deleted file mode 100644 index 4ed799a937cd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Stochastic optimizer for image models. - */ -public final class StochasticOptimizer extends ExpandableStringEnum { - /** - * Static value None for StochasticOptimizer. - */ - public static final StochasticOptimizer NONE = fromString("None"); - - /** - * Static value Sgd for StochasticOptimizer. - */ - public static final StochasticOptimizer SGD = fromString("Sgd"); - - /** - * Static value Adam for StochasticOptimizer. - */ - public static final StochasticOptimizer ADAM = fromString("Adam"); - - /** - * Static value Adamw for StochasticOptimizer. - */ - public static final StochasticOptimizer ADAMW = fromString("Adamw"); - - /** - * Creates a new instance of StochasticOptimizer value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public StochasticOptimizer() { - } - - /** - * Creates or finds a StochasticOptimizer from its string representation. - * - * @param name a name to look for. - * @return the corresponding StochasticOptimizer. - */ - public static StochasticOptimizer fromString(String name) { - return fromString(name, StochasticOptimizer.class); - } - - /** - * Gets known StochasticOptimizer values. - * - * @return known StochasticOptimizer values. - */ - public static Collection values() { - return values(StochasticOptimizer.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.java deleted file mode 100644 index f11d487bb51a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Details of storage account to be used for the Registry. - */ -@Fluent -public final class StorageAccountDetails implements JsonSerializable { - /* - * Details of system created storage account to be used for the registry - */ - private SystemCreatedStorageAccount systemCreatedStorageAccount; - - /* - * Details of user created storage account to be used for the registry - */ - private UserCreatedStorageAccount userCreatedStorageAccount; - - /** - * Creates an instance of StorageAccountDetails class. - */ - public StorageAccountDetails() { - } - - /** - * Get the systemCreatedStorageAccount property: Details of system created storage account to be used for the - * registry. - * - * @return the systemCreatedStorageAccount value. - */ - public SystemCreatedStorageAccount systemCreatedStorageAccount() { - return this.systemCreatedStorageAccount; - } - - /** - * Set the systemCreatedStorageAccount property: Details of system created storage account to be used for the - * registry. - * - * @param systemCreatedStorageAccount the systemCreatedStorageAccount value to set. - * @return the StorageAccountDetails object itself. - */ - public StorageAccountDetails - withSystemCreatedStorageAccount(SystemCreatedStorageAccount systemCreatedStorageAccount) { - this.systemCreatedStorageAccount = systemCreatedStorageAccount; - return this; - } - - /** - * Get the userCreatedStorageAccount property: Details of user created storage account to be used for the registry. - * - * @return the userCreatedStorageAccount value. - */ - public UserCreatedStorageAccount userCreatedStorageAccount() { - return this.userCreatedStorageAccount; - } - - /** - * Set the userCreatedStorageAccount property: Details of user created storage account to be used for the registry. - * - * @param userCreatedStorageAccount the userCreatedStorageAccount value to set. - * @return the StorageAccountDetails object itself. - */ - public StorageAccountDetails withUserCreatedStorageAccount(UserCreatedStorageAccount userCreatedStorageAccount) { - this.userCreatedStorageAccount = userCreatedStorageAccount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (systemCreatedStorageAccount() != null) { - systemCreatedStorageAccount().validate(); - } - if (userCreatedStorageAccount() != null) { - userCreatedStorageAccount().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("systemCreatedStorageAccount", this.systemCreatedStorageAccount); - jsonWriter.writeJsonField("userCreatedStorageAccount", this.userCreatedStorageAccount); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StorageAccountDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StorageAccountDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the StorageAccountDetails. - */ - public static StorageAccountDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StorageAccountDetails deserializedStorageAccountDetails = new StorageAccountDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("systemCreatedStorageAccount".equals(fieldName)) { - deserializedStorageAccountDetails.systemCreatedStorageAccount - = SystemCreatedStorageAccount.fromJson(reader); - } else if ("userCreatedStorageAccount".equals(fieldName)) { - deserializedStorageAccountDetails.userCreatedStorageAccount - = UserCreatedStorageAccount.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedStorageAccountDetails; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountType.java deleted file mode 100644 index ee85b8de4d4a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * type of this storage account. - */ -public final class StorageAccountType extends ExpandableStringEnum { - /** - * Static value Standard_LRS for StorageAccountType. - */ - public static final StorageAccountType STANDARD_LRS = fromString("Standard_LRS"); - - /** - * Static value Premium_LRS for StorageAccountType. - */ - public static final StorageAccountType PREMIUM_LRS = fromString("Premium_LRS"); - - /** - * Creates a new instance of StorageAccountType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public StorageAccountType() { - } - - /** - * Creates or finds a StorageAccountType from its string representation. - * - * @param name a name to look for. - * @return the corresponding StorageAccountType. - */ - public static StorageAccountType fromString(String name) { - return fromString(name, StorageAccountType.class); - } - - /** - * Gets known StorageAccountType values. - * - * @return known StorageAccountType values. - */ - public static Collection values() { - return values(StorageAccountType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJob.java deleted file mode 100644 index b5679fa6f668..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJob.java +++ /dev/null @@ -1,545 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Sweep job definition. - */ -@Fluent -public final class SweepJob extends JobBaseProperties { - /* - * [Required] Specifies the type of job. - */ - private JobType jobType = JobType.SWEEP; - - /* - * [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the - * parameter - */ - private Object searchSpace; - - /* - * [Required] The hyperparameter sampling algorithm - */ - private SamplingAlgorithm samplingAlgorithm; - - /* - * Sweep Job limit. - */ - private SweepJobLimits limits; - - /* - * Early termination policies enable canceling poor-performing runs before they complete - */ - private EarlyTerminationPolicy earlyTermination; - - /* - * [Required] Optimization objective. - */ - private Objective objective; - - /* - * [Required] Trial component definition. - */ - private TrialComponent trial; - - /* - * Mapping of input data bindings used in the job. - */ - private Map inputs; - - /* - * Mapping of output data bindings used in the job. - */ - private Map outputs; - - /* - * Queue settings for the job - */ - private QueueSettings queueSettings; - - /* - * Status of the job. - */ - private JobStatus status; - - /** - * Creates an instance of SweepJob class. - */ - public SweepJob() { - } - - /** - * Get the jobType property: [Required] Specifies the type of job. - * - * @return the jobType value. - */ - @Override - public JobType jobType() { - return this.jobType; - } - - /** - * Get the searchSpace property: [Required] A dictionary containing each parameter and its distribution. The - * dictionary key is the name of the parameter. - * - * @return the searchSpace value. - */ - public Object searchSpace() { - return this.searchSpace; - } - - /** - * Set the searchSpace property: [Required] A dictionary containing each parameter and its distribution. The - * dictionary key is the name of the parameter. - * - * @param searchSpace the searchSpace value to set. - * @return the SweepJob object itself. - */ - public SweepJob withSearchSpace(Object searchSpace) { - this.searchSpace = searchSpace; - return this; - } - - /** - * Get the samplingAlgorithm property: [Required] The hyperparameter sampling algorithm. - * - * @return the samplingAlgorithm value. - */ - public SamplingAlgorithm samplingAlgorithm() { - return this.samplingAlgorithm; - } - - /** - * Set the samplingAlgorithm property: [Required] The hyperparameter sampling algorithm. - * - * @param samplingAlgorithm the samplingAlgorithm value to set. - * @return the SweepJob object itself. - */ - public SweepJob withSamplingAlgorithm(SamplingAlgorithm samplingAlgorithm) { - this.samplingAlgorithm = samplingAlgorithm; - return this; - } - - /** - * Get the limits property: Sweep Job limit. - * - * @return the limits value. - */ - public SweepJobLimits limits() { - return this.limits; - } - - /** - * Set the limits property: Sweep Job limit. - * - * @param limits the limits value to set. - * @return the SweepJob object itself. - */ - public SweepJob withLimits(SweepJobLimits limits) { - this.limits = limits; - return this; - } - - /** - * Get the earlyTermination property: Early termination policies enable canceling poor-performing runs before they - * complete. - * - * @return the earlyTermination value. - */ - public EarlyTerminationPolicy earlyTermination() { - return this.earlyTermination; - } - - /** - * Set the earlyTermination property: Early termination policies enable canceling poor-performing runs before they - * complete. - * - * @param earlyTermination the earlyTermination value to set. - * @return the SweepJob object itself. - */ - public SweepJob withEarlyTermination(EarlyTerminationPolicy earlyTermination) { - this.earlyTermination = earlyTermination; - return this; - } - - /** - * Get the objective property: [Required] Optimization objective. - * - * @return the objective value. - */ - public Objective objective() { - return this.objective; - } - - /** - * Set the objective property: [Required] Optimization objective. - * - * @param objective the objective value to set. - * @return the SweepJob object itself. - */ - public SweepJob withObjective(Objective objective) { - this.objective = objective; - return this; - } - - /** - * Get the trial property: [Required] Trial component definition. - * - * @return the trial value. - */ - public TrialComponent trial() { - return this.trial; - } - - /** - * Set the trial property: [Required] Trial component definition. - * - * @param trial the trial value to set. - * @return the SweepJob object itself. - */ - public SweepJob withTrial(TrialComponent trial) { - this.trial = trial; - return this; - } - - /** - * Get the inputs property: Mapping of input data bindings used in the job. - * - * @return the inputs value. - */ - public Map inputs() { - return this.inputs; - } - - /** - * Set the inputs property: Mapping of input data bindings used in the job. - * - * @param inputs the inputs value to set. - * @return the SweepJob object itself. - */ - public SweepJob withInputs(Map inputs) { - this.inputs = inputs; - return this; - } - - /** - * Get the outputs property: Mapping of output data bindings used in the job. - * - * @return the outputs value. - */ - public Map outputs() { - return this.outputs; - } - - /** - * Set the outputs property: Mapping of output data bindings used in the job. - * - * @param outputs the outputs value to set. - * @return the SweepJob object itself. - */ - public SweepJob withOutputs(Map outputs) { - this.outputs = outputs; - return this; - } - - /** - * Get the queueSettings property: Queue settings for the job. - * - * @return the queueSettings value. - */ - public QueueSettings queueSettings() { - return this.queueSettings; - } - - /** - * Set the queueSettings property: Queue settings for the job. - * - * @param queueSettings the queueSettings value to set. - * @return the SweepJob object itself. - */ - public SweepJob withQueueSettings(QueueSettings queueSettings) { - this.queueSettings = queueSettings; - return this; - } - - /** - * Get the status property: Status of the job. - * - * @return the status value. - */ - @Override - public JobStatus status() { - return this.status; - } - - /** - * {@inheritDoc} - */ - @Override - public SweepJob withDisplayName(String displayName) { - super.withDisplayName(displayName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SweepJob withExperimentName(String experimentName) { - super.withExperimentName(experimentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SweepJob withServices(Map services) { - super.withServices(services); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SweepJob withComputeId(String computeId) { - super.withComputeId(computeId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SweepJob withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SweepJob withIdentity(IdentityConfiguration identity) { - super.withIdentity(identity); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SweepJob withComponentId(String componentId) { - super.withComponentId(componentId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SweepJob withNotificationSetting(NotificationSetting notificationSetting) { - super.withNotificationSetting(notificationSetting); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SweepJob withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SweepJob withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SweepJob withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (searchSpace() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property searchSpace in model SweepJob")); - } - if (samplingAlgorithm() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property samplingAlgorithm in model SweepJob")); - } else { - samplingAlgorithm().validate(); - } - if (limits() != null) { - limits().validate(); - } - if (earlyTermination() != null) { - earlyTermination().validate(); - } - if (objective() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property objective in model SweepJob")); - } else { - objective().validate(); - } - if (trial() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property trial in model SweepJob")); - } else { - trial().validate(); - } - if (inputs() != null) { - inputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (outputs() != null) { - outputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (queueSettings() != null) { - queueSettings().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SweepJob.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("displayName", displayName()); - jsonWriter.writeStringField("experimentName", experimentName()); - jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", computeId()); - jsonWriter.writeBooleanField("isArchived", isArchived()); - jsonWriter.writeJsonField("identity", identity()); - jsonWriter.writeStringField("componentId", componentId()); - jsonWriter.writeJsonField("notificationSetting", notificationSetting()); - jsonWriter.writeUntypedField("searchSpace", this.searchSpace); - jsonWriter.writeJsonField("samplingAlgorithm", this.samplingAlgorithm); - jsonWriter.writeJsonField("objective", this.objective); - jsonWriter.writeJsonField("trial", this.trial); - jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeJsonField("limits", this.limits); - jsonWriter.writeJsonField("earlyTermination", this.earlyTermination); - jsonWriter.writeMapField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("queueSettings", this.queueSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SweepJob from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SweepJob if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SweepJob. - */ - public static SweepJob fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SweepJob deserializedSweepJob = new SweepJob(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedSweepJob.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedSweepJob.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedSweepJob.withProperties(properties); - } else if ("displayName".equals(fieldName)) { - deserializedSweepJob.withDisplayName(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedSweepJob.status = JobStatus.fromString(reader.getString()); - } else if ("experimentName".equals(fieldName)) { - deserializedSweepJob.withExperimentName(reader.getString()); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedSweepJob.withServices(services); - } else if ("computeId".equals(fieldName)) { - deserializedSweepJob.withComputeId(reader.getString()); - } else if ("isArchived".equals(fieldName)) { - deserializedSweepJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("identity".equals(fieldName)) { - deserializedSweepJob.withIdentity(IdentityConfiguration.fromJson(reader)); - } else if ("componentId".equals(fieldName)) { - deserializedSweepJob.withComponentId(reader.getString()); - } else if ("notificationSetting".equals(fieldName)) { - deserializedSweepJob.withNotificationSetting(NotificationSetting.fromJson(reader)); - } else if ("searchSpace".equals(fieldName)) { - deserializedSweepJob.searchSpace = reader.readUntyped(); - } else if ("samplingAlgorithm".equals(fieldName)) { - deserializedSweepJob.samplingAlgorithm = SamplingAlgorithm.fromJson(reader); - } else if ("objective".equals(fieldName)) { - deserializedSweepJob.objective = Objective.fromJson(reader); - } else if ("trial".equals(fieldName)) { - deserializedSweepJob.trial = TrialComponent.fromJson(reader); - } else if ("jobType".equals(fieldName)) { - deserializedSweepJob.jobType = JobType.fromString(reader.getString()); - } else if ("limits".equals(fieldName)) { - deserializedSweepJob.limits = SweepJobLimits.fromJson(reader); - } else if ("earlyTermination".equals(fieldName)) { - deserializedSweepJob.earlyTermination = EarlyTerminationPolicy.fromJson(reader); - } else if ("inputs".equals(fieldName)) { - Map inputs = reader.readMap(reader1 -> JobInput.fromJson(reader1)); - deserializedSweepJob.inputs = inputs; - } else if ("outputs".equals(fieldName)) { - Map outputs = reader.readMap(reader1 -> JobOutput.fromJson(reader1)); - deserializedSweepJob.outputs = outputs; - } else if ("queueSettings".equals(fieldName)) { - deserializedSweepJob.queueSettings = QueueSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSweepJob; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.java deleted file mode 100644 index 1262136044f3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; - -/** - * Sweep Job limit class. - */ -@Fluent -public final class SweepJobLimits extends JobLimits { - /* - * [Required] JobLimit type. - */ - private JobLimitsType jobLimitsType = JobLimitsType.SWEEP; - - /* - * Sweep Job max total trials. - */ - private Integer maxTotalTrials; - - /* - * Sweep Job max concurrent trials. - */ - private Integer maxConcurrentTrials; - - /* - * Sweep Job Trial timeout value. - */ - private Duration trialTimeout; - - /** - * Creates an instance of SweepJobLimits class. - */ - public SweepJobLimits() { - } - - /** - * Get the jobLimitsType property: [Required] JobLimit type. - * - * @return the jobLimitsType value. - */ - @Override - public JobLimitsType jobLimitsType() { - return this.jobLimitsType; - } - - /** - * Get the maxTotalTrials property: Sweep Job max total trials. - * - * @return the maxTotalTrials value. - */ - public Integer maxTotalTrials() { - return this.maxTotalTrials; - } - - /** - * Set the maxTotalTrials property: Sweep Job max total trials. - * - * @param maxTotalTrials the maxTotalTrials value to set. - * @return the SweepJobLimits object itself. - */ - public SweepJobLimits withMaxTotalTrials(Integer maxTotalTrials) { - this.maxTotalTrials = maxTotalTrials; - return this; - } - - /** - * Get the maxConcurrentTrials property: Sweep Job max concurrent trials. - * - * @return the maxConcurrentTrials value. - */ - public Integer maxConcurrentTrials() { - return this.maxConcurrentTrials; - } - - /** - * Set the maxConcurrentTrials property: Sweep Job max concurrent trials. - * - * @param maxConcurrentTrials the maxConcurrentTrials value to set. - * @return the SweepJobLimits object itself. - */ - public SweepJobLimits withMaxConcurrentTrials(Integer maxConcurrentTrials) { - this.maxConcurrentTrials = maxConcurrentTrials; - return this; - } - - /** - * Get the trialTimeout property: Sweep Job Trial timeout value. - * - * @return the trialTimeout value. - */ - public Duration trialTimeout() { - return this.trialTimeout; - } - - /** - * Set the trialTimeout property: Sweep Job Trial timeout value. - * - * @param trialTimeout the trialTimeout value to set. - * @return the SweepJobLimits object itself. - */ - public SweepJobLimits withTrialTimeout(Duration trialTimeout) { - this.trialTimeout = trialTimeout; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SweepJobLimits withTimeout(Duration timeout) { - super.withTimeout(timeout); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("timeout", CoreUtils.durationToStringWithDays(timeout())); - jsonWriter.writeStringField("jobLimitsType", this.jobLimitsType == null ? null : this.jobLimitsType.toString()); - jsonWriter.writeNumberField("maxTotalTrials", this.maxTotalTrials); - jsonWriter.writeNumberField("maxConcurrentTrials", this.maxConcurrentTrials); - jsonWriter.writeStringField("trialTimeout", CoreUtils.durationToStringWithDays(this.trialTimeout)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SweepJobLimits from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SweepJobLimits if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SweepJobLimits. - */ - public static SweepJobLimits fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SweepJobLimits deserializedSweepJobLimits = new SweepJobLimits(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("timeout".equals(fieldName)) { - deserializedSweepJobLimits - .withTimeout(reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()))); - } else if ("jobLimitsType".equals(fieldName)) { - deserializedSweepJobLimits.jobLimitsType = JobLimitsType.fromString(reader.getString()); - } else if ("maxTotalTrials".equals(fieldName)) { - deserializedSweepJobLimits.maxTotalTrials = reader.getNullable(JsonReader::getInt); - } else if ("maxConcurrentTrials".equals(fieldName)) { - deserializedSweepJobLimits.maxConcurrentTrials = reader.getNullable(JsonReader::getInt); - } else if ("trialTimeout".equals(fieldName)) { - deserializedSweepJobLimits.trialTimeout - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedSweepJobLimits; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java deleted file mode 100644 index 3a00e4eb5ea8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * A SynapseSpark compute. - */ -@Fluent -public final class SynapseSpark extends Compute { - /* - * The type of compute - */ - private ComputeType computeType = ComputeType.SYNAPSE_SPARK; - - /* - * The properties property. - */ - private SynapseSparkProperties properties; - - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - - /** - * Creates an instance of SynapseSpark class. - */ - public SynapseSpark() { - } - - /** - * Get the computeType property: The type of compute. - * - * @return the computeType value. - */ - @Override - public ComputeType computeType() { - return this.computeType; - } - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public SynapseSparkProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the SynapseSpark object itself. - */ - public SynapseSpark withProperties(SynapseSparkProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - - /** - * {@inheritDoc} - */ - @Override - public SynapseSpark withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SynapseSpark withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SynapseSpark withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SynapseSpark withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeLocation", computeLocation()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("resourceId", resourceId()); - jsonWriter.writeBooleanField("disableLocalAuth", disableLocalAuth()); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SynapseSpark from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SynapseSpark if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SynapseSpark. - */ - public static SynapseSpark fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SynapseSpark deserializedSynapseSpark = new SynapseSpark(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeLocation".equals(fieldName)) { - deserializedSynapseSpark.withComputeLocation(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedSynapseSpark.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedSynapseSpark.withDescription(reader.getString()); - } else if ("createdOn".equals(fieldName)) { - deserializedSynapseSpark.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("modifiedOn".equals(fieldName)) { - deserializedSynapseSpark.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("resourceId".equals(fieldName)) { - deserializedSynapseSpark.withResourceId(reader.getString()); - } else if ("provisioningErrors".equals(fieldName)) { - List provisioningErrors - = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedSynapseSpark.provisioningErrors = provisioningErrors; - } else if ("isAttachedCompute".equals(fieldName)) { - deserializedSynapseSpark.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); - } else if ("disableLocalAuth".equals(fieldName)) { - deserializedSynapseSpark.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); - } else if ("computeType".equals(fieldName)) { - deserializedSynapseSpark.computeType = ComputeType.fromString(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedSynapseSpark.properties = SynapseSparkProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSynapseSpark; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.java deleted file mode 100644 index a473862a14a4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The SynapseSparkProperties model. - */ -@Fluent -public final class SynapseSparkProperties implements JsonSerializable { - /* - * Auto scale properties. - */ - private AutoScaleProperties autoScaleProperties; - - /* - * Auto pause properties. - */ - private AutoPauseProperties autoPauseProperties; - - /* - * Spark version. - */ - private String sparkVersion; - - /* - * The number of compute nodes currently assigned to the compute. - */ - private Integer nodeCount; - - /* - * Node size. - */ - private String nodeSize; - - /* - * Node size family. - */ - private String nodeSizeFamily; - - /* - * Azure subscription identifier. - */ - private String subscriptionId; - - /* - * Name of the resource group in which workspace is located. - */ - private String resourceGroup; - - /* - * Name of Azure Machine Learning workspace. - */ - private String workspaceName; - - /* - * Pool name. - */ - private String poolName; - - /** - * Creates an instance of SynapseSparkProperties class. - */ - public SynapseSparkProperties() { - } - - /** - * Get the autoScaleProperties property: Auto scale properties. - * - * @return the autoScaleProperties value. - */ - public AutoScaleProperties autoScaleProperties() { - return this.autoScaleProperties; - } - - /** - * Set the autoScaleProperties property: Auto scale properties. - * - * @param autoScaleProperties the autoScaleProperties value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withAutoScaleProperties(AutoScaleProperties autoScaleProperties) { - this.autoScaleProperties = autoScaleProperties; - return this; - } - - /** - * Get the autoPauseProperties property: Auto pause properties. - * - * @return the autoPauseProperties value. - */ - public AutoPauseProperties autoPauseProperties() { - return this.autoPauseProperties; - } - - /** - * Set the autoPauseProperties property: Auto pause properties. - * - * @param autoPauseProperties the autoPauseProperties value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withAutoPauseProperties(AutoPauseProperties autoPauseProperties) { - this.autoPauseProperties = autoPauseProperties; - return this; - } - - /** - * Get the sparkVersion property: Spark version. - * - * @return the sparkVersion value. - */ - public String sparkVersion() { - return this.sparkVersion; - } - - /** - * Set the sparkVersion property: Spark version. - * - * @param sparkVersion the sparkVersion value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withSparkVersion(String sparkVersion) { - this.sparkVersion = sparkVersion; - return this; - } - - /** - * Get the nodeCount property: The number of compute nodes currently assigned to the compute. - * - * @return the nodeCount value. - */ - public Integer nodeCount() { - return this.nodeCount; - } - - /** - * Set the nodeCount property: The number of compute nodes currently assigned to the compute. - * - * @param nodeCount the nodeCount value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withNodeCount(Integer nodeCount) { - this.nodeCount = nodeCount; - return this; - } - - /** - * Get the nodeSize property: Node size. - * - * @return the nodeSize value. - */ - public String nodeSize() { - return this.nodeSize; - } - - /** - * Set the nodeSize property: Node size. - * - * @param nodeSize the nodeSize value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withNodeSize(String nodeSize) { - this.nodeSize = nodeSize; - return this; - } - - /** - * Get the nodeSizeFamily property: Node size family. - * - * @return the nodeSizeFamily value. - */ - public String nodeSizeFamily() { - return this.nodeSizeFamily; - } - - /** - * Set the nodeSizeFamily property: Node size family. - * - * @param nodeSizeFamily the nodeSizeFamily value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withNodeSizeFamily(String nodeSizeFamily) { - this.nodeSizeFamily = nodeSizeFamily; - return this; - } - - /** - * Get the subscriptionId property: Azure subscription identifier. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure subscription identifier. - * - * @param subscriptionId the subscriptionId value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the resourceGroup property: Name of the resource group in which workspace is located. - * - * @return the resourceGroup value. - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup property: Name of the resource group in which workspace is located. - * - * @param resourceGroup the resourceGroup value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - return this; - } - - /** - * Get the workspaceName property: Name of Azure Machine Learning workspace. - * - * @return the workspaceName value. - */ - public String workspaceName() { - return this.workspaceName; - } - - /** - * Set the workspaceName property: Name of Azure Machine Learning workspace. - * - * @param workspaceName the workspaceName value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withWorkspaceName(String workspaceName) { - this.workspaceName = workspaceName; - return this; - } - - /** - * Get the poolName property: Pool name. - * - * @return the poolName value. - */ - public String poolName() { - return this.poolName; - } - - /** - * Set the poolName property: Pool name. - * - * @param poolName the poolName value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withPoolName(String poolName) { - this.poolName = poolName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (autoScaleProperties() != null) { - autoScaleProperties().validate(); - } - if (autoPauseProperties() != null) { - autoPauseProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("autoScaleProperties", this.autoScaleProperties); - jsonWriter.writeJsonField("autoPauseProperties", this.autoPauseProperties); - jsonWriter.writeStringField("sparkVersion", this.sparkVersion); - jsonWriter.writeNumberField("nodeCount", this.nodeCount); - jsonWriter.writeStringField("nodeSize", this.nodeSize); - jsonWriter.writeStringField("nodeSizeFamily", this.nodeSizeFamily); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - jsonWriter.writeStringField("resourceGroup", this.resourceGroup); - jsonWriter.writeStringField("workspaceName", this.workspaceName); - jsonWriter.writeStringField("poolName", this.poolName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SynapseSparkProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SynapseSparkProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the SynapseSparkProperties. - */ - public static SynapseSparkProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SynapseSparkProperties deserializedSynapseSparkProperties = new SynapseSparkProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("autoScaleProperties".equals(fieldName)) { - deserializedSynapseSparkProperties.autoScaleProperties = AutoScaleProperties.fromJson(reader); - } else if ("autoPauseProperties".equals(fieldName)) { - deserializedSynapseSparkProperties.autoPauseProperties = AutoPauseProperties.fromJson(reader); - } else if ("sparkVersion".equals(fieldName)) { - deserializedSynapseSparkProperties.sparkVersion = reader.getString(); - } else if ("nodeCount".equals(fieldName)) { - deserializedSynapseSparkProperties.nodeCount = reader.getNullable(JsonReader::getInt); - } else if ("nodeSize".equals(fieldName)) { - deserializedSynapseSparkProperties.nodeSize = reader.getString(); - } else if ("nodeSizeFamily".equals(fieldName)) { - deserializedSynapseSparkProperties.nodeSizeFamily = reader.getString(); - } else if ("subscriptionId".equals(fieldName)) { - deserializedSynapseSparkProperties.subscriptionId = reader.getString(); - } else if ("resourceGroup".equals(fieldName)) { - deserializedSynapseSparkProperties.resourceGroup = reader.getString(); - } else if ("workspaceName".equals(fieldName)) { - deserializedSynapseSparkProperties.workspaceName = reader.getString(); - } else if ("poolName".equals(fieldName)) { - deserializedSynapseSparkProperties.poolName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSynapseSparkProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.java deleted file mode 100644 index 1bbd63d0359d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The SystemCreatedAcrAccount model. - */ -@Fluent -public final class SystemCreatedAcrAccount implements JsonSerializable { - /* - * Name of the ACR account - */ - private String acrAccountName; - - /* - * SKU of the ACR account - */ - private String acrAccountSku; - - /* - * This is populated once the ACR account is created. - */ - private ArmResourceId armResourceId; - - /** - * Creates an instance of SystemCreatedAcrAccount class. - */ - public SystemCreatedAcrAccount() { - } - - /** - * Get the acrAccountName property: Name of the ACR account. - * - * @return the acrAccountName value. - */ - public String acrAccountName() { - return this.acrAccountName; - } - - /** - * Set the acrAccountName property: Name of the ACR account. - * - * @param acrAccountName the acrAccountName value to set. - * @return the SystemCreatedAcrAccount object itself. - */ - public SystemCreatedAcrAccount withAcrAccountName(String acrAccountName) { - this.acrAccountName = acrAccountName; - return this; - } - - /** - * Get the acrAccountSku property: SKU of the ACR account. - * - * @return the acrAccountSku value. - */ - public String acrAccountSku() { - return this.acrAccountSku; - } - - /** - * Set the acrAccountSku property: SKU of the ACR account. - * - * @param acrAccountSku the acrAccountSku value to set. - * @return the SystemCreatedAcrAccount object itself. - */ - public SystemCreatedAcrAccount withAcrAccountSku(String acrAccountSku) { - this.acrAccountSku = acrAccountSku; - return this; - } - - /** - * Get the armResourceId property: This is populated once the ACR account is created. - * - * @return the armResourceId value. - */ - public ArmResourceId armResourceId() { - return this.armResourceId; - } - - /** - * Set the armResourceId property: This is populated once the ACR account is created. - * - * @param armResourceId the armResourceId value to set. - * @return the SystemCreatedAcrAccount object itself. - */ - public SystemCreatedAcrAccount withArmResourceId(ArmResourceId armResourceId) { - this.armResourceId = armResourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (armResourceId() != null) { - armResourceId().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("acrAccountName", this.acrAccountName); - jsonWriter.writeStringField("acrAccountSku", this.acrAccountSku); - jsonWriter.writeJsonField("armResourceId", this.armResourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SystemCreatedAcrAccount from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SystemCreatedAcrAccount if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the SystemCreatedAcrAccount. - */ - public static SystemCreatedAcrAccount fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SystemCreatedAcrAccount deserializedSystemCreatedAcrAccount = new SystemCreatedAcrAccount(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("acrAccountName".equals(fieldName)) { - deserializedSystemCreatedAcrAccount.acrAccountName = reader.getString(); - } else if ("acrAccountSku".equals(fieldName)) { - deserializedSystemCreatedAcrAccount.acrAccountSku = reader.getString(); - } else if ("armResourceId".equals(fieldName)) { - deserializedSystemCreatedAcrAccount.armResourceId = ArmResourceId.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSystemCreatedAcrAccount; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java deleted file mode 100644 index 67a7acf2c955..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The SystemCreatedStorageAccount model. - */ -@Fluent -public final class SystemCreatedStorageAccount implements JsonSerializable { - /* - * Public blob access allowed - */ - private Boolean allowBlobPublicAccess; - - /* - * This is populated once the storage account is created. - */ - private ArmResourceId armResourceId; - - /* - * HNS enabled for storage account - */ - private Boolean storageAccountHnsEnabled; - - /* - * Name of the storage account - */ - private String storageAccountName; - - /* - * Allowed values: - * "Standard_LRS", - * "Standard_GRS", - * "Standard_RAGRS", - * "Standard_ZRS", - * "Standard_GZRS", - * "Standard_RAGZRS", - * "Premium_LRS", - * "Premium_ZRS" - */ - private String storageAccountType; - - /** - * Creates an instance of SystemCreatedStorageAccount class. - */ - public SystemCreatedStorageAccount() { - } - - /** - * Get the allowBlobPublicAccess property: Public blob access allowed. - * - * @return the allowBlobPublicAccess value. - */ - public Boolean allowBlobPublicAccess() { - return this.allowBlobPublicAccess; - } - - /** - * Set the allowBlobPublicAccess property: Public blob access allowed. - * - * @param allowBlobPublicAccess the allowBlobPublicAccess value to set. - * @return the SystemCreatedStorageAccount object itself. - */ - public SystemCreatedStorageAccount withAllowBlobPublicAccess(Boolean allowBlobPublicAccess) { - this.allowBlobPublicAccess = allowBlobPublicAccess; - return this; - } - - /** - * Get the armResourceId property: This is populated once the storage account is created. - * - * @return the armResourceId value. - */ - public ArmResourceId armResourceId() { - return this.armResourceId; - } - - /** - * Set the armResourceId property: This is populated once the storage account is created. - * - * @param armResourceId the armResourceId value to set. - * @return the SystemCreatedStorageAccount object itself. - */ - public SystemCreatedStorageAccount withArmResourceId(ArmResourceId armResourceId) { - this.armResourceId = armResourceId; - return this; - } - - /** - * Get the storageAccountHnsEnabled property: HNS enabled for storage account. - * - * @return the storageAccountHnsEnabled value. - */ - public Boolean storageAccountHnsEnabled() { - return this.storageAccountHnsEnabled; - } - - /** - * Set the storageAccountHnsEnabled property: HNS enabled for storage account. - * - * @param storageAccountHnsEnabled the storageAccountHnsEnabled value to set. - * @return the SystemCreatedStorageAccount object itself. - */ - public SystemCreatedStorageAccount withStorageAccountHnsEnabled(Boolean storageAccountHnsEnabled) { - this.storageAccountHnsEnabled = storageAccountHnsEnabled; - return this; - } - - /** - * Get the storageAccountName property: Name of the storage account. - * - * @return the storageAccountName value. - */ - public String storageAccountName() { - return this.storageAccountName; - } - - /** - * Set the storageAccountName property: Name of the storage account. - * - * @param storageAccountName the storageAccountName value to set. - * @return the SystemCreatedStorageAccount object itself. - */ - public SystemCreatedStorageAccount withStorageAccountName(String storageAccountName) { - this.storageAccountName = storageAccountName; - return this; - } - - /** - * Get the storageAccountType property: Allowed values: - * "Standard_LRS", - * "Standard_GRS", - * "Standard_RAGRS", - * "Standard_ZRS", - * "Standard_GZRS", - * "Standard_RAGZRS", - * "Premium_LRS", - * "Premium_ZRS". - * - * @return the storageAccountType value. - */ - public String storageAccountType() { - return this.storageAccountType; - } - - /** - * Set the storageAccountType property: Allowed values: - * "Standard_LRS", - * "Standard_GRS", - * "Standard_RAGRS", - * "Standard_ZRS", - * "Standard_GZRS", - * "Standard_RAGZRS", - * "Premium_LRS", - * "Premium_ZRS". - * - * @param storageAccountType the storageAccountType value to set. - * @return the SystemCreatedStorageAccount object itself. - */ - public SystemCreatedStorageAccount withStorageAccountType(String storageAccountType) { - this.storageAccountType = storageAccountType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (armResourceId() != null) { - armResourceId().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("allowBlobPublicAccess", this.allowBlobPublicAccess); - jsonWriter.writeJsonField("armResourceId", this.armResourceId); - jsonWriter.writeBooleanField("storageAccountHnsEnabled", this.storageAccountHnsEnabled); - jsonWriter.writeStringField("storageAccountName", this.storageAccountName); - jsonWriter.writeStringField("storageAccountType", this.storageAccountType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SystemCreatedStorageAccount from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SystemCreatedStorageAccount if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SystemCreatedStorageAccount. - */ - public static SystemCreatedStorageAccount fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SystemCreatedStorageAccount deserializedSystemCreatedStorageAccount = new SystemCreatedStorageAccount(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("allowBlobPublicAccess".equals(fieldName)) { - deserializedSystemCreatedStorageAccount.allowBlobPublicAccess - = reader.getNullable(JsonReader::getBoolean); - } else if ("armResourceId".equals(fieldName)) { - deserializedSystemCreatedStorageAccount.armResourceId = ArmResourceId.fromJson(reader); - } else if ("storageAccountHnsEnabled".equals(fieldName)) { - deserializedSystemCreatedStorageAccount.storageAccountHnsEnabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("storageAccountName".equals(fieldName)) { - deserializedSystemCreatedStorageAccount.storageAccountName = reader.getString(); - } else if ("storageAccountType".equals(fieldName)) { - deserializedSystemCreatedStorageAccount.storageAccountType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSystemCreatedStorageAccount; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.java deleted file mode 100644 index 0ebdb9798ed7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A system service running on a compute. - */ -@Immutable -public final class SystemService implements JsonSerializable { - /* - * The type of this system service. - */ - private String systemServiceType; - - /* - * Public IP address - */ - private String publicIpAddress; - - /* - * The version for this type. - */ - private String version; - - /** - * Creates an instance of SystemService class. - */ - public SystemService() { - } - - /** - * Get the systemServiceType property: The type of this system service. - * - * @return the systemServiceType value. - */ - public String systemServiceType() { - return this.systemServiceType; - } - - /** - * Get the publicIpAddress property: Public IP address. - * - * @return the publicIpAddress value. - */ - public String publicIpAddress() { - return this.publicIpAddress; - } - - /** - * Get the version property: The version for this type. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SystemService from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SystemService if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SystemService. - */ - public static SystemService fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SystemService deserializedSystemService = new SystemService(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("systemServiceType".equals(fieldName)) { - deserializedSystemService.systemServiceType = reader.getString(); - } else if ("publicIpAddress".equals(fieldName)) { - deserializedSystemService.publicIpAddress = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedSystemService.version = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSystemService; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVertical.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVertical.java deleted file mode 100644 index c7db2ecc7ce5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVertical.java +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Abstract class for AutoML tasks that use table dataset as input - such as Classification/Regression/Forecasting. - */ -@Fluent -public class TableVertical implements JsonSerializable { - /* - * Execution constraints for AutoMLJob. - */ - private TableVerticalLimitSettings limitSettings; - - /* - * Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - */ - private NCrossValidations nCrossValidations; - - /* - * Columns to use for CVSplit data. - */ - private List cvSplitColumnNames; - - /* - * The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the - * data to be weighted up or down. - */ - private String weightColumnName; - - /* - * Validation data inputs. - */ - private MLTableJobInput validationData; - - /* - * Test data input. - */ - private MLTableJobInput testData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - private Double validationDataSize; - - /* - * The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - private Double testDataSize; - - /* - * Featurization inputs needed for AutoML job. - */ - private TableVerticalFeaturizationSettings featurizationSettings; - - /** - * Creates an instance of TableVertical class. - */ - public TableVertical() { - } - - /** - * Get the limitSettings property: Execution constraints for AutoMLJob. - * - * @return the limitSettings value. - */ - public TableVerticalLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: Execution constraints for AutoMLJob. - * - * @param limitSettings the limitSettings value to set. - * @return the TableVertical object itself. - */ - public TableVertical withLimitSettings(TableVerticalLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - * - * @return the nCrossValidations value. - */ - public NCrossValidations nCrossValidations() { - return this.nCrossValidations; - } - - /** - * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - * - * @param nCrossValidations the nCrossValidations value to set. - * @return the TableVertical object itself. - */ - public TableVertical withNCrossValidations(NCrossValidations nCrossValidations) { - this.nCrossValidations = nCrossValidations; - return this; - } - - /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @return the cvSplitColumnNames value. - */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; - } - - /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. - * @return the TableVertical object itself. - */ - public TableVertical withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; - return this; - } - - /** - * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @return the weightColumnName value. - */ - public String weightColumnName() { - return this.weightColumnName; - } - - /** - * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @param weightColumnName the weightColumnName value to set. - * @return the TableVertical object itself. - */ - public TableVertical withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the TableVertical object itself. - */ - public TableVertical withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public MLTableJobInput testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the TableVertical object itself. - */ - public TableVertical withTestData(MLTableJobInput testData) { - this.testData = testData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the TableVertical object itself. - */ - public TableVertical withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @return the testDataSize value. - */ - public Double testDataSize() { - return this.testDataSize; - } - - /** - * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @param testDataSize the testDataSize value to set. - * @return the TableVertical object itself. - */ - public TableVertical withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; - return this; - } - - /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @return the featurizationSettings value. - */ - public TableVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; - } - - /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @param featurizationSettings the featurizationSettings value to set. - * @return the TableVertical object itself. - */ - public TableVertical withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (limitSettings() != null) { - limitSettings().validate(); - } - if (nCrossValidations() != null) { - nCrossValidations().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - if (testData() != null) { - testData().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); - jsonWriter.writeArrayField("cvSplitColumnNames", this.cvSplitColumnNames, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("weightColumnName", this.weightColumnName); - jsonWriter.writeJsonField("validationData", this.validationData); - jsonWriter.writeJsonField("testData", this.testData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); - jsonWriter.writeNumberField("testDataSize", this.testDataSize); - jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TableVertical from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TableVertical if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the TableVertical. - */ - public static TableVertical fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TableVertical deserializedTableVertical = new TableVertical(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("limitSettings".equals(fieldName)) { - deserializedTableVertical.limitSettings = TableVerticalLimitSettings.fromJson(reader); - } else if ("nCrossValidations".equals(fieldName)) { - deserializedTableVertical.nCrossValidations = NCrossValidations.fromJson(reader); - } else if ("cvSplitColumnNames".equals(fieldName)) { - List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); - deserializedTableVertical.cvSplitColumnNames = cvSplitColumnNames; - } else if ("weightColumnName".equals(fieldName)) { - deserializedTableVertical.weightColumnName = reader.getString(); - } else if ("validationData".equals(fieldName)) { - deserializedTableVertical.validationData = MLTableJobInput.fromJson(reader); - } else if ("testData".equals(fieldName)) { - deserializedTableVertical.testData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedTableVertical.validationDataSize = reader.getNullable(JsonReader::getDouble); - } else if ("testDataSize".equals(fieldName)) { - deserializedTableVertical.testDataSize = reader.getNullable(JsonReader::getDouble); - } else if ("featurizationSettings".equals(fieldName)) { - deserializedTableVertical.featurizationSettings - = TableVerticalFeaturizationSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTableVertical; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.java deleted file mode 100644 index e7a2cab26bd6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.java +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Featurization Configuration. - */ -@Fluent -public final class TableVerticalFeaturizationSettings extends FeaturizationSettings { - /* - * Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of necessary transformation - * of the data in featurization phase. - * If 'Off' is selected then no featurization is done. - * If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. - */ - private FeaturizationMode mode; - - /* - * These transformers shall not be used in featurization. - */ - private List blockedTransformers; - - /* - * Dictionary of column name and its type (int, float, string, datetime etc). - */ - private Map columnNameAndTypes; - - /* - * User can specify additional transformers to be used along with the columns to which it would be applied and - * parameters for the transformer constructor. - */ - private Map> transformerParams; - - /* - * Determines whether to use Dnn based featurizers for data featurization. - */ - private Boolean enableDnnFeaturization; - - /** - * Creates an instance of TableVerticalFeaturizationSettings class. - */ - public TableVerticalFeaturizationSettings() { - } - - /** - * Get the mode property: Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of - * necessary transformation of the data in featurization phase. - * If 'Off' is selected then no featurization is done. - * If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. - * - * @return the mode value. - */ - public FeaturizationMode mode() { - return this.mode; - } - - /** - * Set the mode property: Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of - * necessary transformation of the data in featurization phase. - * If 'Off' is selected then no featurization is done. - * If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. - * - * @param mode the mode value to set. - * @return the TableVerticalFeaturizationSettings object itself. - */ - public TableVerticalFeaturizationSettings withMode(FeaturizationMode mode) { - this.mode = mode; - return this; - } - - /** - * Get the blockedTransformers property: These transformers shall not be used in featurization. - * - * @return the blockedTransformers value. - */ - public List blockedTransformers() { - return this.blockedTransformers; - } - - /** - * Set the blockedTransformers property: These transformers shall not be used in featurization. - * - * @param blockedTransformers the blockedTransformers value to set. - * @return the TableVerticalFeaturizationSettings object itself. - */ - public TableVerticalFeaturizationSettings withBlockedTransformers(List blockedTransformers) { - this.blockedTransformers = blockedTransformers; - return this; - } - - /** - * Get the columnNameAndTypes property: Dictionary of column name and its type (int, float, string, datetime etc). - * - * @return the columnNameAndTypes value. - */ - public Map columnNameAndTypes() { - return this.columnNameAndTypes; - } - - /** - * Set the columnNameAndTypes property: Dictionary of column name and its type (int, float, string, datetime etc). - * - * @param columnNameAndTypes the columnNameAndTypes value to set. - * @return the TableVerticalFeaturizationSettings object itself. - */ - public TableVerticalFeaturizationSettings withColumnNameAndTypes(Map columnNameAndTypes) { - this.columnNameAndTypes = columnNameAndTypes; - return this; - } - - /** - * Get the transformerParams property: User can specify additional transformers to be used along with the columns to - * which it would be applied and parameters for the transformer constructor. - * - * @return the transformerParams value. - */ - public Map> transformerParams() { - return this.transformerParams; - } - - /** - * Set the transformerParams property: User can specify additional transformers to be used along with the columns to - * which it would be applied and parameters for the transformer constructor. - * - * @param transformerParams the transformerParams value to set. - * @return the TableVerticalFeaturizationSettings object itself. - */ - public TableVerticalFeaturizationSettings - withTransformerParams(Map> transformerParams) { - this.transformerParams = transformerParams; - return this; - } - - /** - * Get the enableDnnFeaturization property: Determines whether to use Dnn based featurizers for data featurization. - * - * @return the enableDnnFeaturization value. - */ - public Boolean enableDnnFeaturization() { - return this.enableDnnFeaturization; - } - - /** - * Set the enableDnnFeaturization property: Determines whether to use Dnn based featurizers for data featurization. - * - * @param enableDnnFeaturization the enableDnnFeaturization value to set. - * @return the TableVerticalFeaturizationSettings object itself. - */ - public TableVerticalFeaturizationSettings withEnableDnnFeaturization(Boolean enableDnnFeaturization) { - this.enableDnnFeaturization = enableDnnFeaturization; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TableVerticalFeaturizationSettings withDatasetLanguage(String datasetLanguage) { - super.withDatasetLanguage(datasetLanguage); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (transformerParams() != null) { - transformerParams().values().forEach(e -> { - if (e != null) { - e.forEach(e1 -> e1.validate()); - } - }); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("datasetLanguage", datasetLanguage()); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - jsonWriter.writeArrayField("blockedTransformers", this.blockedTransformers, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeMapField("columnNameAndTypes", this.columnNameAndTypes, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("transformerParams", this.transformerParams, - (writer, element) -> writer.writeArray(element, (writer1, element1) -> writer1.writeJson(element1))); - jsonWriter.writeBooleanField("enableDnnFeaturization", this.enableDnnFeaturization); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TableVerticalFeaturizationSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TableVerticalFeaturizationSettings if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TableVerticalFeaturizationSettings. - */ - public static TableVerticalFeaturizationSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TableVerticalFeaturizationSettings deserializedTableVerticalFeaturizationSettings - = new TableVerticalFeaturizationSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("datasetLanguage".equals(fieldName)) { - deserializedTableVerticalFeaturizationSettings.withDatasetLanguage(reader.getString()); - } else if ("mode".equals(fieldName)) { - deserializedTableVerticalFeaturizationSettings.mode - = FeaturizationMode.fromString(reader.getString()); - } else if ("blockedTransformers".equals(fieldName)) { - List blockedTransformers - = reader.readArray(reader1 -> BlockedTransformers.fromString(reader1.getString())); - deserializedTableVerticalFeaturizationSettings.blockedTransformers = blockedTransformers; - } else if ("columnNameAndTypes".equals(fieldName)) { - Map columnNameAndTypes = reader.readMap(reader1 -> reader1.getString()); - deserializedTableVerticalFeaturizationSettings.columnNameAndTypes = columnNameAndTypes; - } else if ("transformerParams".equals(fieldName)) { - Map> transformerParams - = reader.readMap(reader1 -> reader1.readArray(reader2 -> ColumnTransformer.fromJson(reader2))); - deserializedTableVerticalFeaturizationSettings.transformerParams = transformerParams; - } else if ("enableDnnFeaturization".equals(fieldName)) { - deserializedTableVerticalFeaturizationSettings.enableDnnFeaturization - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedTableVerticalFeaturizationSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalLimitSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalLimitSettings.java deleted file mode 100644 index 16b8c9d6cce3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalLimitSettings.java +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; - -/** - * Job execution constraints. - */ -@Fluent -public final class TableVerticalLimitSettings implements JsonSerializable { - /* - * Number of iterations. - */ - private Integer maxTrials; - - /* - * Iteration timeout. - */ - private Duration trialTimeout; - - /* - * AutoML job timeout. - */ - private Duration timeout; - - /* - * Maximum Concurrent iterations. - */ - private Integer maxConcurrentTrials; - - /* - * Max cores per iteration. - */ - private Integer maxCoresPerTrial; - - /* - * Exit score for the AutoML job. - */ - private Double exitScore; - - /* - * Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score - * improvement in last 20 iterations. - */ - private Boolean enableEarlyTermination; - - /** - * Creates an instance of TableVerticalLimitSettings class. - */ - public TableVerticalLimitSettings() { - } - - /** - * Get the maxTrials property: Number of iterations. - * - * @return the maxTrials value. - */ - public Integer maxTrials() { - return this.maxTrials; - } - - /** - * Set the maxTrials property: Number of iterations. - * - * @param maxTrials the maxTrials value to set. - * @return the TableVerticalLimitSettings object itself. - */ - public TableVerticalLimitSettings withMaxTrials(Integer maxTrials) { - this.maxTrials = maxTrials; - return this; - } - - /** - * Get the trialTimeout property: Iteration timeout. - * - * @return the trialTimeout value. - */ - public Duration trialTimeout() { - return this.trialTimeout; - } - - /** - * Set the trialTimeout property: Iteration timeout. - * - * @param trialTimeout the trialTimeout value to set. - * @return the TableVerticalLimitSettings object itself. - */ - public TableVerticalLimitSettings withTrialTimeout(Duration trialTimeout) { - this.trialTimeout = trialTimeout; - return this; - } - - /** - * Get the timeout property: AutoML job timeout. - * - * @return the timeout value. - */ - public Duration timeout() { - return this.timeout; - } - - /** - * Set the timeout property: AutoML job timeout. - * - * @param timeout the timeout value to set. - * @return the TableVerticalLimitSettings object itself. - */ - public TableVerticalLimitSettings withTimeout(Duration timeout) { - this.timeout = timeout; - return this; - } - - /** - * Get the maxConcurrentTrials property: Maximum Concurrent iterations. - * - * @return the maxConcurrentTrials value. - */ - public Integer maxConcurrentTrials() { - return this.maxConcurrentTrials; - } - - /** - * Set the maxConcurrentTrials property: Maximum Concurrent iterations. - * - * @param maxConcurrentTrials the maxConcurrentTrials value to set. - * @return the TableVerticalLimitSettings object itself. - */ - public TableVerticalLimitSettings withMaxConcurrentTrials(Integer maxConcurrentTrials) { - this.maxConcurrentTrials = maxConcurrentTrials; - return this; - } - - /** - * Get the maxCoresPerTrial property: Max cores per iteration. - * - * @return the maxCoresPerTrial value. - */ - public Integer maxCoresPerTrial() { - return this.maxCoresPerTrial; - } - - /** - * Set the maxCoresPerTrial property: Max cores per iteration. - * - * @param maxCoresPerTrial the maxCoresPerTrial value to set. - * @return the TableVerticalLimitSettings object itself. - */ - public TableVerticalLimitSettings withMaxCoresPerTrial(Integer maxCoresPerTrial) { - this.maxCoresPerTrial = maxCoresPerTrial; - return this; - } - - /** - * Get the exitScore property: Exit score for the AutoML job. - * - * @return the exitScore value. - */ - public Double exitScore() { - return this.exitScore; - } - - /** - * Set the exitScore property: Exit score for the AutoML job. - * - * @param exitScore the exitScore value to set. - * @return the TableVerticalLimitSettings object itself. - */ - public TableVerticalLimitSettings withExitScore(Double exitScore) { - this.exitScore = exitScore; - return this; - } - - /** - * Get the enableEarlyTermination property: Enable early termination, determines whether or not if AutoMLJob will - * terminate early if there is no score improvement in last 20 iterations. - * - * @return the enableEarlyTermination value. - */ - public Boolean enableEarlyTermination() { - return this.enableEarlyTermination; - } - - /** - * Set the enableEarlyTermination property: Enable early termination, determines whether or not if AutoMLJob will - * terminate early if there is no score improvement in last 20 iterations. - * - * @param enableEarlyTermination the enableEarlyTermination value to set. - * @return the TableVerticalLimitSettings object itself. - */ - public TableVerticalLimitSettings withEnableEarlyTermination(Boolean enableEarlyTermination) { - this.enableEarlyTermination = enableEarlyTermination; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("maxTrials", this.maxTrials); - jsonWriter.writeStringField("trialTimeout", CoreUtils.durationToStringWithDays(this.trialTimeout)); - jsonWriter.writeStringField("timeout", CoreUtils.durationToStringWithDays(this.timeout)); - jsonWriter.writeNumberField("maxConcurrentTrials", this.maxConcurrentTrials); - jsonWriter.writeNumberField("maxCoresPerTrial", this.maxCoresPerTrial); - jsonWriter.writeNumberField("exitScore", this.exitScore); - jsonWriter.writeBooleanField("enableEarlyTermination", this.enableEarlyTermination); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TableVerticalLimitSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TableVerticalLimitSettings if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TableVerticalLimitSettings. - */ - public static TableVerticalLimitSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TableVerticalLimitSettings deserializedTableVerticalLimitSettings = new TableVerticalLimitSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxTrials".equals(fieldName)) { - deserializedTableVerticalLimitSettings.maxTrials = reader.getNullable(JsonReader::getInt); - } else if ("trialTimeout".equals(fieldName)) { - deserializedTableVerticalLimitSettings.trialTimeout - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("timeout".equals(fieldName)) { - deserializedTableVerticalLimitSettings.timeout - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("maxConcurrentTrials".equals(fieldName)) { - deserializedTableVerticalLimitSettings.maxConcurrentTrials = reader.getNullable(JsonReader::getInt); - } else if ("maxCoresPerTrial".equals(fieldName)) { - deserializedTableVerticalLimitSettings.maxCoresPerTrial = reader.getNullable(JsonReader::getInt); - } else if ("exitScore".equals(fieldName)) { - deserializedTableVerticalLimitSettings.exitScore = reader.getNullable(JsonReader::getDouble); - } else if ("enableEarlyTermination".equals(fieldName)) { - deserializedTableVerticalLimitSettings.enableEarlyTermination - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedTableVerticalLimitSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.java deleted file mode 100644 index d0a6a1109c02..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Target aggregate function. - */ -public final class TargetAggregationFunction extends ExpandableStringEnum { - /** - * Static value None for TargetAggregationFunction. - */ - public static final TargetAggregationFunction NONE = fromString("None"); - - /** - * Static value Sum for TargetAggregationFunction. - */ - public static final TargetAggregationFunction SUM = fromString("Sum"); - - /** - * Static value Max for TargetAggregationFunction. - */ - public static final TargetAggregationFunction MAX = fromString("Max"); - - /** - * Static value Min for TargetAggregationFunction. - */ - public static final TargetAggregationFunction MIN = fromString("Min"); - - /** - * Static value Mean for TargetAggregationFunction. - */ - public static final TargetAggregationFunction MEAN = fromString("Mean"); - - /** - * Creates a new instance of TargetAggregationFunction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TargetAggregationFunction() { - } - - /** - * Creates or finds a TargetAggregationFunction from its string representation. - * - * @param name a name to look for. - * @return the corresponding TargetAggregationFunction. - */ - public static TargetAggregationFunction fromString(String name) { - return fromString(name, TargetAggregationFunction.class); - } - - /** - * Gets known TargetAggregationFunction values. - * - * @return known TargetAggregationFunction values. - */ - public static Collection values() { - return values(TargetAggregationFunction.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.java deleted file mode 100644 index 3fb081339656..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The number of past periods to lag from the target column. - */ -@Immutable -public class TargetLags implements JsonSerializable { - /* - * [Required] Set target lags mode - Auto/Custom - */ - private TargetLagsMode mode = TargetLagsMode.fromString("TargetLags"); - - /** - * Creates an instance of TargetLags class. - */ - public TargetLags() { - } - - /** - * Get the mode property: [Required] Set target lags mode - Auto/Custom. - * - * @return the mode value. - */ - public TargetLagsMode mode() { - return this.mode; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TargetLags from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TargetLags if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the TargetLags. - */ - public static TargetLags fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("mode".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Auto".equals(discriminatorValue)) { - return AutoTargetLags.fromJson(readerToUse.reset()); - } else if ("Custom".equals(discriminatorValue)) { - return CustomTargetLags.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static TargetLags fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TargetLags deserializedTargetLags = new TargetLags(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedTargetLags.mode = TargetLagsMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedTargetLags; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.java deleted file mode 100644 index 99105013ef13..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Target lags selection modes. - */ -public final class TargetLagsMode extends ExpandableStringEnum { - /** - * Static value Auto for TargetLagsMode. - */ - public static final TargetLagsMode AUTO = fromString("Auto"); - - /** - * Static value Custom for TargetLagsMode. - */ - public static final TargetLagsMode CUSTOM = fromString("Custom"); - - /** - * Creates a new instance of TargetLagsMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TargetLagsMode() { - } - - /** - * Creates or finds a TargetLagsMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding TargetLagsMode. - */ - public static TargetLagsMode fromString(String name) { - return fromString(name, TargetLagsMode.class); - } - - /** - * Gets known TargetLagsMode values. - * - * @return known TargetLagsMode values. - */ - public static Collection values() { - return values(TargetLagsMode.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.java deleted file mode 100644 index d3d2c38bfa5a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Forecasting target rolling window size. - */ -@Immutable -public class TargetRollingWindowSize implements JsonSerializable { - /* - * [Required] TargetRollingWindowSiz detection mode. - */ - private TargetRollingWindowSizeMode mode = TargetRollingWindowSizeMode.fromString("TargetRollingWindowSize"); - - /** - * Creates an instance of TargetRollingWindowSize class. - */ - public TargetRollingWindowSize() { - } - - /** - * Get the mode property: [Required] TargetRollingWindowSiz detection mode. - * - * @return the mode value. - */ - public TargetRollingWindowSizeMode mode() { - return this.mode; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TargetRollingWindowSize from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TargetRollingWindowSize if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the TargetRollingWindowSize. - */ - public static TargetRollingWindowSize fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("mode".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Auto".equals(discriminatorValue)) { - return AutoTargetRollingWindowSize.fromJson(readerToUse.reset()); - } else if ("Custom".equals(discriminatorValue)) { - return CustomTargetRollingWindowSize.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static TargetRollingWindowSize fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TargetRollingWindowSize deserializedTargetRollingWindowSize = new TargetRollingWindowSize(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedTargetRollingWindowSize.mode - = TargetRollingWindowSizeMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedTargetRollingWindowSize; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.java deleted file mode 100644 index 7a87b9bc2256..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Target rolling windows size mode. - */ -public final class TargetRollingWindowSizeMode extends ExpandableStringEnum { - /** - * Static value Auto for TargetRollingWindowSizeMode. - */ - public static final TargetRollingWindowSizeMode AUTO = fromString("Auto"); - - /** - * Static value Custom for TargetRollingWindowSizeMode. - */ - public static final TargetRollingWindowSizeMode CUSTOM = fromString("Custom"); - - /** - * Creates a new instance of TargetRollingWindowSizeMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TargetRollingWindowSizeMode() { - } - - /** - * Creates or finds a TargetRollingWindowSizeMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding TargetRollingWindowSizeMode. - */ - public static TargetRollingWindowSizeMode fromString(String name) { - return fromString(name, TargetRollingWindowSizeMode.class); - } - - /** - * Gets known TargetRollingWindowSizeMode values. - * - * @return known TargetRollingWindowSizeMode values. - */ - public static Collection values() { - return values(TargetRollingWindowSizeMode.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.java deleted file mode 100644 index 2297d0f1da3d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; - -/** - * The TargetUtilizationScaleSettings model. - */ -@Fluent -public final class TargetUtilizationScaleSettings extends OnlineScaleSettings { - /* - * [Required] Type of deployment scaling algorithm - */ - private ScaleType scaleType = ScaleType.TARGET_UTILIZATION; - - /* - * The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds. - */ - private Duration pollingInterval; - - /* - * Target CPU usage for the autoscaler. - */ - private Integer targetUtilizationPercentage; - - /* - * The minimum number of instances to always be present. - */ - private Integer minInstances; - - /* - * The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances. - */ - private Integer maxInstances; - - /** - * Creates an instance of TargetUtilizationScaleSettings class. - */ - public TargetUtilizationScaleSettings() { - } - - /** - * Get the scaleType property: [Required] Type of deployment scaling algorithm. - * - * @return the scaleType value. - */ - @Override - public ScaleType scaleType() { - return this.scaleType; - } - - /** - * Get the pollingInterval property: The polling interval in ISO 8691 format. Only supports duration with precision - * as low as Seconds. - * - * @return the pollingInterval value. - */ - public Duration pollingInterval() { - return this.pollingInterval; - } - - /** - * Set the pollingInterval property: The polling interval in ISO 8691 format. Only supports duration with precision - * as low as Seconds. - * - * @param pollingInterval the pollingInterval value to set. - * @return the TargetUtilizationScaleSettings object itself. - */ - public TargetUtilizationScaleSettings withPollingInterval(Duration pollingInterval) { - this.pollingInterval = pollingInterval; - return this; - } - - /** - * Get the targetUtilizationPercentage property: Target CPU usage for the autoscaler. - * - * @return the targetUtilizationPercentage value. - */ - public Integer targetUtilizationPercentage() { - return this.targetUtilizationPercentage; - } - - /** - * Set the targetUtilizationPercentage property: Target CPU usage for the autoscaler. - * - * @param targetUtilizationPercentage the targetUtilizationPercentage value to set. - * @return the TargetUtilizationScaleSettings object itself. - */ - public TargetUtilizationScaleSettings withTargetUtilizationPercentage(Integer targetUtilizationPercentage) { - this.targetUtilizationPercentage = targetUtilizationPercentage; - return this; - } - - /** - * Get the minInstances property: The minimum number of instances to always be present. - * - * @return the minInstances value. - */ - public Integer minInstances() { - return this.minInstances; - } - - /** - * Set the minInstances property: The minimum number of instances to always be present. - * - * @param minInstances the minInstances value to set. - * @return the TargetUtilizationScaleSettings object itself. - */ - public TargetUtilizationScaleSettings withMinInstances(Integer minInstances) { - this.minInstances = minInstances; - return this; - } - - /** - * Get the maxInstances property: The maximum number of instances that the deployment can scale to. The quota will - * be reserved for max_instances. - * - * @return the maxInstances value. - */ - public Integer maxInstances() { - return this.maxInstances; - } - - /** - * Set the maxInstances property: The maximum number of instances that the deployment can scale to. The quota will - * be reserved for max_instances. - * - * @param maxInstances the maxInstances value to set. - * @return the TargetUtilizationScaleSettings object itself. - */ - public TargetUtilizationScaleSettings withMaxInstances(Integer maxInstances) { - this.maxInstances = maxInstances; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("scaleType", this.scaleType == null ? null : this.scaleType.toString()); - jsonWriter.writeStringField("pollingInterval", CoreUtils.durationToStringWithDays(this.pollingInterval)); - jsonWriter.writeNumberField("targetUtilizationPercentage", this.targetUtilizationPercentage); - jsonWriter.writeNumberField("minInstances", this.minInstances); - jsonWriter.writeNumberField("maxInstances", this.maxInstances); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TargetUtilizationScaleSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TargetUtilizationScaleSettings if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TargetUtilizationScaleSettings. - */ - public static TargetUtilizationScaleSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TargetUtilizationScaleSettings deserializedTargetUtilizationScaleSettings - = new TargetUtilizationScaleSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scaleType".equals(fieldName)) { - deserializedTargetUtilizationScaleSettings.scaleType = ScaleType.fromString(reader.getString()); - } else if ("pollingInterval".equals(fieldName)) { - deserializedTargetUtilizationScaleSettings.pollingInterval - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("targetUtilizationPercentage".equals(fieldName)) { - deserializedTargetUtilizationScaleSettings.targetUtilizationPercentage - = reader.getNullable(JsonReader::getInt); - } else if ("minInstances".equals(fieldName)) { - deserializedTargetUtilizationScaleSettings.minInstances = reader.getNullable(JsonReader::getInt); - } else if ("maxInstances".equals(fieldName)) { - deserializedTargetUtilizationScaleSettings.maxInstances = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedTargetUtilizationScaleSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.java deleted file mode 100644 index 994f19ec1b57..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * AutoMLJob Task type. - */ -public final class TaskType extends ExpandableStringEnum { - /** - * Static value Classification for TaskType. - */ - public static final TaskType CLASSIFICATION = fromString("Classification"); - - /** - * Static value Regression for TaskType. - */ - public static final TaskType REGRESSION = fromString("Regression"); - - /** - * Static value Forecasting for TaskType. - */ - public static final TaskType FORECASTING = fromString("Forecasting"); - - /** - * Static value ImageClassification for TaskType. - */ - public static final TaskType IMAGE_CLASSIFICATION = fromString("ImageClassification"); - - /** - * Static value ImageClassificationMultilabel for TaskType. - */ - public static final TaskType IMAGE_CLASSIFICATION_MULTILABEL = fromString("ImageClassificationMultilabel"); - - /** - * Static value ImageObjectDetection for TaskType. - */ - public static final TaskType IMAGE_OBJECT_DETECTION = fromString("ImageObjectDetection"); - - /** - * Static value ImageInstanceSegmentation for TaskType. - */ - public static final TaskType IMAGE_INSTANCE_SEGMENTATION = fromString("ImageInstanceSegmentation"); - - /** - * Static value TextClassification for TaskType. - */ - public static final TaskType TEXT_CLASSIFICATION = fromString("TextClassification"); - - /** - * Static value TextClassificationMultilabel for TaskType. - */ - public static final TaskType TEXT_CLASSIFICATION_MULTILABEL = fromString("TextClassificationMultilabel"); - - /** - * Static value TextNER for TaskType. - */ - public static final TaskType TEXT_NER = fromString("TextNER"); - - /** - * Creates a new instance of TaskType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TaskType() { - } - - /** - * Creates or finds a TaskType from its string representation. - * - * @param name a name to look for. - * @return the corresponding TaskType. - */ - public static TaskType fromString(String name) { - return fromString(name, TaskType.class); - } - - /** - * Gets known TaskType values. - * - * @return known TaskType values. - */ - public static Collection values() { - return values(TaskType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.java deleted file mode 100644 index 8771142e6522..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * TensorFlow distribution configuration. - */ -@Fluent -public final class TensorFlow extends DistributionConfiguration { - /* - * [Required] Specifies the type of distribution framework. - */ - private DistributionType distributionType = DistributionType.TENSOR_FLOW; - - /* - * Number of workers. If not specified, will default to the instance count. - */ - private Integer workerCount; - - /* - * Number of parameter server tasks. - */ - private Integer parameterServerCount; - - /** - * Creates an instance of TensorFlow class. - */ - public TensorFlow() { - } - - /** - * Get the distributionType property: [Required] Specifies the type of distribution framework. - * - * @return the distributionType value. - */ - @Override - public DistributionType distributionType() { - return this.distributionType; - } - - /** - * Get the workerCount property: Number of workers. If not specified, will default to the instance count. - * - * @return the workerCount value. - */ - public Integer workerCount() { - return this.workerCount; - } - - /** - * Set the workerCount property: Number of workers. If not specified, will default to the instance count. - * - * @param workerCount the workerCount value to set. - * @return the TensorFlow object itself. - */ - public TensorFlow withWorkerCount(Integer workerCount) { - this.workerCount = workerCount; - return this; - } - - /** - * Get the parameterServerCount property: Number of parameter server tasks. - * - * @return the parameterServerCount value. - */ - public Integer parameterServerCount() { - return this.parameterServerCount; - } - - /** - * Set the parameterServerCount property: Number of parameter server tasks. - * - * @param parameterServerCount the parameterServerCount value to set. - * @return the TensorFlow object itself. - */ - public TensorFlow withParameterServerCount(Integer parameterServerCount) { - this.parameterServerCount = parameterServerCount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("distributionType", - this.distributionType == null ? null : this.distributionType.toString()); - jsonWriter.writeNumberField("workerCount", this.workerCount); - jsonWriter.writeNumberField("parameterServerCount", this.parameterServerCount); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TensorFlow from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TensorFlow if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the TensorFlow. - */ - public static TensorFlow fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TensorFlow deserializedTensorFlow = new TensorFlow(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("distributionType".equals(fieldName)) { - deserializedTensorFlow.distributionType = DistributionType.fromString(reader.getString()); - } else if ("workerCount".equals(fieldName)) { - deserializedTensorFlow.workerCount = reader.getNullable(JsonReader::getInt); - } else if ("parameterServerCount".equals(fieldName)) { - deserializedTensorFlow.parameterServerCount = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedTensorFlow; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassification.java deleted file mode 100644 index a5237d3783d9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassification.java +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Text Classification task in AutoML NLP vertical. - * NLP - Natural Language Processing. - */ -@Fluent -public final class TextClassification extends AutoMLVertical { - /* - * [Required] Task type for AutoMLJob. - */ - private TaskType taskType = TaskType.TEXT_CLASSIFICATION; - - /* - * Primary metric for Text-Classification task. - */ - private ClassificationPrimaryMetrics primaryMetric; - - /* - * Execution constraints for AutoMLJob. - */ - private NlpVerticalLimitSettings limitSettings; - - /* - * Featurization inputs needed for AutoML job. - */ - private NlpVerticalFeaturizationSettings featurizationSettings; - - /* - * Validation data inputs. - */ - private MLTableJobInput validationData; - - /** - * Creates an instance of TextClassification class. - */ - public TextClassification() { - } - - /** - * Get the taskType property: [Required] Task type for AutoMLJob. - * - * @return the taskType value. - */ - @Override - public TaskType taskType() { - return this.taskType; - } - - /** - * Get the primaryMetric property: Primary metric for Text-Classification task. - * - * @return the primaryMetric value. - */ - public ClassificationPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric for Text-Classification task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the TextClassification object itself. - */ - public TextClassification withPrimaryMetric(ClassificationPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - - /** - * Get the limitSettings property: Execution constraints for AutoMLJob. - * - * @return the limitSettings value. - */ - public NlpVerticalLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: Execution constraints for AutoMLJob. - * - * @param limitSettings the limitSettings value to set. - * @return the TextClassification object itself. - */ - public TextClassification withLimitSettings(NlpVerticalLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @return the featurizationSettings value. - */ - public NlpVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; - } - - /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @param featurizationSettings the featurizationSettings value to set. - * @return the TextClassification object itself. - */ - public TextClassification withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the TextClassification object itself. - */ - public TextClassification withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TextClassification withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TextClassification withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TextClassification withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (limitSettings() != null) { - limitSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("trainingData", trainingData()); - jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); - jsonWriter.writeStringField("targetColumnName", targetColumnName()); - jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); - jsonWriter.writeJsonField("validationData", this.validationData); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TextClassification from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TextClassification if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TextClassification. - */ - public static TextClassification fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TextClassification deserializedTextClassification = new TextClassification(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("trainingData".equals(fieldName)) { - deserializedTextClassification.withTrainingData(MLTableJobInput.fromJson(reader)); - } else if ("logVerbosity".equals(fieldName)) { - deserializedTextClassification.withLogVerbosity(LogVerbosity.fromString(reader.getString())); - } else if ("targetColumnName".equals(fieldName)) { - deserializedTextClassification.withTargetColumnName(reader.getString()); - } else if ("taskType".equals(fieldName)) { - deserializedTextClassification.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedTextClassification.primaryMetric - = ClassificationPrimaryMetrics.fromString(reader.getString()); - } else if ("limitSettings".equals(fieldName)) { - deserializedTextClassification.limitSettings = NlpVerticalLimitSettings.fromJson(reader); - } else if ("featurizationSettings".equals(fieldName)) { - deserializedTextClassification.featurizationSettings - = NlpVerticalFeaturizationSettings.fromJson(reader); - } else if ("validationData".equals(fieldName)) { - deserializedTextClassification.validationData = MLTableJobInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTextClassification; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassificationMultilabel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassificationMultilabel.java deleted file mode 100644 index 325e4926c573..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassificationMultilabel.java +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Text Classification Multilabel task in AutoML NLP vertical. - * NLP - Natural Language Processing. - */ -@Fluent -public final class TextClassificationMultilabel extends AutoMLVertical { - /* - * [Required] Task type for AutoMLJob. - */ - private TaskType taskType = TaskType.TEXT_CLASSIFICATION_MULTILABEL; - - /* - * Primary metric for Text-Classification-Multilabel task. - * Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. - */ - private ClassificationMultilabelPrimaryMetrics primaryMetric; - - /* - * Execution constraints for AutoMLJob. - */ - private NlpVerticalLimitSettings limitSettings; - - /* - * Featurization inputs needed for AutoML job. - */ - private NlpVerticalFeaturizationSettings featurizationSettings; - - /* - * Validation data inputs. - */ - private MLTableJobInput validationData; - - /** - * Creates an instance of TextClassificationMultilabel class. - */ - public TextClassificationMultilabel() { - } - - /** - * Get the taskType property: [Required] Task type for AutoMLJob. - * - * @return the taskType value. - */ - @Override - public TaskType taskType() { - return this.taskType; - } - - /** - * Get the primaryMetric property: Primary metric for Text-Classification-Multilabel task. - * Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. - * - * @return the primaryMetric value. - */ - public ClassificationMultilabelPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Get the limitSettings property: Execution constraints for AutoMLJob. - * - * @return the limitSettings value. - */ - public NlpVerticalLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: Execution constraints for AutoMLJob. - * - * @param limitSettings the limitSettings value to set. - * @return the TextClassificationMultilabel object itself. - */ - public TextClassificationMultilabel withLimitSettings(NlpVerticalLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @return the featurizationSettings value. - */ - public NlpVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; - } - - /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @param featurizationSettings the featurizationSettings value to set. - * @return the TextClassificationMultilabel object itself. - */ - public TextClassificationMultilabel - withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the TextClassificationMultilabel object itself. - */ - public TextClassificationMultilabel withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TextClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TextClassificationMultilabel withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TextClassificationMultilabel withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (limitSettings() != null) { - limitSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("trainingData", trainingData()); - jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); - jsonWriter.writeStringField("targetColumnName", targetColumnName()); - jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); - jsonWriter.writeJsonField("validationData", this.validationData); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TextClassificationMultilabel from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TextClassificationMultilabel if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TextClassificationMultilabel. - */ - public static TextClassificationMultilabel fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TextClassificationMultilabel deserializedTextClassificationMultilabel = new TextClassificationMultilabel(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("trainingData".equals(fieldName)) { - deserializedTextClassificationMultilabel.withTrainingData(MLTableJobInput.fromJson(reader)); - } else if ("logVerbosity".equals(fieldName)) { - deserializedTextClassificationMultilabel - .withLogVerbosity(LogVerbosity.fromString(reader.getString())); - } else if ("targetColumnName".equals(fieldName)) { - deserializedTextClassificationMultilabel.withTargetColumnName(reader.getString()); - } else if ("taskType".equals(fieldName)) { - deserializedTextClassificationMultilabel.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedTextClassificationMultilabel.primaryMetric - = ClassificationMultilabelPrimaryMetrics.fromString(reader.getString()); - } else if ("limitSettings".equals(fieldName)) { - deserializedTextClassificationMultilabel.limitSettings = NlpVerticalLimitSettings.fromJson(reader); - } else if ("featurizationSettings".equals(fieldName)) { - deserializedTextClassificationMultilabel.featurizationSettings - = NlpVerticalFeaturizationSettings.fromJson(reader); - } else if ("validationData".equals(fieldName)) { - deserializedTextClassificationMultilabel.validationData = MLTableJobInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTextClassificationMultilabel; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextNer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextNer.java deleted file mode 100644 index 2c6d58ad2ffc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextNer.java +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Text-NER task in AutoML NLP vertical. - * NER - Named Entity Recognition. - * NLP - Natural Language Processing. - */ -@Fluent -public final class TextNer extends AutoMLVertical { - /* - * [Required] Task type for AutoMLJob. - */ - private TaskType taskType = TaskType.TEXT_NER; - - /* - * Primary metric for Text-NER task. - * Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. - */ - private ClassificationPrimaryMetrics primaryMetric; - - /* - * Execution constraints for AutoMLJob. - */ - private NlpVerticalLimitSettings limitSettings; - - /* - * Featurization inputs needed for AutoML job. - */ - private NlpVerticalFeaturizationSettings featurizationSettings; - - /* - * Validation data inputs. - */ - private MLTableJobInput validationData; - - /** - * Creates an instance of TextNer class. - */ - public TextNer() { - } - - /** - * Get the taskType property: [Required] Task type for AutoMLJob. - * - * @return the taskType value. - */ - @Override - public TaskType taskType() { - return this.taskType; - } - - /** - * Get the primaryMetric property: Primary metric for Text-NER task. - * Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. - * - * @return the primaryMetric value. - */ - public ClassificationPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Get the limitSettings property: Execution constraints for AutoMLJob. - * - * @return the limitSettings value. - */ - public NlpVerticalLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: Execution constraints for AutoMLJob. - * - * @param limitSettings the limitSettings value to set. - * @return the TextNer object itself. - */ - public TextNer withLimitSettings(NlpVerticalLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @return the featurizationSettings value. - */ - public NlpVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; - } - - /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @param featurizationSettings the featurizationSettings value to set. - * @return the TextNer object itself. - */ - public TextNer withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the TextNer object itself. - */ - public TextNer withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TextNer withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TextNer withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TextNer withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (limitSettings() != null) { - limitSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("trainingData", trainingData()); - jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); - jsonWriter.writeStringField("targetColumnName", targetColumnName()); - jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); - jsonWriter.writeJsonField("validationData", this.validationData); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TextNer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TextNer if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TextNer. - */ - public static TextNer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TextNer deserializedTextNer = new TextNer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("trainingData".equals(fieldName)) { - deserializedTextNer.withTrainingData(MLTableJobInput.fromJson(reader)); - } else if ("logVerbosity".equals(fieldName)) { - deserializedTextNer.withLogVerbosity(LogVerbosity.fromString(reader.getString())); - } else if ("targetColumnName".equals(fieldName)) { - deserializedTextNer.withTargetColumnName(reader.getString()); - } else if ("taskType".equals(fieldName)) { - deserializedTextNer.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedTextNer.primaryMetric = ClassificationPrimaryMetrics.fromString(reader.getString()); - } else if ("limitSettings".equals(fieldName)) { - deserializedTextNer.limitSettings = NlpVerticalLimitSettings.fromJson(reader); - } else if ("featurizationSettings".equals(fieldName)) { - deserializedTextNer.featurizationSettings = NlpVerticalFeaturizationSettings.fromJson(reader); - } else if ("validationData".equals(fieldName)) { - deserializedTextNer.validationData = MLTableJobInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTextNer; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.java deleted file mode 100644 index 2a9d74fb5bbd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes the tmpfs options for the container. - */ -@Fluent -public final class TmpfsOptions implements JsonSerializable { - /* - * Mention the Tmpfs size - */ - private Integer size; - - /** - * Creates an instance of TmpfsOptions class. - */ - public TmpfsOptions() { - } - - /** - * Get the size property: Mention the Tmpfs size. - * - * @return the size value. - */ - public Integer size() { - return this.size; - } - - /** - * Set the size property: Mention the Tmpfs size. - * - * @param size the size value to set. - * @return the TmpfsOptions object itself. - */ - public TmpfsOptions withSize(Integer size) { - this.size = size; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("size", this.size); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TmpfsOptions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TmpfsOptions if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the TmpfsOptions. - */ - public static TmpfsOptions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TmpfsOptions deserializedTmpfsOptions = new TmpfsOptions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("size".equals(fieldName)) { - deserializedTmpfsOptions.size = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedTmpfsOptions; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TopNFeaturesByAttribution.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TopNFeaturesByAttribution.java deleted file mode 100644 index 8aa049e6d9a2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TopNFeaturesByAttribution.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The TopNFeaturesByAttribution model. - */ -@Fluent -public final class TopNFeaturesByAttribution extends MonitoringFeatureFilterBase { - /* - * [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. - */ - private MonitoringFeatureFilterType filterType = MonitoringFeatureFilterType.TOP_NBY_ATTRIBUTION; - - /* - * The number of top features to include. - */ - private Integer top; - - /** - * Creates an instance of TopNFeaturesByAttribution class. - */ - public TopNFeaturesByAttribution() { - } - - /** - * Get the filterType property: [Required] Specifies the feature filter to leverage when selecting features to - * calculate metrics over. - * - * @return the filterType value. - */ - @Override - public MonitoringFeatureFilterType filterType() { - return this.filterType; - } - - /** - * Get the top property: The number of top features to include. - * - * @return the top value. - */ - public Integer top() { - return this.top; - } - - /** - * Set the top property: The number of top features to include. - * - * @param top the top value to set. - * @return the TopNFeaturesByAttribution object itself. - */ - public TopNFeaturesByAttribution withTop(Integer top) { - this.top = top; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("filterType", this.filterType == null ? null : this.filterType.toString()); - jsonWriter.writeNumberField("top", this.top); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TopNFeaturesByAttribution from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TopNFeaturesByAttribution if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TopNFeaturesByAttribution. - */ - public static TopNFeaturesByAttribution fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TopNFeaturesByAttribution deserializedTopNFeaturesByAttribution = new TopNFeaturesByAttribution(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("filterType".equals(fieldName)) { - deserializedTopNFeaturesByAttribution.filterType - = MonitoringFeatureFilterType.fromString(reader.getString()); - } else if ("top".equals(fieldName)) { - deserializedTopNFeaturesByAttribution.top = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedTopNFeaturesByAttribution; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.java deleted file mode 100644 index 3f8ac294cd04..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.java +++ /dev/null @@ -1,275 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.Duration; - -/** - * Training related configuration. - */ -@Fluent -public class TrainingSettings implements JsonSerializable { - /* - * Flag for enabling onnx compatible models. - */ - private Boolean enableOnnxCompatibleModels; - - /* - * Stack ensemble settings for stack ensemble run. - */ - private StackEnsembleSettings stackEnsembleSettings; - - /* - * Enable stack ensemble run. - */ - private Boolean enableStackEnsemble; - - /* - * Enable voting ensemble run. - */ - private Boolean enableVoteEnsemble; - - /* - * During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are - * downloaded. - * Configure this parameter with a higher value than 300 secs, if more time is needed. - */ - private Duration ensembleModelDownloadTimeout; - - /* - * Flag to turn on explainability on best model. - */ - private Boolean enableModelExplainability; - - /* - * Enable recommendation of DNN models. - */ - private Boolean enableDnnTraining; - - /** - * Creates an instance of TrainingSettings class. - */ - public TrainingSettings() { - } - - /** - * Get the enableOnnxCompatibleModels property: Flag for enabling onnx compatible models. - * - * @return the enableOnnxCompatibleModels value. - */ - public Boolean enableOnnxCompatibleModels() { - return this.enableOnnxCompatibleModels; - } - - /** - * Set the enableOnnxCompatibleModels property: Flag for enabling onnx compatible models. - * - * @param enableOnnxCompatibleModels the enableOnnxCompatibleModels value to set. - * @return the TrainingSettings object itself. - */ - public TrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { - this.enableOnnxCompatibleModels = enableOnnxCompatibleModels; - return this; - } - - /** - * Get the stackEnsembleSettings property: Stack ensemble settings for stack ensemble run. - * - * @return the stackEnsembleSettings value. - */ - public StackEnsembleSettings stackEnsembleSettings() { - return this.stackEnsembleSettings; - } - - /** - * Set the stackEnsembleSettings property: Stack ensemble settings for stack ensemble run. - * - * @param stackEnsembleSettings the stackEnsembleSettings value to set. - * @return the TrainingSettings object itself. - */ - public TrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { - this.stackEnsembleSettings = stackEnsembleSettings; - return this; - } - - /** - * Get the enableStackEnsemble property: Enable stack ensemble run. - * - * @return the enableStackEnsemble value. - */ - public Boolean enableStackEnsemble() { - return this.enableStackEnsemble; - } - - /** - * Set the enableStackEnsemble property: Enable stack ensemble run. - * - * @param enableStackEnsemble the enableStackEnsemble value to set. - * @return the TrainingSettings object itself. - */ - public TrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { - this.enableStackEnsemble = enableStackEnsemble; - return this; - } - - /** - * Get the enableVoteEnsemble property: Enable voting ensemble run. - * - * @return the enableVoteEnsemble value. - */ - public Boolean enableVoteEnsemble() { - return this.enableVoteEnsemble; - } - - /** - * Set the enableVoteEnsemble property: Enable voting ensemble run. - * - * @param enableVoteEnsemble the enableVoteEnsemble value to set. - * @return the TrainingSettings object itself. - */ - public TrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { - this.enableVoteEnsemble = enableVoteEnsemble; - return this; - } - - /** - * Get the ensembleModelDownloadTimeout property: During VotingEnsemble and StackEnsemble model generation, multiple - * fitted models from the previous child runs are downloaded. - * Configure this parameter with a higher value than 300 secs, if more time is needed. - * - * @return the ensembleModelDownloadTimeout value. - */ - public Duration ensembleModelDownloadTimeout() { - return this.ensembleModelDownloadTimeout; - } - - /** - * Set the ensembleModelDownloadTimeout property: During VotingEnsemble and StackEnsemble model generation, multiple - * fitted models from the previous child runs are downloaded. - * Configure this parameter with a higher value than 300 secs, if more time is needed. - * - * @param ensembleModelDownloadTimeout the ensembleModelDownloadTimeout value to set. - * @return the TrainingSettings object itself. - */ - public TrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { - this.ensembleModelDownloadTimeout = ensembleModelDownloadTimeout; - return this; - } - - /** - * Get the enableModelExplainability property: Flag to turn on explainability on best model. - * - * @return the enableModelExplainability value. - */ - public Boolean enableModelExplainability() { - return this.enableModelExplainability; - } - - /** - * Set the enableModelExplainability property: Flag to turn on explainability on best model. - * - * @param enableModelExplainability the enableModelExplainability value to set. - * @return the TrainingSettings object itself. - */ - public TrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { - this.enableModelExplainability = enableModelExplainability; - return this; - } - - /** - * Get the enableDnnTraining property: Enable recommendation of DNN models. - * - * @return the enableDnnTraining value. - */ - public Boolean enableDnnTraining() { - return this.enableDnnTraining; - } - - /** - * Set the enableDnnTraining property: Enable recommendation of DNN models. - * - * @param enableDnnTraining the enableDnnTraining value to set. - * @return the TrainingSettings object itself. - */ - public TrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { - this.enableDnnTraining = enableDnnTraining; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (stackEnsembleSettings() != null) { - stackEnsembleSettings().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enableOnnxCompatibleModels", this.enableOnnxCompatibleModels); - jsonWriter.writeJsonField("stackEnsembleSettings", this.stackEnsembleSettings); - jsonWriter.writeBooleanField("enableStackEnsemble", this.enableStackEnsemble); - jsonWriter.writeBooleanField("enableVoteEnsemble", this.enableVoteEnsemble); - jsonWriter.writeStringField("ensembleModelDownloadTimeout", - CoreUtils.durationToStringWithDays(this.ensembleModelDownloadTimeout)); - jsonWriter.writeBooleanField("enableModelExplainability", this.enableModelExplainability); - jsonWriter.writeBooleanField("enableDnnTraining", this.enableDnnTraining); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TrainingSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TrainingSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the TrainingSettings. - */ - public static TrainingSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TrainingSettings deserializedTrainingSettings = new TrainingSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enableOnnxCompatibleModels".equals(fieldName)) { - deserializedTrainingSettings.enableOnnxCompatibleModels - = reader.getNullable(JsonReader::getBoolean); - } else if ("stackEnsembleSettings".equals(fieldName)) { - deserializedTrainingSettings.stackEnsembleSettings = StackEnsembleSettings.fromJson(reader); - } else if ("enableStackEnsemble".equals(fieldName)) { - deserializedTrainingSettings.enableStackEnsemble = reader.getNullable(JsonReader::getBoolean); - } else if ("enableVoteEnsemble".equals(fieldName)) { - deserializedTrainingSettings.enableVoteEnsemble = reader.getNullable(JsonReader::getBoolean); - } else if ("ensembleModelDownloadTimeout".equals(fieldName)) { - deserializedTrainingSettings.ensembleModelDownloadTimeout - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("enableModelExplainability".equals(fieldName)) { - deserializedTrainingSettings.enableModelExplainability = reader.getNullable(JsonReader::getBoolean); - } else if ("enableDnnTraining".equals(fieldName)) { - deserializedTrainingSettings.enableDnnTraining = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedTrainingSettings; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrialComponent.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrialComponent.java deleted file mode 100644 index f95ef9e2e99f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrialComponent.java +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Trial component definition. - */ -@Fluent -public final class TrialComponent implements JsonSerializable { - /* - * ARM resource ID of the code asset. - */ - private String codeId; - - /* - * [Required] The command to execute on startup of the job. eg. "python train.py" - */ - private String command; - - /* - * [Required] The ARM resource ID of the Environment specification for the job. - */ - private String environmentId; - - /* - * Environment variables included in the job. - */ - private Map environmentVariables; - - /* - * Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. - */ - private DistributionConfiguration distribution; - - /* - * Compute Resource configuration for the job. - */ - private JobResourceConfiguration resources; - - /** - * Creates an instance of TrialComponent class. - */ - public TrialComponent() { - } - - /** - * Get the codeId property: ARM resource ID of the code asset. - * - * @return the codeId value. - */ - public String codeId() { - return this.codeId; - } - - /** - * Set the codeId property: ARM resource ID of the code asset. - * - * @param codeId the codeId value to set. - * @return the TrialComponent object itself. - */ - public TrialComponent withCodeId(String codeId) { - this.codeId = codeId; - return this; - } - - /** - * Get the command property: [Required] The command to execute on startup of the job. eg. "python train.py". - * - * @return the command value. - */ - public String command() { - return this.command; - } - - /** - * Set the command property: [Required] The command to execute on startup of the job. eg. "python train.py". - * - * @param command the command value to set. - * @return the TrialComponent object itself. - */ - public TrialComponent withCommand(String command) { - this.command = command; - return this; - } - - /** - * Get the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. - * - * @param environmentId the environmentId value to set. - * @return the TrialComponent object itself. - */ - public TrialComponent withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Get the environmentVariables property: Environment variables included in the job. - * - * @return the environmentVariables value. - */ - public Map environmentVariables() { - return this.environmentVariables; - } - - /** - * Set the environmentVariables property: Environment variables included in the job. - * - * @param environmentVariables the environmentVariables value to set. - * @return the TrialComponent object itself. - */ - public TrialComponent withEnvironmentVariables(Map environmentVariables) { - this.environmentVariables = environmentVariables; - return this; - } - - /** - * Get the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, - * Tensorflow, PyTorch, or null. - * - * @return the distribution value. - */ - public DistributionConfiguration distribution() { - return this.distribution; - } - - /** - * Set the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, - * Tensorflow, PyTorch, or null. - * - * @param distribution the distribution value to set. - * @return the TrialComponent object itself. - */ - public TrialComponent withDistribution(DistributionConfiguration distribution) { - this.distribution = distribution; - return this; - } - - /** - * Get the resources property: Compute Resource configuration for the job. - * - * @return the resources value. - */ - public JobResourceConfiguration resources() { - return this.resources; - } - - /** - * Set the resources property: Compute Resource configuration for the job. - * - * @param resources the resources value to set. - * @return the TrialComponent object itself. - */ - public TrialComponent withResources(JobResourceConfiguration resources) { - this.resources = resources; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (command() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property command in model TrialComponent")); - } - if (environmentId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property environmentId in model TrialComponent")); - } - if (distribution() != null) { - distribution().validate(); - } - if (resources() != null) { - resources().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TrialComponent.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("command", this.command); - jsonWriter.writeStringField("environmentId", this.environmentId); - jsonWriter.writeStringField("codeId", this.codeId); - jsonWriter.writeMapField("environmentVariables", this.environmentVariables, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("distribution", this.distribution); - jsonWriter.writeJsonField("resources", this.resources); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TrialComponent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TrialComponent if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TrialComponent. - */ - public static TrialComponent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TrialComponent deserializedTrialComponent = new TrialComponent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("command".equals(fieldName)) { - deserializedTrialComponent.command = reader.getString(); - } else if ("environmentId".equals(fieldName)) { - deserializedTrialComponent.environmentId = reader.getString(); - } else if ("codeId".equals(fieldName)) { - deserializedTrialComponent.codeId = reader.getString(); - } else if ("environmentVariables".equals(fieldName)) { - Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); - deserializedTrialComponent.environmentVariables = environmentVariables; - } else if ("distribution".equals(fieldName)) { - deserializedTrialComponent.distribution = DistributionConfiguration.fromJson(reader); - } else if ("resources".equals(fieldName)) { - deserializedTrialComponent.resources = JobResourceConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTrialComponent; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java deleted file mode 100644 index e95b0f489359..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The TriggerBase model. - */ -@Fluent -public class TriggerBase implements JsonSerializable { - /* - * [Required] - */ - private TriggerType triggerType = TriggerType.fromString("TriggerBase"); - - /* - * Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer - * https://en.wikipedia.org/wiki/ISO_8601. - * Recommented format would be "2022-06-01T00:00:01" - * If not present, the schedule will run indefinitely - */ - private String endTime; - - /* - * Specifies start time of schedule in ISO 8601 format, but without a UTC offset. - */ - private String startTime; - - /* - * Specifies time zone in which the schedule runs. - * TimeZone should follow Windows time zone format. Refer: - * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 - */ - private String timeZone; - - /** - * Creates an instance of TriggerBase class. - */ - public TriggerBase() { - } - - /** - * Get the triggerType property: [Required]. - * - * @return the triggerType value. - */ - public TriggerType triggerType() { - return this.triggerType; - } - - /** - * Get the endTime property: Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer - * https://en.wikipedia.org/wiki/ISO_8601. - * Recommented format would be "2022-06-01T00:00:01" - * If not present, the schedule will run indefinitely. - * - * @return the endTime value. - */ - public String endTime() { - return this.endTime; - } - - /** - * Set the endTime property: Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer - * https://en.wikipedia.org/wiki/ISO_8601. - * Recommented format would be "2022-06-01T00:00:01" - * If not present, the schedule will run indefinitely. - * - * @param endTime the endTime value to set. - * @return the TriggerBase object itself. - */ - public TriggerBase withEndTime(String endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the startTime property: Specifies start time of schedule in ISO 8601 format, but without a UTC offset. - * - * @return the startTime value. - */ - public String startTime() { - return this.startTime; - } - - /** - * Set the startTime property: Specifies start time of schedule in ISO 8601 format, but without a UTC offset. - * - * @param startTime the startTime value to set. - * @return the TriggerBase object itself. - */ - public TriggerBase withStartTime(String startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the timeZone property: Specifies time zone in which the schedule runs. - * TimeZone should follow Windows time zone format. Refer: - * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. - * - * @return the timeZone value. - */ - public String timeZone() { - return this.timeZone; - } - - /** - * Set the timeZone property: Specifies time zone in which the schedule runs. - * TimeZone should follow Windows time zone format. Refer: - * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. - * - * @param timeZone the timeZone value to set. - * @return the TriggerBase object itself. - */ - public TriggerBase withTimeZone(String timeZone) { - this.timeZone = timeZone; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("triggerType", this.triggerType == null ? null : this.triggerType.toString()); - jsonWriter.writeStringField("endTime", this.endTime); - jsonWriter.writeStringField("startTime", this.startTime); - jsonWriter.writeStringField("timeZone", this.timeZone); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TriggerBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TriggerBase if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the TriggerBase. - */ - public static TriggerBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("triggerType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("Recurrence".equals(discriminatorValue)) { - return RecurrenceTrigger.fromJson(readerToUse.reset()); - } else if ("Cron".equals(discriminatorValue)) { - return CronTrigger.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static TriggerBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TriggerBase deserializedTriggerBase = new TriggerBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("triggerType".equals(fieldName)) { - deserializedTriggerBase.triggerType = TriggerType.fromString(reader.getString()); - } else if ("endTime".equals(fieldName)) { - deserializedTriggerBase.endTime = reader.getString(); - } else if ("startTime".equals(fieldName)) { - deserializedTriggerBase.startTime = reader.getString(); - } else if ("timeZone".equals(fieldName)) { - deserializedTriggerBase.timeZone = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTriggerBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java deleted file mode 100644 index 9e4c2133d3ff..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for TriggerType. - */ -public final class TriggerType extends ExpandableStringEnum { - /** - * Static value Recurrence for TriggerType. - */ - public static final TriggerType RECURRENCE = fromString("Recurrence"); - - /** - * Static value Cron for TriggerType. - */ - public static final TriggerType CRON = fromString("Cron"); - - /** - * Creates a new instance of TriggerType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TriggerType() { - } - - /** - * Creates or finds a TriggerType from its string representation. - * - * @param name a name to look for. - * @return the corresponding TriggerType. - */ - public static TriggerType fromString(String name) { - return fromString(name, TriggerType.class); - } - - /** - * Gets known TriggerType values. - * - * @return known TriggerType values. - */ - public static Collection values() { - return values(TriggerType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.java deleted file mode 100644 index 27ce7c891231..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The TritonModelJobInput model. - */ -@Fluent -public final class TritonModelJobInput extends JobInput { - /* - * [Required] Specifies the type of job. - */ - private JobInputType jobInputType = JobInputType.TRITON_MODEL; - - /* - * [Required] Input Asset URI. - */ - private String uri; - - /* - * Input Asset Delivery Mode. - */ - private InputDeliveryMode mode; - - /** - * Creates an instance of TritonModelJobInput class. - */ - public TritonModelJobInput() { - } - - /** - * Get the jobInputType property: [Required] Specifies the type of job. - * - * @return the jobInputType value. - */ - @Override - public JobInputType jobInputType() { - return this.jobInputType; - } - - /** - * Get the uri property: [Required] Input Asset URI. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: [Required] Input Asset URI. - * - * @param uri the uri value to set. - * @return the TritonModelJobInput object itself. - */ - public TritonModelJobInput withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the mode property: Input Asset Delivery Mode. - * - * @return the mode value. - */ - public InputDeliveryMode mode() { - return this.mode; - } - - /** - * Set the mode property: Input Asset Delivery Mode. - * - * @param mode the mode value to set. - * @return the TritonModelJobInput object itself. - */ - public TritonModelJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TritonModelJobInput withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model TritonModelJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TritonModelJobInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("jobInputType", this.jobInputType == null ? null : this.jobInputType.toString()); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TritonModelJobInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TritonModelJobInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TritonModelJobInput. - */ - public static TritonModelJobInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TritonModelJobInput deserializedTritonModelJobInput = new TritonModelJobInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedTritonModelJobInput.withDescription(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedTritonModelJobInput.uri = reader.getString(); - } else if ("jobInputType".equals(fieldName)) { - deserializedTritonModelJobInput.jobInputType = JobInputType.fromString(reader.getString()); - } else if ("mode".equals(fieldName)) { - deserializedTritonModelJobInput.mode = InputDeliveryMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedTritonModelJobInput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobOutput.java deleted file mode 100644 index 33028b918755..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobOutput.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The TritonModelJobOutput model. - */ -@Fluent -public final class TritonModelJobOutput extends JobOutput { - /* - * [Required] Specifies the type of job. - */ - private JobOutputType jobOutputType = JobOutputType.TRITON_MODEL; - - /* - * Output Asset URI. - */ - private String uri; - - /* - * Output Asset Delivery Mode. - */ - private OutputDeliveryMode mode; - - /** - * Creates an instance of TritonModelJobOutput class. - */ - public TritonModelJobOutput() { - } - - /** - * Get the jobOutputType property: [Required] Specifies the type of job. - * - * @return the jobOutputType value. - */ - @Override - public JobOutputType jobOutputType() { - return this.jobOutputType; - } - - /** - * Get the uri property: Output Asset URI. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: Output Asset URI. - * - * @param uri the uri value to set. - * @return the TritonModelJobOutput object itself. - */ - public TritonModelJobOutput withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the mode property: Output Asset Delivery Mode. - * - * @return the mode value. - */ - public OutputDeliveryMode mode() { - return this.mode; - } - - /** - * Set the mode property: Output Asset Delivery Mode. - * - * @param mode the mode value to set. - * @return the TritonModelJobOutput object itself. - */ - public TritonModelJobOutput withMode(OutputDeliveryMode mode) { - this.mode = mode; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TritonModelJobOutput withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TritonModelJobOutput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TritonModelJobOutput if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the TritonModelJobOutput. - */ - public static TritonModelJobOutput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TritonModelJobOutput deserializedTritonModelJobOutput = new TritonModelJobOutput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedTritonModelJobOutput.withDescription(reader.getString()); - } else if ("jobOutputType".equals(fieldName)) { - deserializedTritonModelJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedTritonModelJobOutput.uri = reader.getString(); - } else if ("mode".equals(fieldName)) { - deserializedTritonModelJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedTritonModelJobOutput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java deleted file mode 100644 index 916847f745a1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines an early termination policy that cancels a given percentage of runs at each evaluation interval. - */ -@Fluent -public final class TruncationSelectionPolicy extends EarlyTerminationPolicy { - /* - * [Required] Name of policy configuration - */ - private EarlyTerminationPolicyType policyType = EarlyTerminationPolicyType.TRUNCATION_SELECTION; - - /* - * The percentage of runs to cancel at each evaluation interval. - */ - private Integer truncationPercentage; - - /** - * Creates an instance of TruncationSelectionPolicy class. - */ - public TruncationSelectionPolicy() { - } - - /** - * Get the policyType property: [Required] Name of policy configuration. - * - * @return the policyType value. - */ - @Override - public EarlyTerminationPolicyType policyType() { - return this.policyType; - } - - /** - * Get the truncationPercentage property: The percentage of runs to cancel at each evaluation interval. - * - * @return the truncationPercentage value. - */ - public Integer truncationPercentage() { - return this.truncationPercentage; - } - - /** - * Set the truncationPercentage property: The percentage of runs to cancel at each evaluation interval. - * - * @param truncationPercentage the truncationPercentage value to set. - * @return the TruncationSelectionPolicy object itself. - */ - public TruncationSelectionPolicy withTruncationPercentage(Integer truncationPercentage) { - this.truncationPercentage = truncationPercentage; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TruncationSelectionPolicy withEvaluationInterval(Integer evaluationInterval) { - super.withEvaluationInterval(evaluationInterval); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TruncationSelectionPolicy withDelayEvaluation(Integer delayEvaluation) { - super.withDelayEvaluation(delayEvaluation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("evaluationInterval", evaluationInterval()); - jsonWriter.writeNumberField("delayEvaluation", delayEvaluation()); - jsonWriter.writeStringField("policyType", this.policyType == null ? null : this.policyType.toString()); - jsonWriter.writeNumberField("truncationPercentage", this.truncationPercentage); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TruncationSelectionPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TruncationSelectionPolicy if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TruncationSelectionPolicy. - */ - public static TruncationSelectionPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TruncationSelectionPolicy deserializedTruncationSelectionPolicy = new TruncationSelectionPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("evaluationInterval".equals(fieldName)) { - deserializedTruncationSelectionPolicy - .withEvaluationInterval(reader.getNullable(JsonReader::getInt)); - } else if ("delayEvaluation".equals(fieldName)) { - deserializedTruncationSelectionPolicy.withDelayEvaluation(reader.getNullable(JsonReader::getInt)); - } else if ("policyType".equals(fieldName)) { - deserializedTruncationSelectionPolicy.policyType - = EarlyTerminationPolicyType.fromString(reader.getString()); - } else if ("truncationPercentage".equals(fieldName)) { - deserializedTruncationSelectionPolicy.truncationPercentage = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedTruncationSelectionPolicy; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnderlyingResourceAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnderlyingResourceAction.java deleted file mode 100644 index 00e2aa9bf2c3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnderlyingResourceAction.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for UnderlyingResourceAction. - */ -public final class UnderlyingResourceAction extends ExpandableStringEnum { - /** - * Static value Delete for UnderlyingResourceAction. - */ - public static final UnderlyingResourceAction DELETE = fromString("Delete"); - - /** - * Static value Detach for UnderlyingResourceAction. - */ - public static final UnderlyingResourceAction DETACH = fromString("Detach"); - - /** - * Creates a new instance of UnderlyingResourceAction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public UnderlyingResourceAction() { - } - - /** - * Creates or finds a UnderlyingResourceAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding UnderlyingResourceAction. - */ - public static UnderlyingResourceAction fromString(String name) { - return fromString(name, UnderlyingResourceAction.class); - } - - /** - * Gets known UnderlyingResourceAction values. - * - * @return known UnderlyingResourceAction values. - */ - public static Collection values() { - return values(UnderlyingResourceAction.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.java deleted file mode 100644 index d99290f41221..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Unit of time measure - * - * The unit of time measurement for the specified VM price. Example: OneHour. - */ -public final class UnitOfMeasure extends ExpandableStringEnum { - /** - * Static value OneHour for UnitOfMeasure. - */ - public static final UnitOfMeasure ONE_HOUR = fromString("OneHour"); - - /** - * Creates a new instance of UnitOfMeasure value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public UnitOfMeasure() { - } - - /** - * Creates or finds a UnitOfMeasure from its string representation. - * - * @param name a name to look for. - * @return the corresponding UnitOfMeasure. - */ - public static UnitOfMeasure fromString(String name) { - return fromString(name, UnitOfMeasure.class); - } - - /** - * Gets known UnitOfMeasure values. - * - * @return known UnitOfMeasure values. - */ - public static Collection values() { - return values(UnitOfMeasure.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotas.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotas.java deleted file mode 100644 index 35ca7760247d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotas.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The properties for update Quota response. - */ -@Fluent -public final class UpdateWorkspaceQuotas implements JsonSerializable { - /* - * Specifies the resource ID. - */ - private String id; - - /* - * Specifies the resource type. - */ - private String type; - - /* - * The maximum permitted quota of the resource. - */ - private Long limit; - - /* - * An enum describing the unit of quota measurement. - */ - private QuotaUnit unit; - - /* - * Status of update workspace quota. - */ - private Status status; - - /** - * Creates an instance of UpdateWorkspaceQuotas class. - */ - public UpdateWorkspaceQuotas() { - } - - /** - * Get the id property: Specifies the resource ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the type property: Specifies the resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the limit property: The maximum permitted quota of the resource. - * - * @return the limit value. - */ - public Long limit() { - return this.limit; - } - - /** - * Set the limit property: The maximum permitted quota of the resource. - * - * @param limit the limit value to set. - * @return the UpdateWorkspaceQuotas object itself. - */ - public UpdateWorkspaceQuotas withLimit(Long limit) { - this.limit = limit; - return this; - } - - /** - * Get the unit property: An enum describing the unit of quota measurement. - * - * @return the unit value. - */ - public QuotaUnit unit() { - return this.unit; - } - - /** - * Get the status property: Status of update workspace quota. - * - * @return the status value. - */ - public Status status() { - return this.status; - } - - /** - * Set the status property: Status of update workspace quota. - * - * @param status the status value to set. - * @return the UpdateWorkspaceQuotas object itself. - */ - public UpdateWorkspaceQuotas withStatus(Status status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("limit", this.limit); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateWorkspaceQuotas from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateWorkspaceQuotas if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateWorkspaceQuotas. - */ - public static UpdateWorkspaceQuotas fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateWorkspaceQuotas deserializedUpdateWorkspaceQuotas = new UpdateWorkspaceQuotas(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedUpdateWorkspaceQuotas.id = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedUpdateWorkspaceQuotas.type = reader.getString(); - } else if ("limit".equals(fieldName)) { - deserializedUpdateWorkspaceQuotas.limit = reader.getNullable(JsonReader::getLong); - } else if ("unit".equals(fieldName)) { - deserializedUpdateWorkspaceQuotas.unit = QuotaUnit.fromString(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedUpdateWorkspaceQuotas.status = Status.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateWorkspaceQuotas; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotasResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotasResult.java deleted file mode 100644 index ed71dd79a1d0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotasResult.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner; -import java.util.List; - -/** - * An immutable client-side representation of UpdateWorkspaceQuotasResult. - */ -public interface UpdateWorkspaceQuotasResult { - /** - * Gets the value property: The list of workspace quota update result. - * - * @return the value value. - */ - List value(); - - /** - * Gets the nextLink property: The URI to fetch the next page of workspace quota update result. Call ListNext() with - * this to fetch the next page of Workspace Quota update result. - * - * @return the nextLink value. - */ - String nextLink(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner object. - * - * @return the inner object. - */ - UpdateWorkspaceQuotasResultInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileDataVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileDataVersion.java deleted file mode 100644 index febb0811f85a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileDataVersion.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * uri-file data version entity. - */ -@Fluent -public final class UriFileDataVersion extends DataVersionBaseProperties { - /* - * [Required] Specifies the type of data. - */ - private DataType dataType = DataType.URI_FILE; - - /** - * Creates an instance of UriFileDataVersion class. - */ - public UriFileDataVersion() { - } - - /** - * Get the dataType property: [Required] Specifies the type of data. - * - * @return the dataType value. - */ - @Override - public DataType dataType() { - return this.dataType; - } - - /** - * {@inheritDoc} - */ - @Override - public UriFileDataVersion withDataUri(String dataUri) { - super.withDataUri(dataUri); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UriFileDataVersion withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UriFileDataVersion withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UriFileDataVersion withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UriFileDataVersion withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UriFileDataVersion withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataUri", dataUri()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); - jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UriFileDataVersion from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UriFileDataVersion if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the UriFileDataVersion. - */ - public static UriFileDataVersion fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UriFileDataVersion deserializedUriFileDataVersion = new UriFileDataVersion(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("dataUri".equals(fieldName)) { - deserializedUriFileDataVersion.withDataUri(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedUriFileDataVersion.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedUriFileDataVersion.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedUriFileDataVersion.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedUriFileDataVersion.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("isAnonymous".equals(fieldName)) { - deserializedUriFileDataVersion.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); - } else if ("dataType".equals(fieldName)) { - deserializedUriFileDataVersion.dataType = DataType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedUriFileDataVersion; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobInput.java deleted file mode 100644 index e78e095795f9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobInput.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The UriFileJobInput model. - */ -@Fluent -public final class UriFileJobInput extends JobInput { - /* - * [Required] Specifies the type of job. - */ - private JobInputType jobInputType = JobInputType.URI_FILE; - - /* - * [Required] Input Asset URI. - */ - private String uri; - - /* - * Input Asset Delivery Mode. - */ - private InputDeliveryMode mode; - - /** - * Creates an instance of UriFileJobInput class. - */ - public UriFileJobInput() { - } - - /** - * Get the jobInputType property: [Required] Specifies the type of job. - * - * @return the jobInputType value. - */ - @Override - public JobInputType jobInputType() { - return this.jobInputType; - } - - /** - * Get the uri property: [Required] Input Asset URI. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: [Required] Input Asset URI. - * - * @param uri the uri value to set. - * @return the UriFileJobInput object itself. - */ - public UriFileJobInput withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the mode property: Input Asset Delivery Mode. - * - * @return the mode value. - */ - public InputDeliveryMode mode() { - return this.mode; - } - - /** - * Set the mode property: Input Asset Delivery Mode. - * - * @param mode the mode value to set. - * @return the UriFileJobInput object itself. - */ - public UriFileJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UriFileJobInput withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model UriFileJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UriFileJobInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("jobInputType", this.jobInputType == null ? null : this.jobInputType.toString()); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UriFileJobInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UriFileJobInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the UriFileJobInput. - */ - public static UriFileJobInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UriFileJobInput deserializedUriFileJobInput = new UriFileJobInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedUriFileJobInput.withDescription(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedUriFileJobInput.uri = reader.getString(); - } else if ("jobInputType".equals(fieldName)) { - deserializedUriFileJobInput.jobInputType = JobInputType.fromString(reader.getString()); - } else if ("mode".equals(fieldName)) { - deserializedUriFileJobInput.mode = InputDeliveryMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedUriFileJobInput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobOutput.java deleted file mode 100644 index c041cc90a364..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobOutput.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The UriFileJobOutput model. - */ -@Fluent -public final class UriFileJobOutput extends JobOutput { - /* - * [Required] Specifies the type of job. - */ - private JobOutputType jobOutputType = JobOutputType.URI_FILE; - - /* - * Output Asset URI. - */ - private String uri; - - /* - * Output Asset Delivery Mode. - */ - private OutputDeliveryMode mode; - - /** - * Creates an instance of UriFileJobOutput class. - */ - public UriFileJobOutput() { - } - - /** - * Get the jobOutputType property: [Required] Specifies the type of job. - * - * @return the jobOutputType value. - */ - @Override - public JobOutputType jobOutputType() { - return this.jobOutputType; - } - - /** - * Get the uri property: Output Asset URI. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: Output Asset URI. - * - * @param uri the uri value to set. - * @return the UriFileJobOutput object itself. - */ - public UriFileJobOutput withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the mode property: Output Asset Delivery Mode. - * - * @return the mode value. - */ - public OutputDeliveryMode mode() { - return this.mode; - } - - /** - * Set the mode property: Output Asset Delivery Mode. - * - * @param mode the mode value to set. - * @return the UriFileJobOutput object itself. - */ - public UriFileJobOutput withMode(OutputDeliveryMode mode) { - this.mode = mode; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UriFileJobOutput withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UriFileJobOutput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UriFileJobOutput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the UriFileJobOutput. - */ - public static UriFileJobOutput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UriFileJobOutput deserializedUriFileJobOutput = new UriFileJobOutput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedUriFileJobOutput.withDescription(reader.getString()); - } else if ("jobOutputType".equals(fieldName)) { - deserializedUriFileJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedUriFileJobOutput.uri = reader.getString(); - } else if ("mode".equals(fieldName)) { - deserializedUriFileJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedUriFileJobOutput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderDataVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderDataVersion.java deleted file mode 100644 index 0eb6c53ff5cb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderDataVersion.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * uri-folder data version entity. - */ -@Fluent -public final class UriFolderDataVersion extends DataVersionBaseProperties { - /* - * [Required] Specifies the type of data. - */ - private DataType dataType = DataType.URI_FOLDER; - - /** - * Creates an instance of UriFolderDataVersion class. - */ - public UriFolderDataVersion() { - } - - /** - * Get the dataType property: [Required] Specifies the type of data. - * - * @return the dataType value. - */ - @Override - public DataType dataType() { - return this.dataType; - } - - /** - * {@inheritDoc} - */ - @Override - public UriFolderDataVersion withDataUri(String dataUri) { - super.withDataUri(dataUri); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UriFolderDataVersion withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UriFolderDataVersion withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UriFolderDataVersion withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UriFolderDataVersion withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UriFolderDataVersion withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataUri", dataUri()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); - jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UriFolderDataVersion from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UriFolderDataVersion if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the UriFolderDataVersion. - */ - public static UriFolderDataVersion fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UriFolderDataVersion deserializedUriFolderDataVersion = new UriFolderDataVersion(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("dataUri".equals(fieldName)) { - deserializedUriFolderDataVersion.withDataUri(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedUriFolderDataVersion.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedUriFolderDataVersion.withTags(tags); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedUriFolderDataVersion.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedUriFolderDataVersion.withIsArchived(reader.getNullable(JsonReader::getBoolean)); - } else if ("isAnonymous".equals(fieldName)) { - deserializedUriFolderDataVersion.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); - } else if ("dataType".equals(fieldName)) { - deserializedUriFolderDataVersion.dataType = DataType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedUriFolderDataVersion; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobInput.java deleted file mode 100644 index c206211b1d17..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobInput.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The UriFolderJobInput model. - */ -@Fluent -public final class UriFolderJobInput extends JobInput { - /* - * [Required] Specifies the type of job. - */ - private JobInputType jobInputType = JobInputType.URI_FOLDER; - - /* - * [Required] Input Asset URI. - */ - private String uri; - - /* - * Input Asset Delivery Mode. - */ - private InputDeliveryMode mode; - - /** - * Creates an instance of UriFolderJobInput class. - */ - public UriFolderJobInput() { - } - - /** - * Get the jobInputType property: [Required] Specifies the type of job. - * - * @return the jobInputType value. - */ - @Override - public JobInputType jobInputType() { - return this.jobInputType; - } - - /** - * Get the uri property: [Required] Input Asset URI. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: [Required] Input Asset URI. - * - * @param uri the uri value to set. - * @return the UriFolderJobInput object itself. - */ - public UriFolderJobInput withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the mode property: Input Asset Delivery Mode. - * - * @return the mode value. - */ - public InputDeliveryMode mode() { - return this.mode; - } - - /** - * Set the mode property: Input Asset Delivery Mode. - * - * @param mode the mode value to set. - * @return the UriFolderJobInput object itself. - */ - public UriFolderJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UriFolderJobInput withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model UriFolderJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UriFolderJobInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("jobInputType", this.jobInputType == null ? null : this.jobInputType.toString()); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UriFolderJobInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UriFolderJobInput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the UriFolderJobInput. - */ - public static UriFolderJobInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UriFolderJobInput deserializedUriFolderJobInput = new UriFolderJobInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedUriFolderJobInput.withDescription(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedUriFolderJobInput.uri = reader.getString(); - } else if ("jobInputType".equals(fieldName)) { - deserializedUriFolderJobInput.jobInputType = JobInputType.fromString(reader.getString()); - } else if ("mode".equals(fieldName)) { - deserializedUriFolderJobInput.mode = InputDeliveryMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedUriFolderJobInput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobOutput.java deleted file mode 100644 index 1a9474aec429..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobOutput.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The UriFolderJobOutput model. - */ -@Fluent -public final class UriFolderJobOutput extends JobOutput { - /* - * [Required] Specifies the type of job. - */ - private JobOutputType jobOutputType = JobOutputType.URI_FOLDER; - - /* - * Output Asset URI. - */ - private String uri; - - /* - * Output Asset Delivery Mode. - */ - private OutputDeliveryMode mode; - - /** - * Creates an instance of UriFolderJobOutput class. - */ - public UriFolderJobOutput() { - } - - /** - * Get the jobOutputType property: [Required] Specifies the type of job. - * - * @return the jobOutputType value. - */ - @Override - public JobOutputType jobOutputType() { - return this.jobOutputType; - } - - /** - * Get the uri property: Output Asset URI. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: Output Asset URI. - * - * @param uri the uri value to set. - * @return the UriFolderJobOutput object itself. - */ - public UriFolderJobOutput withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the mode property: Output Asset Delivery Mode. - * - * @return the mode value. - */ - public OutputDeliveryMode mode() { - return this.mode; - } - - /** - * Set the mode property: Output Asset Delivery Mode. - * - * @param mode the mode value to set. - * @return the UriFolderJobOutput object itself. - */ - public UriFolderJobOutput withMode(OutputDeliveryMode mode) { - this.mode = mode; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UriFolderJobOutput withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UriFolderJobOutput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UriFolderJobOutput if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the UriFolderJobOutput. - */ - public static UriFolderJobOutput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UriFolderJobOutput deserializedUriFolderJobOutput = new UriFolderJobOutput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedUriFolderJobOutput.withDescription(reader.getString()); - } else if ("jobOutputType".equals(fieldName)) { - deserializedUriFolderJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedUriFolderJobOutput.uri = reader.getString(); - } else if ("mode".equals(fieldName)) { - deserializedUriFolderJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedUriFolderJobOutput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usage.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usage.java deleted file mode 100644 index 7ba869f98e85..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usage.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.UsageInner; - -/** - * An immutable client-side representation of Usage. - */ -public interface Usage { - /** - * Gets the id property: Specifies the resource ID. - * - * @return the id value. - */ - String id(); - - /** - * Gets the amlWorkspaceLocation property: Region of the AML workspace in the id. - * - * @return the amlWorkspaceLocation value. - */ - String amlWorkspaceLocation(); - - /** - * Gets the type property: Specifies the resource type. - * - * @return the type value. - */ - String type(); - - /** - * Gets the unit property: An enum describing the unit of usage measurement. - * - * @return the unit value. - */ - UsageUnit unit(); - - /** - * Gets the currentValue property: The current usage of the resource. - * - * @return the currentValue value. - */ - Long currentValue(); - - /** - * Gets the limit property: The maximum permitted usage of the resource. - * - * @return the limit value. - */ - Long limit(); - - /** - * Gets the name property: The name of the type of usage. - * - * @return the name value. - */ - UsageName name(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.UsageInner object. - * - * @return the inner object. - */ - UsageInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.java deleted file mode 100644 index a93cbc5c3571..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The Usage Names. - */ -@Immutable -public final class UsageName implements JsonSerializable { - /* - * The name of the resource. - */ - private String value; - - /* - * The localized name of the resource. - */ - private String localizedValue; - - /** - * Creates an instance of UsageName class. - */ - public UsageName() { - } - - /** - * Get the value property: The name of the resource. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Get the localizedValue property: The localized name of the resource. - * - * @return the localizedValue value. - */ - public String localizedValue() { - return this.localizedValue; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UsageName from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UsageName if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the UsageName. - */ - public static UsageName fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UsageName deserializedUsageName = new UsageName(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - deserializedUsageName.value = reader.getString(); - } else if ("localizedValue".equals(fieldName)) { - deserializedUsageName.localizedValue = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUsageName; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.java deleted file mode 100644 index 19c10a736702..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * An enum describing the unit of usage measurement. - */ -public final class UsageUnit extends ExpandableStringEnum { - /** - * Static value Count for UsageUnit. - */ - public static final UsageUnit COUNT = fromString("Count"); - - /** - * Creates a new instance of UsageUnit value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public UsageUnit() { - } - - /** - * Creates or finds a UsageUnit from its string representation. - * - * @param name a name to look for. - * @return the corresponding UsageUnit. - */ - public static UsageUnit fromString(String name) { - return fromString(name, UsageUnit.class); - } - - /** - * Gets known UsageUnit values. - * - * @return known UsageUnit values. - */ - public static Collection values() { - return values(UsageUnit.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usages.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usages.java deleted file mode 100644 index ac79b69d00ed..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usages.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.machinelearning.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of Usages. - */ -public interface Usages { - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @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 current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedIterable}. - */ - PagedIterable list(String location); - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @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 current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedIterable}. - */ - PagedIterable list(String location, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.java deleted file mode 100644 index 3f489592a3cb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Configure STL Decomposition of the time-series target column. - */ -public final class UseStl extends ExpandableStringEnum { - /** - * Static value None for UseStl. - */ - public static final UseStl NONE = fromString("None"); - - /** - * Static value Season for UseStl. - */ - public static final UseStl SEASON = fromString("Season"); - - /** - * Static value SeasonTrend for UseStl. - */ - public static final UseStl SEASON_TREND = fromString("SeasonTrend"); - - /** - * Creates a new instance of UseStl value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public UseStl() { - } - - /** - * Creates or finds a UseStl from its string representation. - * - * @param name a name to look for. - * @return the corresponding UseStl. - */ - public static UseStl fromString(String name) { - return fromString(name, UseStl.class); - } - - /** - * Gets known UseStl values. - * - * @return known UseStl values. - */ - public static Collection values() { - return values(UseStl.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAccountCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAccountCredentials.java deleted file mode 100644 index 414e4693e2a6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAccountCredentials.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Settings for user account that gets created on each on the nodes of a compute. - */ -@Fluent -public final class UserAccountCredentials implements JsonSerializable { - /* - * Name of the administrator user account which can be used to SSH to nodes. - */ - private String adminUsername; - - /* - * SSH public key of the administrator user account. - */ - private String adminUserSshPublicKey; - - /* - * Password of the administrator user account. - */ - private String adminUserPassword; - - /** - * Creates an instance of UserAccountCredentials class. - */ - public UserAccountCredentials() { - } - - /** - * Get the adminUsername property: Name of the administrator user account which can be used to SSH to nodes. - * - * @return the adminUsername value. - */ - public String adminUsername() { - return this.adminUsername; - } - - /** - * Set the adminUsername property: Name of the administrator user account which can be used to SSH to nodes. - * - * @param adminUsername the adminUsername value to set. - * @return the UserAccountCredentials object itself. - */ - public UserAccountCredentials withAdminUsername(String adminUsername) { - this.adminUsername = adminUsername; - return this; - } - - /** - * Get the adminUserSshPublicKey property: SSH public key of the administrator user account. - * - * @return the adminUserSshPublicKey value. - */ - public String adminUserSshPublicKey() { - return this.adminUserSshPublicKey; - } - - /** - * Set the adminUserSshPublicKey property: SSH public key of the administrator user account. - * - * @param adminUserSshPublicKey the adminUserSshPublicKey value to set. - * @return the UserAccountCredentials object itself. - */ - public UserAccountCredentials withAdminUserSshPublicKey(String adminUserSshPublicKey) { - this.adminUserSshPublicKey = adminUserSshPublicKey; - return this; - } - - /** - * Get the adminUserPassword property: Password of the administrator user account. - * - * @return the adminUserPassword value. - */ - public String adminUserPassword() { - return this.adminUserPassword; - } - - /** - * Set the adminUserPassword property: Password of the administrator user account. - * - * @param adminUserPassword the adminUserPassword value to set. - * @return the UserAccountCredentials object itself. - */ - public UserAccountCredentials withAdminUserPassword(String adminUserPassword) { - this.adminUserPassword = adminUserPassword; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (adminUsername() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property adminUsername in model UserAccountCredentials")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UserAccountCredentials.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("adminUserName", this.adminUsername); - jsonWriter.writeStringField("adminUserSshPublicKey", this.adminUserSshPublicKey); - jsonWriter.writeStringField("adminUserPassword", this.adminUserPassword); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserAccountCredentials from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserAccountCredentials if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the UserAccountCredentials. - */ - public static UserAccountCredentials fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserAccountCredentials deserializedUserAccountCredentials = new UserAccountCredentials(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("adminUserName".equals(fieldName)) { - deserializedUserAccountCredentials.adminUsername = reader.getString(); - } else if ("adminUserSshPublicKey".equals(fieldName)) { - deserializedUserAccountCredentials.adminUserSshPublicKey = reader.getString(); - } else if ("adminUserPassword".equals(fieldName)) { - deserializedUserAccountCredentials.adminUserPassword = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUserAccountCredentials; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.java deleted file mode 100644 index b667345fc50b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.UUID; - -/** - * User assigned identity properties. - */ -@Immutable -public final class UserAssignedIdentity implements JsonSerializable { - /* - * The principal ID of the assigned identity. - */ - private UUID principalId; - - /* - * The client ID of the assigned identity. - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserAssignedIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserAssignedIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the UserAssignedIdentity. - */ - public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserAssignedIdentity deserializedUserAssignedIdentity = new UserAssignedIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalId".equals(fieldName)) { - deserializedUserAssignedIdentity.principalId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedUserAssignedIdentity; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedAcrAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedAcrAccount.java deleted file mode 100644 index de673e1f3855..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedAcrAccount.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The UserCreatedAcrAccount model. - */ -@Fluent -public final class UserCreatedAcrAccount implements JsonSerializable { - /* - * ARM ResourceId of a resource - */ - private ArmResourceId armResourceId; - - /** - * Creates an instance of UserCreatedAcrAccount class. - */ - public UserCreatedAcrAccount() { - } - - /** - * Get the armResourceId property: ARM ResourceId of a resource. - * - * @return the armResourceId value. - */ - public ArmResourceId armResourceId() { - return this.armResourceId; - } - - /** - * Set the armResourceId property: ARM ResourceId of a resource. - * - * @param armResourceId the armResourceId value to set. - * @return the UserCreatedAcrAccount object itself. - */ - public UserCreatedAcrAccount withArmResourceId(ArmResourceId armResourceId) { - this.armResourceId = armResourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (armResourceId() != null) { - armResourceId().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("armResourceId", this.armResourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserCreatedAcrAccount from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserCreatedAcrAccount if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the UserCreatedAcrAccount. - */ - public static UserCreatedAcrAccount fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserCreatedAcrAccount deserializedUserCreatedAcrAccount = new UserCreatedAcrAccount(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("armResourceId".equals(fieldName)) { - deserializedUserCreatedAcrAccount.armResourceId = ArmResourceId.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUserCreatedAcrAccount; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedStorageAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedStorageAccount.java deleted file mode 100644 index 0845b3254b45..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedStorageAccount.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The UserCreatedStorageAccount model. - */ -@Fluent -public final class UserCreatedStorageAccount implements JsonSerializable { - /* - * ARM ResourceId of a resource - */ - private ArmResourceId armResourceId; - - /** - * Creates an instance of UserCreatedStorageAccount class. - */ - public UserCreatedStorageAccount() { - } - - /** - * Get the armResourceId property: ARM ResourceId of a resource. - * - * @return the armResourceId value. - */ - public ArmResourceId armResourceId() { - return this.armResourceId; - } - - /** - * Set the armResourceId property: ARM ResourceId of a resource. - * - * @param armResourceId the armResourceId value to set. - * @return the UserCreatedStorageAccount object itself. - */ - public UserCreatedStorageAccount withArmResourceId(ArmResourceId armResourceId) { - this.armResourceId = armResourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (armResourceId() != null) { - armResourceId().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("armResourceId", this.armResourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserCreatedStorageAccount from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserCreatedStorageAccount if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UserCreatedStorageAccount. - */ - public static UserCreatedStorageAccount fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserCreatedStorageAccount deserializedUserCreatedStorageAccount = new UserCreatedStorageAccount(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("armResourceId".equals(fieldName)) { - deserializedUserCreatedStorageAccount.armResourceId = ArmResourceId.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUserCreatedStorageAccount; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.java deleted file mode 100644 index ea36d31e153e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.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.machinelearning.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * User identity configuration. - */ -@Immutable -public final class UserIdentity extends IdentityConfiguration { - /* - * [Required] Specifies the type of identity framework. - */ - private IdentityConfigurationType identityType = IdentityConfigurationType.USER_IDENTITY; - - /** - * Creates an instance of UserIdentity class. - */ - public UserIdentity() { - } - - /** - * Get the identityType property: [Required] Specifies the type of identity framework. - * - * @return the identityType value. - */ - @Override - public IdentityConfigurationType identityType() { - return this.identityType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("identityType", this.identityType == null ? null : this.identityType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserIdentity if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the UserIdentity. - */ - public static UserIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserIdentity deserializedUserIdentity = new UserIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("identityType".equals(fieldName)) { - deserializedUserIdentity.identityType = IdentityConfigurationType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedUserIdentity; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java deleted file mode 100644 index 8877b608e63c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; - -/** - * The UsernamePasswordAuthTypeWorkspaceConnectionProperties model. - */ -@Fluent -public final class UsernamePasswordAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /* - * Authentication type of the connection target - */ - private ConnectionAuthType authType = ConnectionAuthType.USERNAME_PASSWORD; - - /* - * The credentials property. - */ - private WorkspaceConnectionUsernamePassword credentials; - - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - - /** - * Creates an instance of UsernamePasswordAuthTypeWorkspaceConnectionProperties class. - */ - public UsernamePasswordAuthTypeWorkspaceConnectionProperties() { - } - - /** - * Get the authType property: Authentication type of the connection target. - * - * @return the authType value. - */ - @Override - public ConnectionAuthType authType() { - return this.authType; - } - - /** - * Get the credentials property: The credentials property. - * - * @return the credentials value. - */ - public WorkspaceConnectionUsernamePassword credentials() { - return this.credentials; - } - - /** - * Set the credentials property: The credentials property. - * - * @param credentials the credentials value to set. - * @return the UsernamePasswordAuthTypeWorkspaceConnectionProperties object itself. - */ - public UsernamePasswordAuthTypeWorkspaceConnectionProperties - withCredentials(WorkspaceConnectionUsernamePassword credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. - */ - @Override - public ConnectionGroup group() { - return this.group; - } - - /** - * {@inheritDoc} - */ - @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { - super.withSharedUserList(sharedUserList); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", category() == null ? null : category().toString()); - jsonWriter.writeStringField("expiryTime", - expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); - jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); - jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("sharedUserList", sharedUserList(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeJsonField("credentials", this.credentials); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UsernamePasswordAuthTypeWorkspaceConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UsernamePasswordAuthTypeWorkspaceConnectionProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UsernamePasswordAuthTypeWorkspaceConnectionProperties. - */ - public static UsernamePasswordAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - UsernamePasswordAuthTypeWorkspaceConnectionProperties deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties - = new UsernamePasswordAuthTypeWorkspaceConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties - .withCategory(ConnectionCategory.fromString(reader.getString())); - } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); - } else if ("expiryTime".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); - } else if ("group".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); - } else if ("isSharedToAll".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties - .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); - } else if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); - } else if ("sharedUserList".equals(fieldName)) { - List sharedUserList = reader.readArray(reader1 -> reader1.getString()); - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties - .withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.authType - = ConnectionAuthType.fromString(reader.getString()); - } else if ("credentials".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.credentials - = WorkspaceConnectionUsernamePassword.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java deleted file mode 100644 index 901828b9bb87..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * OS type - * - * Operating system type used by the VM. - */ -public final class VMPriceOSType extends ExpandableStringEnum { - /** - * Static value Linux for VMPriceOSType. - */ - public static final VMPriceOSType LINUX = fromString("Linux"); - - /** - * Static value Windows for VMPriceOSType. - */ - public static final VMPriceOSType WINDOWS = fromString("Windows"); - - /** - * Creates a new instance of VMPriceOSType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public VMPriceOSType() { - } - - /** - * Creates or finds a VMPriceOSType from its string representation. - * - * @param name a name to look for. - * @return the corresponding VMPriceOSType. - */ - public static VMPriceOSType fromString(String name) { - return fromString(name, VMPriceOSType.class); - } - - /** - * Gets known VMPriceOSType values. - * - * @return known VMPriceOSType values. - */ - public static Collection values() { - return values(VMPriceOSType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.java deleted file mode 100644 index 9238b23803a2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * VM tier - * - * The type of the VM. - */ -public final class VMTier extends ExpandableStringEnum { - /** - * Static value Standard for VMTier. - */ - public static final VMTier STANDARD = fromString("Standard"); - - /** - * Static value LowPriority for VMTier. - */ - public static final VMTier LOW_PRIORITY = fromString("LowPriority"); - - /** - * Static value Spot for VMTier. - */ - public static final VMTier SPOT = fromString("Spot"); - - /** - * Creates a new instance of VMTier value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public VMTier() { - } - - /** - * Creates or finds a VMTier from its string representation. - * - * @param name a name to look for. - * @return the corresponding VMTier. - */ - public static VMTier fromString(String name) { - return fromString(name, VMTier.class); - } - - /** - * Gets known VMTier values. - * - * @return known VMTier values. - */ - public static Collection values() { - return values(VMTier.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java deleted file mode 100644 index f38129e5f772..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Metric computation method to use for validation metrics in image tasks. - */ -public final class ValidationMetricType extends ExpandableStringEnum { - /** - * Static value None for ValidationMetricType. - */ - public static final ValidationMetricType NONE = fromString("None"); - - /** - * Static value Coco for ValidationMetricType. - */ - public static final ValidationMetricType COCO = fromString("Coco"); - - /** - * Static value Voc for ValidationMetricType. - */ - public static final ValidationMetricType VOC = fromString("Voc"); - - /** - * Static value CocoVoc for ValidationMetricType. - */ - public static final ValidationMetricType COCO_VOC = fromString("CocoVoc"); - - /** - * Creates a new instance of ValidationMetricType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ValidationMetricType() { - } - - /** - * Creates or finds a ValidationMetricType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ValidationMetricType. - */ - public static ValidationMetricType fromString(String name) { - return fromString(name, ValidationMetricType.class); - } - - /** - * Gets known ValidationMetricType values. - * - * @return known ValidationMetricType values. - */ - public static Collection values() { - return values(ValidationMetricType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.java deleted file mode 100644 index 38e4b67e45df..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * format for the workspace connection value. - */ -public final class ValueFormat extends ExpandableStringEnum { - /** - * Static value JSON for ValueFormat. - */ - public static final ValueFormat JSON = fromString("JSON"); - - /** - * Creates a new instance of ValueFormat value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ValueFormat() { - } - - /** - * Creates or finds a ValueFormat from its string representation. - * - * @param name a name to look for. - * @return the corresponding ValueFormat. - */ - public static ValueFormat fromString(String name) { - return fromString(name, ValueFormat.class); - } - - /** - * Gets known ValueFormat values. - * - * @return known ValueFormat values. - */ - public static Collection values() { - return values(ValueFormat.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java deleted file mode 100644 index 976a0b7576b7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * A Machine Learning compute based on Azure Virtual Machines. - */ -@Fluent -public final class VirtualMachine extends Compute { - /* - * The type of compute - */ - private ComputeType computeType = ComputeType.VIRTUAL_MACHINE; - - /* - * The properties property. - */ - private VirtualMachineSchemaProperties properties; - - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - - /** - * Creates an instance of VirtualMachine class. - */ - public VirtualMachine() { - } - - /** - * Get the computeType property: The type of compute. - * - * @return the computeType value. - */ - @Override - public ComputeType computeType() { - return this.computeType; - } - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public VirtualMachineSchemaProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the VirtualMachine object itself. - */ - public VirtualMachine withProperties(VirtualMachineSchemaProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - - /** - * {@inheritDoc} - */ - @Override - public VirtualMachine withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VirtualMachine withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VirtualMachine withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VirtualMachine withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeLocation", computeLocation()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("resourceId", resourceId()); - jsonWriter.writeBooleanField("disableLocalAuth", disableLocalAuth()); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachine from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachine if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualMachine. - */ - public static VirtualMachine fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachine deserializedVirtualMachine = new VirtualMachine(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeLocation".equals(fieldName)) { - deserializedVirtualMachine.withComputeLocation(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedVirtualMachine.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedVirtualMachine.withDescription(reader.getString()); - } else if ("createdOn".equals(fieldName)) { - deserializedVirtualMachine.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("modifiedOn".equals(fieldName)) { - deserializedVirtualMachine.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("resourceId".equals(fieldName)) { - deserializedVirtualMachine.withResourceId(reader.getString()); - } else if ("provisioningErrors".equals(fieldName)) { - List provisioningErrors - = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedVirtualMachine.provisioningErrors = provisioningErrors; - } else if ("isAttachedCompute".equals(fieldName)) { - deserializedVirtualMachine.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); - } else if ("disableLocalAuth".equals(fieldName)) { - deserializedVirtualMachine.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); - } else if ("computeType".equals(fieldName)) { - deserializedVirtualMachine.computeType = ComputeType.fromString(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedVirtualMachine.properties = VirtualMachineSchemaProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachine; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.java deleted file mode 100644 index 4c26378b85de..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Virtual Machine image for Windows AML Compute. - */ -@Fluent -public final class VirtualMachineImage implements JsonSerializable { - /* - * Virtual Machine image path - */ - private String id; - - /** - * Creates an instance of VirtualMachineImage class. - */ - public VirtualMachineImage() { - } - - /** - * Get the id property: Virtual Machine image path. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Virtual Machine image path. - * - * @param id the id value to set. - * @return the VirtualMachineImage object itself. - */ - public VirtualMachineImage withId(String id) { - this.id = id; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property id in model VirtualMachineImage")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VirtualMachineImage.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineImage from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineImage if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VirtualMachineImage. - */ - public static VirtualMachineImage fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineImage deserializedVirtualMachineImage = new VirtualMachineImage(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedVirtualMachineImage.id = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineImage; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchema.java deleted file mode 100644 index e138d3304576..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchema.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The VirtualMachineSchema model. - */ -@Fluent -public class VirtualMachineSchema implements JsonSerializable { - /* - * The properties property. - */ - private VirtualMachineSchemaProperties properties; - - /** - * Creates an instance of VirtualMachineSchema class. - */ - public VirtualMachineSchema() { - } - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public VirtualMachineSchemaProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the VirtualMachineSchema object itself. - */ - public VirtualMachineSchema withProperties(VirtualMachineSchemaProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineSchema if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualMachineSchema. - */ - public static VirtualMachineSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineSchema deserializedVirtualMachineSchema = new VirtualMachineSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedVirtualMachineSchema.properties = VirtualMachineSchemaProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java deleted file mode 100644 index 8e6a7a887e1b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The VirtualMachineSchemaProperties model. - */ -@Fluent -public final class VirtualMachineSchemaProperties implements JsonSerializable { - /* - * Virtual Machine size - */ - private String virtualMachineSize; - - /* - * Port open for ssh connections. - */ - private Integer sshPort; - - /* - * Notebook server port open for ssh connections. - */ - private Integer notebookServerPort; - - /* - * Public IP address of the virtual machine. - */ - private String address; - - /* - * Admin credentials for virtual machine - */ - private VirtualMachineSshCredentials administratorAccount; - - /* - * Indicates whether this compute will be used for running notebooks. - */ - private Boolean isNotebookInstanceCompute; - - /** - * Creates an instance of VirtualMachineSchemaProperties class. - */ - public VirtualMachineSchemaProperties() { - } - - /** - * Get the virtualMachineSize property: Virtual Machine size. - * - * @return the virtualMachineSize value. - */ - public String virtualMachineSize() { - return this.virtualMachineSize; - } - - /** - * Set the virtualMachineSize property: Virtual Machine size. - * - * @param virtualMachineSize the virtualMachineSize value to set. - * @return the VirtualMachineSchemaProperties object itself. - */ - public VirtualMachineSchemaProperties withVirtualMachineSize(String virtualMachineSize) { - this.virtualMachineSize = virtualMachineSize; - return this; - } - - /** - * Get the sshPort property: Port open for ssh connections. - * - * @return the sshPort value. - */ - public Integer sshPort() { - return this.sshPort; - } - - /** - * Set the sshPort property: Port open for ssh connections. - * - * @param sshPort the sshPort value to set. - * @return the VirtualMachineSchemaProperties object itself. - */ - public VirtualMachineSchemaProperties withSshPort(Integer sshPort) { - this.sshPort = sshPort; - return this; - } - - /** - * Get the notebookServerPort property: Notebook server port open for ssh connections. - * - * @return the notebookServerPort value. - */ - public Integer notebookServerPort() { - return this.notebookServerPort; - } - - /** - * Set the notebookServerPort property: Notebook server port open for ssh connections. - * - * @param notebookServerPort the notebookServerPort value to set. - * @return the VirtualMachineSchemaProperties object itself. - */ - public VirtualMachineSchemaProperties withNotebookServerPort(Integer notebookServerPort) { - this.notebookServerPort = notebookServerPort; - return this; - } - - /** - * Get the address property: Public IP address of the virtual machine. - * - * @return the address value. - */ - public String address() { - return this.address; - } - - /** - * Set the address property: Public IP address of the virtual machine. - * - * @param address the address value to set. - * @return the VirtualMachineSchemaProperties object itself. - */ - public VirtualMachineSchemaProperties withAddress(String address) { - this.address = address; - return this; - } - - /** - * Get the administratorAccount property: Admin credentials for virtual machine. - * - * @return the administratorAccount value. - */ - public VirtualMachineSshCredentials administratorAccount() { - return this.administratorAccount; - } - - /** - * Set the administratorAccount property: Admin credentials for virtual machine. - * - * @param administratorAccount the administratorAccount value to set. - * @return the VirtualMachineSchemaProperties object itself. - */ - public VirtualMachineSchemaProperties withAdministratorAccount(VirtualMachineSshCredentials administratorAccount) { - this.administratorAccount = administratorAccount; - return this; - } - - /** - * Get the isNotebookInstanceCompute property: Indicates whether this compute will be used for running notebooks. - * - * @return the isNotebookInstanceCompute value. - */ - public Boolean isNotebookInstanceCompute() { - return this.isNotebookInstanceCompute; - } - - /** - * Set the isNotebookInstanceCompute property: Indicates whether this compute will be used for running notebooks. - * - * @param isNotebookInstanceCompute the isNotebookInstanceCompute value to set. - * @return the VirtualMachineSchemaProperties object itself. - */ - public VirtualMachineSchemaProperties withIsNotebookInstanceCompute(Boolean isNotebookInstanceCompute) { - this.isNotebookInstanceCompute = isNotebookInstanceCompute; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (administratorAccount() != null) { - administratorAccount().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("virtualMachineSize", this.virtualMachineSize); - jsonWriter.writeNumberField("sshPort", this.sshPort); - jsonWriter.writeNumberField("notebookServerPort", this.notebookServerPort); - jsonWriter.writeStringField("address", this.address); - jsonWriter.writeJsonField("administratorAccount", this.administratorAccount); - jsonWriter.writeBooleanField("isNotebookInstanceCompute", this.isNotebookInstanceCompute); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineSchemaProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineSchemaProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualMachineSchemaProperties. - */ - public static VirtualMachineSchemaProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineSchemaProperties deserializedVirtualMachineSchemaProperties - = new VirtualMachineSchemaProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("virtualMachineSize".equals(fieldName)) { - deserializedVirtualMachineSchemaProperties.virtualMachineSize = reader.getString(); - } else if ("sshPort".equals(fieldName)) { - deserializedVirtualMachineSchemaProperties.sshPort = reader.getNullable(JsonReader::getInt); - } else if ("notebookServerPort".equals(fieldName)) { - deserializedVirtualMachineSchemaProperties.notebookServerPort - = reader.getNullable(JsonReader::getInt); - } else if ("address".equals(fieldName)) { - deserializedVirtualMachineSchemaProperties.address = reader.getString(); - } else if ("administratorAccount".equals(fieldName)) { - deserializedVirtualMachineSchemaProperties.administratorAccount - = VirtualMachineSshCredentials.fromJson(reader); - } else if ("isNotebookInstanceCompute".equals(fieldName)) { - deserializedVirtualMachineSchemaProperties.isNotebookInstanceCompute - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineSchemaProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.java deleted file mode 100644 index a83c8ed0eb09..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; -import java.io.IOException; - -/** - * Secrets related to a Machine Learning compute based on AKS. - */ -@Fluent -public final class VirtualMachineSecrets extends ComputeSecretsInner { - /* - * The type of compute - */ - private ComputeType computeType = ComputeType.VIRTUAL_MACHINE; - - /* - * Admin credentials for virtual machine. - */ - private VirtualMachineSshCredentials administratorAccount; - - /** - * Creates an instance of VirtualMachineSecrets class. - */ - public VirtualMachineSecrets() { - } - - /** - * Get the computeType property: The type of compute. - * - * @return the computeType value. - */ - @Override - public ComputeType computeType() { - return this.computeType; - } - - /** - * Get the administratorAccount property: Admin credentials for virtual machine. - * - * @return the administratorAccount value. - */ - public VirtualMachineSshCredentials administratorAccount() { - return this.administratorAccount; - } - - /** - * Set the administratorAccount property: Admin credentials for virtual machine. - * - * @param administratorAccount the administratorAccount value to set. - * @return the VirtualMachineSecrets object itself. - */ - public VirtualMachineSecrets withAdministratorAccount(VirtualMachineSshCredentials administratorAccount) { - this.administratorAccount = administratorAccount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (administratorAccount() != null) { - administratorAccount().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - jsonWriter.writeJsonField("administratorAccount", this.administratorAccount); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineSecrets from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineSecrets if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualMachineSecrets. - */ - public static VirtualMachineSecrets fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineSecrets deserializedVirtualMachineSecrets = new VirtualMachineSecrets(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeType".equals(fieldName)) { - deserializedVirtualMachineSecrets.computeType = ComputeType.fromString(reader.getString()); - } else if ("administratorAccount".equals(fieldName)) { - deserializedVirtualMachineSecrets.administratorAccount - = VirtualMachineSshCredentials.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineSecrets; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecretsSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecretsSchema.java deleted file mode 100644 index 36e593c1553e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecretsSchema.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The VirtualMachineSecretsSchema model. - */ -@Fluent -public class VirtualMachineSecretsSchema implements JsonSerializable { - /* - * Admin credentials for virtual machine. - */ - private VirtualMachineSshCredentials administratorAccount; - - /** - * Creates an instance of VirtualMachineSecretsSchema class. - */ - public VirtualMachineSecretsSchema() { - } - - /** - * Get the administratorAccount property: Admin credentials for virtual machine. - * - * @return the administratorAccount value. - */ - public VirtualMachineSshCredentials administratorAccount() { - return this.administratorAccount; - } - - /** - * Set the administratorAccount property: Admin credentials for virtual machine. - * - * @param administratorAccount the administratorAccount value to set. - * @return the VirtualMachineSecretsSchema object itself. - */ - public VirtualMachineSecretsSchema withAdministratorAccount(VirtualMachineSshCredentials administratorAccount) { - this.administratorAccount = administratorAccount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (administratorAccount() != null) { - administratorAccount().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("administratorAccount", this.administratorAccount); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineSecretsSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineSecretsSchema if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualMachineSecretsSchema. - */ - public static VirtualMachineSecretsSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineSecretsSchema deserializedVirtualMachineSecretsSchema = new VirtualMachineSecretsSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("administratorAccount".equals(fieldName)) { - deserializedVirtualMachineSecretsSchema.administratorAccount - = VirtualMachineSshCredentials.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineSecretsSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSize.java deleted file mode 100644 index 16c7cd03dd41..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSize.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Describes the properties of a VM size. - */ -@Fluent -public final class VirtualMachineSize implements JsonSerializable { - /* - * The name of the virtual machine size. - */ - private String name; - - /* - * The family name of the virtual machine size. - */ - private String family; - - /* - * The number of vCPUs supported by the virtual machine size. - */ - private Integer vCPUs; - - /* - * The number of gPUs supported by the virtual machine size. - */ - private Integer gpus; - - /* - * The OS VHD disk size, in MB, allowed by the virtual machine size. - */ - private Integer osVhdSizeMB; - - /* - * The resource volume size, in MB, allowed by the virtual machine size. - */ - private Integer maxResourceVolumeMB; - - /* - * The amount of memory, in GB, supported by the virtual machine size. - */ - private Double memoryGB; - - /* - * Specifies if the virtual machine size supports low priority VMs. - */ - private Boolean lowPriorityCapable; - - /* - * Specifies if the virtual machine size supports premium IO. - */ - private Boolean premiumIO; - - /* - * The estimated price information for using a VM. - */ - private EstimatedVMPrices estimatedVMPrices; - - /* - * Specifies the compute types supported by the virtual machine size. - */ - private List supportedComputeTypes; - - /** - * Creates an instance of VirtualMachineSize class. - */ - public VirtualMachineSize() { - } - - /** - * Get the name property: The name of the virtual machine size. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the family property: The family name of the virtual machine size. - * - * @return the family value. - */ - public String family() { - return this.family; - } - - /** - * Get the vCPUs property: The number of vCPUs supported by the virtual machine size. - * - * @return the vCPUs value. - */ - public Integer vCPUs() { - return this.vCPUs; - } - - /** - * Get the gpus property: The number of gPUs supported by the virtual machine size. - * - * @return the gpus value. - */ - public Integer gpus() { - return this.gpus; - } - - /** - * Get the osVhdSizeMB property: The OS VHD disk size, in MB, allowed by the virtual machine size. - * - * @return the osVhdSizeMB value. - */ - public Integer osVhdSizeMB() { - return this.osVhdSizeMB; - } - - /** - * Get the maxResourceVolumeMB property: The resource volume size, in MB, allowed by the virtual machine size. - * - * @return the maxResourceVolumeMB value. - */ - public Integer maxResourceVolumeMB() { - return this.maxResourceVolumeMB; - } - - /** - * Get the memoryGB property: The amount of memory, in GB, supported by the virtual machine size. - * - * @return the memoryGB value. - */ - public Double memoryGB() { - return this.memoryGB; - } - - /** - * Get the lowPriorityCapable property: Specifies if the virtual machine size supports low priority VMs. - * - * @return the lowPriorityCapable value. - */ - public Boolean lowPriorityCapable() { - return this.lowPriorityCapable; - } - - /** - * Get the premiumIO property: Specifies if the virtual machine size supports premium IO. - * - * @return the premiumIO value. - */ - public Boolean premiumIO() { - return this.premiumIO; - } - - /** - * Get the estimatedVMPrices property: The estimated price information for using a VM. - * - * @return the estimatedVMPrices value. - */ - public EstimatedVMPrices estimatedVMPrices() { - return this.estimatedVMPrices; - } - - /** - * Set the estimatedVMPrices property: The estimated price information for using a VM. - * - * @param estimatedVMPrices the estimatedVMPrices value to set. - * @return the VirtualMachineSize object itself. - */ - public VirtualMachineSize withEstimatedVMPrices(EstimatedVMPrices estimatedVMPrices) { - this.estimatedVMPrices = estimatedVMPrices; - return this; - } - - /** - * Get the supportedComputeTypes property: Specifies the compute types supported by the virtual machine size. - * - * @return the supportedComputeTypes value. - */ - public List supportedComputeTypes() { - return this.supportedComputeTypes; - } - - /** - * Set the supportedComputeTypes property: Specifies the compute types supported by the virtual machine size. - * - * @param supportedComputeTypes the supportedComputeTypes value to set. - * @return the VirtualMachineSize object itself. - */ - public VirtualMachineSize withSupportedComputeTypes(List supportedComputeTypes) { - this.supportedComputeTypes = supportedComputeTypes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (estimatedVMPrices() != null) { - estimatedVMPrices().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("estimatedVMPrices", this.estimatedVMPrices); - jsonWriter.writeArrayField("supportedComputeTypes", this.supportedComputeTypes, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineSize from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineSize if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualMachineSize. - */ - public static VirtualMachineSize fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineSize deserializedVirtualMachineSize = new VirtualMachineSize(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedVirtualMachineSize.name = reader.getString(); - } else if ("family".equals(fieldName)) { - deserializedVirtualMachineSize.family = reader.getString(); - } else if ("vCPUs".equals(fieldName)) { - deserializedVirtualMachineSize.vCPUs = reader.getNullable(JsonReader::getInt); - } else if ("gpus".equals(fieldName)) { - deserializedVirtualMachineSize.gpus = reader.getNullable(JsonReader::getInt); - } else if ("osVhdSizeMB".equals(fieldName)) { - deserializedVirtualMachineSize.osVhdSizeMB = reader.getNullable(JsonReader::getInt); - } else if ("maxResourceVolumeMB".equals(fieldName)) { - deserializedVirtualMachineSize.maxResourceVolumeMB = reader.getNullable(JsonReader::getInt); - } else if ("memoryGB".equals(fieldName)) { - deserializedVirtualMachineSize.memoryGB = reader.getNullable(JsonReader::getDouble); - } else if ("lowPriorityCapable".equals(fieldName)) { - deserializedVirtualMachineSize.lowPriorityCapable = reader.getNullable(JsonReader::getBoolean); - } else if ("premiumIO".equals(fieldName)) { - deserializedVirtualMachineSize.premiumIO = reader.getNullable(JsonReader::getBoolean); - } else if ("estimatedVMPrices".equals(fieldName)) { - deserializedVirtualMachineSize.estimatedVMPrices = EstimatedVMPrices.fromJson(reader); - } else if ("supportedComputeTypes".equals(fieldName)) { - List supportedComputeTypes = reader.readArray(reader1 -> reader1.getString()); - deserializedVirtualMachineSize.supportedComputeTypes = supportedComputeTypes; - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineSize; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizeListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizeListResult.java deleted file mode 100644 index 12fcd41fc97a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizeListResult.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner; -import java.util.List; - -/** - * An immutable client-side representation of VirtualMachineSizeListResult. - */ -public interface VirtualMachineSizeListResult { - /** - * Gets the value property: The list of virtual machine sizes supported by AmlCompute. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner object. - * - * @return the inner object. - */ - VirtualMachineSizeListResultInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.java deleted file mode 100644 index 64fff606cc2c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.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.machinelearning.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of VirtualMachineSizes. - */ -public interface VirtualMachineSizes { - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @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 List Virtual Machine size operation response along with {@link Response}. - */ - Response listWithResponse(String location, Context context); - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @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 List Virtual Machine size operation response. - */ - VirtualMachineSizeListResult list(String location); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java deleted file mode 100644 index dc74b7811d46..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Admin credentials for virtual machine. - */ -@Fluent -public final class VirtualMachineSshCredentials implements JsonSerializable { - /* - * Username of admin account - */ - private String username; - - /* - * Password of admin account - */ - private String password; - - /* - * Public key data - */ - private String publicKeyData; - - /* - * Private key data - */ - private String privateKeyData; - - /** - * Creates an instance of VirtualMachineSshCredentials class. - */ - public VirtualMachineSshCredentials() { - } - - /** - * Get the username property: Username of admin account. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: Username of admin account. - * - * @param username the username value to set. - * @return the VirtualMachineSshCredentials object itself. - */ - public VirtualMachineSshCredentials withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: Password of admin account. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: Password of admin account. - * - * @param password the password value to set. - * @return the VirtualMachineSshCredentials object itself. - */ - public VirtualMachineSshCredentials withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the publicKeyData property: Public key data. - * - * @return the publicKeyData value. - */ - public String publicKeyData() { - return this.publicKeyData; - } - - /** - * Set the publicKeyData property: Public key data. - * - * @param publicKeyData the publicKeyData value to set. - * @return the VirtualMachineSshCredentials object itself. - */ - public VirtualMachineSshCredentials withPublicKeyData(String publicKeyData) { - this.publicKeyData = publicKeyData; - return this; - } - - /** - * Get the privateKeyData property: Private key data. - * - * @return the privateKeyData value. - */ - public String privateKeyData() { - return this.privateKeyData; - } - - /** - * Set the privateKeyData property: Private key data. - * - * @param privateKeyData the privateKeyData value to set. - * @return the VirtualMachineSshCredentials object itself. - */ - public VirtualMachineSshCredentials withPrivateKeyData(String privateKeyData) { - this.privateKeyData = privateKeyData; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("username", this.username); - jsonWriter.writeStringField("password", this.password); - jsonWriter.writeStringField("publicKeyData", this.publicKeyData); - jsonWriter.writeStringField("privateKeyData", this.privateKeyData); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineSshCredentials from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineSshCredentials if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualMachineSshCredentials. - */ - public static VirtualMachineSshCredentials fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineSshCredentials deserializedVirtualMachineSshCredentials = new VirtualMachineSshCredentials(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("username".equals(fieldName)) { - deserializedVirtualMachineSshCredentials.username = reader.getString(); - } else if ("password".equals(fieldName)) { - deserializedVirtualMachineSshCredentials.password = reader.getString(); - } else if ("publicKeyData".equals(fieldName)) { - deserializedVirtualMachineSshCredentials.publicKeyData = reader.getString(); - } else if ("privateKeyData".equals(fieldName)) { - deserializedVirtualMachineSshCredentials.privateKeyData = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineSshCredentials; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.java deleted file mode 100644 index 5752ee71ae0f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Virtual Machine priority. - */ -public final class VmPriority extends ExpandableStringEnum { - /** - * Static value Dedicated for VmPriority. - */ - public static final VmPriority DEDICATED = fromString("Dedicated"); - - /** - * Static value LowPriority for VmPriority. - */ - public static final VmPriority LOW_PRIORITY = fromString("LowPriority"); - - /** - * Creates a new instance of VmPriority value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public VmPriority() { - } - - /** - * Creates or finds a VmPriority from its string representation. - * - * @param name a name to look for. - * @return the corresponding VmPriority. - */ - public static VmPriority fromString(String name) { - return fromString(name, VmPriority.class); - } - - /** - * Gets known VmPriority values. - * - * @return known VmPriority values. - */ - public static Collection values() { - return values(VmPriority.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java deleted file mode 100644 index feb8f9f5cb4c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes the volume configuration for the container. - */ -@Fluent -public final class VolumeDefinition implements JsonSerializable { - /* - * Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe - */ - private VolumeDefinitionType type; - - /* - * Indicate whether to mount volume as readOnly. Default value for this is false. - */ - private Boolean readOnly; - - /* - * Source of the mount. For bind mounts this is the host path. - */ - private String source; - - /* - * Target of the mount. For bind mounts this is the path in the container. - */ - private String target; - - /* - * Consistency of the volume - */ - private String consistency; - - /* - * Bind Options of the mount - */ - private BindOptions bind; - - /* - * Volume Options of the mount - */ - private VolumeOptions volume; - - /* - * tmpfs option of the mount - */ - private TmpfsOptions tmpfs; - - /** - * Creates an instance of VolumeDefinition class. - */ - public VolumeDefinition() { - } - - /** - * Get the type property: Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. - * - * @return the type value. - */ - public VolumeDefinitionType type() { - return this.type; - } - - /** - * Set the type property: Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. - * - * @param type the type value to set. - * @return the VolumeDefinition object itself. - */ - public VolumeDefinition withType(VolumeDefinitionType type) { - this.type = type; - return this; - } - - /** - * Get the readOnly property: Indicate whether to mount volume as readOnly. Default value for this is false. - * - * @return the readOnly value. - */ - public Boolean readOnly() { - return this.readOnly; - } - - /** - * Set the readOnly property: Indicate whether to mount volume as readOnly. Default value for this is false. - * - * @param readOnly the readOnly value to set. - * @return the VolumeDefinition object itself. - */ - public VolumeDefinition withReadOnly(Boolean readOnly) { - this.readOnly = readOnly; - return this; - } - - /** - * Get the source property: Source of the mount. For bind mounts this is the host path. - * - * @return the source value. - */ - public String source() { - return this.source; - } - - /** - * Set the source property: Source of the mount. For bind mounts this is the host path. - * - * @param source the source value to set. - * @return the VolumeDefinition object itself. - */ - public VolumeDefinition withSource(String source) { - this.source = source; - return this; - } - - /** - * Get the target property: Target of the mount. For bind mounts this is the path in the container. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Set the target property: Target of the mount. For bind mounts this is the path in the container. - * - * @param target the target value to set. - * @return the VolumeDefinition object itself. - */ - public VolumeDefinition withTarget(String target) { - this.target = target; - return this; - } - - /** - * Get the consistency property: Consistency of the volume. - * - * @return the consistency value. - */ - public String consistency() { - return this.consistency; - } - - /** - * Set the consistency property: Consistency of the volume. - * - * @param consistency the consistency value to set. - * @return the VolumeDefinition object itself. - */ - public VolumeDefinition withConsistency(String consistency) { - this.consistency = consistency; - return this; - } - - /** - * Get the bind property: Bind Options of the mount. - * - * @return the bind value. - */ - public BindOptions bind() { - return this.bind; - } - - /** - * Set the bind property: Bind Options of the mount. - * - * @param bind the bind value to set. - * @return the VolumeDefinition object itself. - */ - public VolumeDefinition withBind(BindOptions bind) { - this.bind = bind; - return this; - } - - /** - * Get the volume property: Volume Options of the mount. - * - * @return the volume value. - */ - public VolumeOptions volume() { - return this.volume; - } - - /** - * Set the volume property: Volume Options of the mount. - * - * @param volume the volume value to set. - * @return the VolumeDefinition object itself. - */ - public VolumeDefinition withVolume(VolumeOptions volume) { - this.volume = volume; - return this; - } - - /** - * Get the tmpfs property: tmpfs option of the mount. - * - * @return the tmpfs value. - */ - public TmpfsOptions tmpfs() { - return this.tmpfs; - } - - /** - * Set the tmpfs property: tmpfs option of the mount. - * - * @param tmpfs the tmpfs value to set. - * @return the VolumeDefinition object itself. - */ - public VolumeDefinition withTmpfs(TmpfsOptions tmpfs) { - this.tmpfs = tmpfs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (bind() != null) { - bind().validate(); - } - if (volume() != null) { - volume().validate(); - } - if (tmpfs() != null) { - tmpfs().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeBooleanField("readOnly", this.readOnly); - jsonWriter.writeStringField("source", this.source); - jsonWriter.writeStringField("target", this.target); - jsonWriter.writeStringField("consistency", this.consistency); - jsonWriter.writeJsonField("bind", this.bind); - jsonWriter.writeJsonField("volume", this.volume); - jsonWriter.writeJsonField("tmpfs", this.tmpfs); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VolumeDefinition from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VolumeDefinition if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VolumeDefinition. - */ - public static VolumeDefinition fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VolumeDefinition deserializedVolumeDefinition = new VolumeDefinition(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedVolumeDefinition.type = VolumeDefinitionType.fromString(reader.getString()); - } else if ("readOnly".equals(fieldName)) { - deserializedVolumeDefinition.readOnly = reader.getNullable(JsonReader::getBoolean); - } else if ("source".equals(fieldName)) { - deserializedVolumeDefinition.source = reader.getString(); - } else if ("target".equals(fieldName)) { - deserializedVolumeDefinition.target = reader.getString(); - } else if ("consistency".equals(fieldName)) { - deserializedVolumeDefinition.consistency = reader.getString(); - } else if ("bind".equals(fieldName)) { - deserializedVolumeDefinition.bind = BindOptions.fromJson(reader); - } else if ("volume".equals(fieldName)) { - deserializedVolumeDefinition.volume = VolumeOptions.fromJson(reader); - } else if ("tmpfs".equals(fieldName)) { - deserializedVolumeDefinition.tmpfs = TmpfsOptions.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedVolumeDefinition; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.java deleted file mode 100644 index 531e3e662723..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of Volume Definition - * - * Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. - */ -public final class VolumeDefinitionType extends ExpandableStringEnum { - /** - * Static value bind for VolumeDefinitionType. - */ - public static final VolumeDefinitionType BIND = fromString("bind"); - - /** - * Static value volume for VolumeDefinitionType. - */ - public static final VolumeDefinitionType VOLUME = fromString("volume"); - - /** - * Static value tmpfs for VolumeDefinitionType. - */ - public static final VolumeDefinitionType TMPFS = fromString("tmpfs"); - - /** - * Static value npipe for VolumeDefinitionType. - */ - public static final VolumeDefinitionType NPIPE = fromString("npipe"); - - /** - * Creates a new instance of VolumeDefinitionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public VolumeDefinitionType() { - } - - /** - * Creates or finds a VolumeDefinitionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding VolumeDefinitionType. - */ - public static VolumeDefinitionType fromString(String name) { - return fromString(name, VolumeDefinitionType.class); - } - - /** - * Gets known VolumeDefinitionType values. - * - * @return known VolumeDefinitionType values. - */ - public static Collection values() { - return values(VolumeDefinitionType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.java deleted file mode 100644 index 3dd898251bce..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes the volume options for the container. - */ -@Fluent -public final class VolumeOptions implements JsonSerializable { - /* - * Indicate whether volume is nocopy - */ - private Boolean nocopy; - - /** - * Creates an instance of VolumeOptions class. - */ - public VolumeOptions() { - } - - /** - * Get the nocopy property: Indicate whether volume is nocopy. - * - * @return the nocopy value. - */ - public Boolean nocopy() { - return this.nocopy; - } - - /** - * Set the nocopy property: Indicate whether volume is nocopy. - * - * @param nocopy the nocopy value to set. - * @return the VolumeOptions object itself. - */ - public VolumeOptions withNocopy(Boolean nocopy) { - this.nocopy = nocopy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("nocopy", this.nocopy); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VolumeOptions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VolumeOptions if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VolumeOptions. - */ - public static VolumeOptions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VolumeOptions deserializedVolumeOptions = new VolumeOptions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nocopy".equals(fieldName)) { - deserializedVolumeOptions.nocopy = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedVolumeOptions; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Webhook.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Webhook.java deleted file mode 100644 index d651cec6663b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Webhook.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Webhook base. - */ -@Fluent -public class Webhook implements JsonSerializable { - /* - * [Required] Specifies the type of service to send a callback - */ - private WebhookType webhookType = WebhookType.fromString("Webhook"); - - /* - * Send callback on a specified notification event - */ - private String eventType; - - /** - * Creates an instance of Webhook class. - */ - public Webhook() { - } - - /** - * Get the webhookType property: [Required] Specifies the type of service to send a callback. - * - * @return the webhookType value. - */ - public WebhookType webhookType() { - return this.webhookType; - } - - /** - * Get the eventType property: Send callback on a specified notification event. - * - * @return the eventType value. - */ - public String eventType() { - return this.eventType; - } - - /** - * Set the eventType property: Send callback on a specified notification event. - * - * @param eventType the eventType value to set. - * @return the Webhook object itself. - */ - public Webhook withEventType(String eventType) { - this.eventType = eventType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("webhookType", this.webhookType == null ? null : this.webhookType.toString()); - jsonWriter.writeStringField("eventType", this.eventType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Webhook from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Webhook if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Webhook. - */ - public static Webhook fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("webhookType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("AzureDevOps".equals(discriminatorValue)) { - return AzureDevOpsWebhook.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static Webhook fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Webhook deserializedWebhook = new Webhook(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("webhookType".equals(fieldName)) { - deserializedWebhook.webhookType = WebhookType.fromString(reader.getString()); - } else if ("eventType".equals(fieldName)) { - deserializedWebhook.eventType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWebhook; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WebhookType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WebhookType.java deleted file mode 100644 index cd619bcfcb41..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WebhookType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine the webhook callback service type. - */ -public final class WebhookType extends ExpandableStringEnum { - /** - * Static value AzureDevOps for WebhookType. - */ - public static final WebhookType AZURE_DEV_OPS = fromString("AzureDevOps"); - - /** - * Creates a new instance of WebhookType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public WebhookType() { - } - - /** - * Creates or finds a WebhookType from its string representation. - * - * @param name a name to look for. - * @return the corresponding WebhookType. - */ - public static WebhookType fromString(String name) { - return fromString(name, WebhookType.class); - } - - /** - * Gets known WebhookType values. - * - * @return known WebhookType values. - */ - public static Collection values() { - return values(WebhookType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WeekDay.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WeekDay.java deleted file mode 100644 index 61743ceadefa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WeekDay.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum of weekday. - */ -public final class WeekDay extends ExpandableStringEnum { - /** - * Static value Monday for WeekDay. - */ - public static final WeekDay MONDAY = fromString("Monday"); - - /** - * Static value Tuesday for WeekDay. - */ - public static final WeekDay TUESDAY = fromString("Tuesday"); - - /** - * Static value Wednesday for WeekDay. - */ - public static final WeekDay WEDNESDAY = fromString("Wednesday"); - - /** - * Static value Thursday for WeekDay. - */ - public static final WeekDay THURSDAY = fromString("Thursday"); - - /** - * Static value Friday for WeekDay. - */ - public static final WeekDay FRIDAY = fromString("Friday"); - - /** - * Static value Saturday for WeekDay. - */ - public static final WeekDay SATURDAY = fromString("Saturday"); - - /** - * Static value Sunday for WeekDay. - */ - public static final WeekDay SUNDAY = fromString("Sunday"); - - /** - * Creates a new instance of WeekDay value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public WeekDay() { - } - - /** - * Creates or finds a WeekDay from its string representation. - * - * @param name a name to look for. - * @return the corresponding WeekDay. - */ - public static WeekDay fromString(String name) { - return fromString(name, WeekDay.class); - } - - /** - * Gets known WeekDay values. - * - * @return known WeekDay values. - */ - public static Collection values() { - return values(WeekDay.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java deleted file mode 100644 index 6b1658e955b3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java +++ /dev/null @@ -1,1222 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.ManagedNetworkSettingsInner; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner; -import java.util.List; -import java.util.Map; - -/** - * An immutable client-side representation of Workspace. - */ -public interface Workspace { - /** - * 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 identity property: The identity of the resource. - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the kind property: The kind property. - * - * @return the kind value. - */ - String kind(); - - /** - * Gets the location property: Specifies the location of the resource. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Contains resource tags defined as key/value pairs. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the sku property: The sku of the workspace. - * - * @return the sku value. - */ - Sku sku(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the workspaceId property: The immutable id associated with this workspace. - * - * @return the workspaceId value. - */ - String workspaceId(); - - /** - * Gets the description property: The description of this workspace. - * - * @return the description value. - */ - String description(); - - /** - * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @return the friendlyName value. - */ - String friendlyName(); - - /** - * Gets the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. - * - * @return the keyVault value. - */ - String keyVault(); - - /** - * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @return the applicationInsights value. - */ - String applicationInsights(); - - /** - * Gets the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @return the containerRegistry value. - */ - String containerRegistry(); - - /** - * Gets the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @return the storageAccount value. - */ - String storageAccount(); - - /** - * Gets the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning - * experimentation services. - * - * @return the discoveryUrl value. - */ - String discoveryUrl(); - - /** - * Gets the provisioningState property: The current deployment state of workspace resource. The provisioningState is - * to indicate states for resource provisioning. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the encryption property: The encryption settings of Azure ML workspace. - * - * @return the encryption value. - */ - EncryptionProperty encryption(); - - /** - * Gets the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. - * - * @return the hbiWorkspace value. - */ - Boolean hbiWorkspace(); - - /** - * Gets the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. - * - * @return the serviceProvisionedResourceGroup value. - */ - String serviceProvisionedResourceGroup(); - - /** - * Gets the privateLinkCount property: Count of private connections in the workspace. - * - * @return the privateLinkCount value. - */ - Integer privateLinkCount(); - - /** - * Gets the imageBuildCompute property: The compute name for image build. - * - * @return the imageBuildCompute value. - */ - String imageBuildCompute(); - - /** - * Gets the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when - * behind VNet. - * - * @return the allowPublicAccessWhenBehindVnet value. - */ - Boolean allowPublicAccessWhenBehindVnet(); - - /** - * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @return the publicNetworkAccess value. - */ - PublicNetworkAccess publicNetworkAccess(); - - /** - * Gets the privateEndpointConnections property: The list of private endpoint connections in the workspace. - * - * @return the privateEndpointConnections value. - */ - List privateEndpointConnections(); - - /** - * Gets the serverlessComputeSettings property: Settings for serverless compute created in the workspace. - * - * @return the serverlessComputeSettings value. - */ - ServerlessComputeSettings serverlessComputeSettings(); - - /** - * Gets the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. - * - * @return the sharedPrivateLinkResources value. - */ - List sharedPrivateLinkResources(); - - /** - * Gets the notebookInfo property: The notebook info of Azure ML workspace. - * - * @return the notebookInfo value. - */ - NotebookResourceInfo notebookInfo(); - - /** - * Gets the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @return the serviceManagedResourcesSettings value. - */ - ServiceManagedResourcesSettings serviceManagedResourcesSettings(); - - /** - * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @return the primaryUserAssignedIdentity value. - */ - String primaryUserAssignedIdentity(); - - /** - * Gets the tenantId property: The tenant id associated with this workspace. - * - * @return the tenantId value. - */ - String tenantId(); - - /** - * Gets the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) - * enabled. - * - * @return the storageHnsEnabled value. - */ - Boolean storageHnsEnabled(); - - /** - * Gets the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point - * at to set up tracking. - * - * @return the mlFlowTrackingUri value. - */ - String mlFlowTrackingUri(); - - /** - * Gets the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @return the v1LegacyMode value. - */ - Boolean v1LegacyMode(); - - /** - * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. - * - * @return the managedNetwork value. - */ - ManagedNetworkSettings managedNetwork(); - - /** - * Gets the featureStoreSettings property: Settings for feature store type workspace. - * - * @return the featureStoreSettings value. - */ - FeatureStoreSettings featureStoreSettings(); - - /** - * Gets the associatedWorkspaces property: The associatedWorkspaces property. - * - * @return the associatedWorkspaces value. - */ - List associatedWorkspaces(); - - /** - * Gets the enableDataIsolation property: The enableDataIsolation property. - * - * @return the enableDataIsolation value. - */ - Boolean enableDataIsolation(); - - /** - * Gets the hubResourceId property: The hubResourceId property. - * - * @return the hubResourceId value. - */ - String hubResourceId(); - - /** - * Gets the workspaceHubConfig property: WorkspaceHub's configuration object. - * - * @return the workspaceHubConfig value. - */ - WorkspaceHubConfig workspaceHubConfig(); - - /** - * 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.machinelearning.fluent.models.WorkspaceInner object. - * - * @return the inner object. - */ - WorkspaceInner innerModel(); - - /** - * The entirety of the Workspace definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The Workspace definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Workspace definition. - */ - interface Blank extends WithResourceGroup { - } - - /** - * The stage of the Workspace 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 Workspace 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.WithLocation, DefinitionStages.WithTags, DefinitionStages.WithIdentity, - DefinitionStages.WithKind, DefinitionStages.WithSku, DefinitionStages.WithDescription, - DefinitionStages.WithFriendlyName, DefinitionStages.WithKeyVault, DefinitionStages.WithApplicationInsights, - DefinitionStages.WithContainerRegistry, DefinitionStages.WithStorageAccount, - DefinitionStages.WithDiscoveryUrl, DefinitionStages.WithEncryption, DefinitionStages.WithHbiWorkspace, - DefinitionStages.WithImageBuildCompute, DefinitionStages.WithAllowPublicAccessWhenBehindVnet, - DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithServerlessComputeSettings, - DefinitionStages.WithSharedPrivateLinkResources, DefinitionStages.WithServiceManagedResourcesSettings, - DefinitionStages.WithPrimaryUserAssignedIdentity, DefinitionStages.WithV1LegacyMode, - DefinitionStages.WithManagedNetwork, DefinitionStages.WithFeatureStoreSettings, - DefinitionStages.WithAssociatedWorkspaces, DefinitionStages.WithEnableDataIsolation, - DefinitionStages.WithHubResourceId, DefinitionStages.WithWorkspaceHubConfig { - /** - * Executes the create request. - * - * @return the created resource. - */ - Workspace create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Workspace create(Context context); - } - - /** - * The stage of the Workspace definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location Specifies the location of the resource. - * @return the next definition stage. - */ - WithCreate withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location Specifies the location of the resource. - * @return the next definition stage. - */ - WithCreate withRegion(String location); - } - - /** - * The stage of the Workspace definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Contains resource tags defined as key/value pairs.. - * - * @param tags Contains resource tags defined as key/value pairs. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the Workspace definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The identity of the resource.. - * - * @param identity The identity of the resource. - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the Workspace definition allowing to specify kind. - */ - interface WithKind { - /** - * Specifies the kind property: The kind property.. - * - * @param kind The kind property. - * @return the next definition stage. - */ - WithCreate withKind(String kind); - } - - /** - * The stage of the Workspace definition allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: The sku of the workspace.. - * - * @param sku The sku of the workspace. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - - /** - * The stage of the Workspace definition allowing to specify description. - */ - interface WithDescription { - /** - * Specifies the description property: The description of this workspace.. - * - * @param description The description of this workspace. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - - /** - * The stage of the Workspace definition allowing to specify friendlyName. - */ - interface WithFriendlyName { - /** - * Specifies the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @param friendlyName The friendly name for this workspace. This name in mutable. - * @return the next definition stage. - */ - WithCreate withFriendlyName(String friendlyName); - } - - /** - * The stage of the Workspace definition allowing to specify keyVault. - */ - interface WithKeyVault { - /** - * Specifies the keyVault property: ARM id of the key vault associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @param keyVault ARM id of the key vault associated with this workspace. This cannot be changed once the - * workspace has been created. - * @return the next definition stage. - */ - WithCreate withKeyVault(String keyVault); - } - - /** - * The stage of the Workspace definition allowing to specify applicationInsights. - */ - interface WithApplicationInsights { - /** - * Specifies the applicationInsights property: ARM id of the application insights associated with this - * workspace.. - * - * @param applicationInsights ARM id of the application insights associated with this workspace. - * @return the next definition stage. - */ - WithCreate withApplicationInsights(String applicationInsights); - } - - /** - * The stage of the Workspace definition allowing to specify containerRegistry. - */ - interface WithContainerRegistry { - /** - * Specifies the containerRegistry property: ARM id of the container registry associated with this - * workspace.. - * - * @param containerRegistry ARM id of the container registry associated with this workspace. - * @return the next definition stage. - */ - WithCreate withContainerRegistry(String containerRegistry); - } - - /** - * The stage of the Workspace definition allowing to specify storageAccount. - */ - interface WithStorageAccount { - /** - * Specifies the storageAccount property: ARM id of the storage account associated with this workspace. This - * cannot be changed once the workspace has been created. - * - * @param storageAccount ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * @return the next definition stage. - */ - WithCreate withStorageAccount(String storageAccount); - } - - /** - * The stage of the Workspace definition allowing to specify discoveryUrl. - */ - interface WithDiscoveryUrl { - /** - * Specifies the discoveryUrl property: Url for the discovery service to identify regional endpoints for - * machine learning experimentation services. - * - * @param discoveryUrl Url for the discovery service to identify regional endpoints for machine learning - * experimentation services. - * @return the next definition stage. - */ - WithCreate withDiscoveryUrl(String discoveryUrl); - } - - /** - * The stage of the Workspace definition allowing to specify encryption. - */ - interface WithEncryption { - /** - * Specifies the encryption property: The encryption settings of Azure ML workspace.. - * - * @param encryption The encryption settings of Azure ML workspace. - * @return the next definition stage. - */ - WithCreate withEncryption(EncryptionProperty encryption); - } - - /** - * The stage of the Workspace definition allowing to specify hbiWorkspace. - */ - interface WithHbiWorkspace { - /** - * Specifies the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic - * data collected by the service. - * - * @param hbiWorkspace The flag to signal HBI data in the workspace and reduce diagnostic data collected by - * the service. - * @return the next definition stage. - */ - WithCreate withHbiWorkspace(Boolean hbiWorkspace); - } - - /** - * The stage of the Workspace definition allowing to specify imageBuildCompute. - */ - interface WithImageBuildCompute { - /** - * Specifies the imageBuildCompute property: The compute name for image build. - * - * @param imageBuildCompute The compute name for image build. - * @return the next definition stage. - */ - WithCreate withImageBuildCompute(String imageBuildCompute); - } - - /** - * The stage of the Workspace definition allowing to specify allowPublicAccessWhenBehindVnet. - */ - interface WithAllowPublicAccessWhenBehindVnet { - /** - * Specifies the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public - * access when behind VNet.. - * - * @param allowPublicAccessWhenBehindVnet The flag to indicate whether to allow public access when behind - * VNet. - * @return the next definition stage. - */ - WithCreate withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet); - } - - /** - * The stage of the Workspace definition allowing to specify publicNetworkAccess. - */ - interface WithPublicNetworkAccess { - /** - * Specifies the publicNetworkAccess property: Whether requests from Public Network are allowed.. - * - * @param publicNetworkAccess Whether requests from Public Network are allowed. - * @return the next definition stage. - */ - WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); - } - - /** - * The stage of the Workspace definition allowing to specify serverlessComputeSettings. - */ - interface WithServerlessComputeSettings { - /** - * Specifies the serverlessComputeSettings property: Settings for serverless compute created in the - * workspace. - * - * @param serverlessComputeSettings Settings for serverless compute created in the workspace. - * @return the next definition stage. - */ - WithCreate withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings); - } - - /** - * The stage of the Workspace definition allowing to specify sharedPrivateLinkResources. - */ - interface WithSharedPrivateLinkResources { - /** - * Specifies the sharedPrivateLinkResources property: The list of shared private link resources in this - * workspace.. - * - * @param sharedPrivateLinkResources The list of shared private link resources in this workspace. - * @return the next definition stage. - */ - WithCreate withSharedPrivateLinkResources(List sharedPrivateLinkResources); - } - - /** - * The stage of the Workspace definition allowing to specify serviceManagedResourcesSettings. - */ - interface WithServiceManagedResourcesSettings { - /** - * Specifies the serviceManagedResourcesSettings property: The service managed resource settings.. - * - * @param serviceManagedResourcesSettings The service managed resource settings. - * @return the next definition stage. - */ - WithCreate - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings); - } - - /** - * The stage of the Workspace definition allowing to specify primaryUserAssignedIdentity. - */ - interface WithPrimaryUserAssignedIdentity { - /** - * Specifies the primaryUserAssignedIdentity property: The user assigned identity resource id that - * represents the workspace identity.. - * - * @param primaryUserAssignedIdentity The user assigned identity resource id that represents the workspace - * identity. - * @return the next definition stage. - */ - WithCreate withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity); - } - - /** - * The stage of the Workspace definition allowing to specify v1LegacyMode. - */ - interface WithV1LegacyMode { - /** - * Specifies the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided - * by the v2 API.. - * - * @param v1LegacyMode Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. - * @return the next definition stage. - */ - WithCreate withV1LegacyMode(Boolean v1LegacyMode); - } - - /** - * The stage of the Workspace definition allowing to specify managedNetwork. - */ - interface WithManagedNetwork { - /** - * Specifies the managedNetwork property: Managed Network settings for a machine learning workspace.. - * - * @param managedNetwork Managed Network settings for a machine learning workspace. - * @return the next definition stage. - */ - WithCreate withManagedNetwork(ManagedNetworkSettingsInner managedNetwork); - } - - /** - * The stage of the Workspace definition allowing to specify featureStoreSettings. - */ - interface WithFeatureStoreSettings { - /** - * Specifies the featureStoreSettings property: Settings for feature store type workspace.. - * - * @param featureStoreSettings Settings for feature store type workspace. - * @return the next definition stage. - */ - WithCreate withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings); - } - - /** - * The stage of the Workspace definition allowing to specify associatedWorkspaces. - */ - interface WithAssociatedWorkspaces { - /** - * Specifies the associatedWorkspaces property: The associatedWorkspaces property.. - * - * @param associatedWorkspaces The associatedWorkspaces property. - * @return the next definition stage. - */ - WithCreate withAssociatedWorkspaces(List associatedWorkspaces); - } - - /** - * The stage of the Workspace definition allowing to specify enableDataIsolation. - */ - interface WithEnableDataIsolation { - /** - * Specifies the enableDataIsolation property: The enableDataIsolation property.. - * - * @param enableDataIsolation The enableDataIsolation property. - * @return the next definition stage. - */ - WithCreate withEnableDataIsolation(Boolean enableDataIsolation); - } - - /** - * The stage of the Workspace definition allowing to specify hubResourceId. - */ - interface WithHubResourceId { - /** - * Specifies the hubResourceId property: The hubResourceId property.. - * - * @param hubResourceId The hubResourceId property. - * @return the next definition stage. - */ - WithCreate withHubResourceId(String hubResourceId); - } - - /** - * The stage of the Workspace definition allowing to specify workspaceHubConfig. - */ - interface WithWorkspaceHubConfig { - /** - * Specifies the workspaceHubConfig property: WorkspaceHub's configuration object.. - * - * @param workspaceHubConfig WorkspaceHub's configuration object. - * @return the next definition stage. - */ - WithCreate withWorkspaceHubConfig(WorkspaceHubConfig workspaceHubConfig); - } - } - - /** - * Begins update for the Workspace resource. - * - * @return the stage of resource update. - */ - Workspace.Update update(); - - /** - * The template for Workspace update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, UpdateStages.WithIdentity, - UpdateStages.WithDescription, UpdateStages.WithFriendlyName, UpdateStages.WithImageBuildCompute, - UpdateStages.WithServiceManagedResourcesSettings, UpdateStages.WithPrimaryUserAssignedIdentity, - UpdateStages.WithServerlessComputeSettings, UpdateStages.WithPublicNetworkAccess, - UpdateStages.WithApplicationInsights, UpdateStages.WithContainerRegistry, UpdateStages.WithFeatureStoreSettings, - UpdateStages.WithManagedNetwork, UpdateStages.WithEnableDataIsolation, UpdateStages.WithV1LegacyMode, - UpdateStages.WithEncryption { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Workspace apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Workspace apply(Context context); - } - - /** - * The Workspace update stages. - */ - interface UpdateStages { - /** - * The stage of the Workspace update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: The resource tags for the machine learning workspace.. - * - * @param tags The resource tags for the machine learning workspace. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the Workspace update allowing to specify sku. - */ - interface WithSku { - /** - * Specifies the sku property: The sku of the workspace.. - * - * @param sku The sku of the workspace. - * @return the next definition stage. - */ - Update withSku(Sku sku); - } - - /** - * The stage of the Workspace update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The identity of the resource.. - * - * @param identity The identity of the resource. - * @return the next definition stage. - */ - Update withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the Workspace update allowing to specify description. - */ - interface WithDescription { - /** - * Specifies the description property: The description of this workspace.. - * - * @param description The description of this workspace. - * @return the next definition stage. - */ - Update withDescription(String description); - } - - /** - * The stage of the Workspace update allowing to specify friendlyName. - */ - interface WithFriendlyName { - /** - * Specifies the friendlyName property: The friendly name for this workspace.. - * - * @param friendlyName The friendly name for this workspace. - * @return the next definition stage. - */ - Update withFriendlyName(String friendlyName); - } - - /** - * The stage of the Workspace update allowing to specify imageBuildCompute. - */ - interface WithImageBuildCompute { - /** - * Specifies the imageBuildCompute property: The compute name for image build. - * - * @param imageBuildCompute The compute name for image build. - * @return the next definition stage. - */ - Update withImageBuildCompute(String imageBuildCompute); - } - - /** - * The stage of the Workspace update allowing to specify serviceManagedResourcesSettings. - */ - interface WithServiceManagedResourcesSettings { - /** - * Specifies the serviceManagedResourcesSettings property: The service managed resource settings.. - * - * @param serviceManagedResourcesSettings The service managed resource settings. - * @return the next definition stage. - */ - Update withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings); - } - - /** - * The stage of the Workspace update allowing to specify primaryUserAssignedIdentity. - */ - interface WithPrimaryUserAssignedIdentity { - /** - * Specifies the primaryUserAssignedIdentity property: The user assigned identity resource id that - * represents the workspace identity.. - * - * @param primaryUserAssignedIdentity The user assigned identity resource id that represents the workspace - * identity. - * @return the next definition stage. - */ - Update withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity); - } - - /** - * The stage of the Workspace update allowing to specify serverlessComputeSettings. - */ - interface WithServerlessComputeSettings { - /** - * Specifies the serverlessComputeSettings property: Settings for serverless compute created in the - * workspace. - * - * @param serverlessComputeSettings Settings for serverless compute created in the workspace. - * @return the next definition stage. - */ - Update withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings); - } - - /** - * The stage of the Workspace update allowing to specify publicNetworkAccess. - */ - interface WithPublicNetworkAccess { - /** - * Specifies the publicNetworkAccess property: Whether requests from Public Network are allowed.. - * - * @param publicNetworkAccess Whether requests from Public Network are allowed. - * @return the next definition stage. - */ - Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); - } - - /** - * The stage of the Workspace update allowing to specify applicationInsights. - */ - interface WithApplicationInsights { - /** - * Specifies the applicationInsights property: ARM id of the application insights associated with this - * workspace.. - * - * @param applicationInsights ARM id of the application insights associated with this workspace. - * @return the next definition stage. - */ - Update withApplicationInsights(String applicationInsights); - } - - /** - * The stage of the Workspace update allowing to specify containerRegistry. - */ - interface WithContainerRegistry { - /** - * Specifies the containerRegistry property: ARM id of the container registry associated with this - * workspace.. - * - * @param containerRegistry ARM id of the container registry associated with this workspace. - * @return the next definition stage. - */ - Update withContainerRegistry(String containerRegistry); - } - - /** - * The stage of the Workspace update allowing to specify featureStoreSettings. - */ - interface WithFeatureStoreSettings { - /** - * Specifies the featureStoreSettings property: Settings for feature store type workspace.. - * - * @param featureStoreSettings Settings for feature store type workspace. - * @return the next definition stage. - */ - Update withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings); - } - - /** - * The stage of the Workspace update allowing to specify managedNetwork. - */ - interface WithManagedNetwork { - /** - * Specifies the managedNetwork property: Managed Network settings for a machine learning workspace.. - * - * @param managedNetwork Managed Network settings for a machine learning workspace. - * @return the next definition stage. - */ - Update withManagedNetwork(ManagedNetworkSettingsInner managedNetwork); - } - - /** - * The stage of the Workspace update allowing to specify enableDataIsolation. - */ - interface WithEnableDataIsolation { - /** - * Specifies the enableDataIsolation property: The enableDataIsolation property.. - * - * @param enableDataIsolation The enableDataIsolation property. - * @return the next definition stage. - */ - Update withEnableDataIsolation(Boolean enableDataIsolation); - } - - /** - * The stage of the Workspace update allowing to specify v1LegacyMode. - */ - interface WithV1LegacyMode { - /** - * Specifies the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided - * by the v2 API.. - * - * @param v1LegacyMode Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. - * @return the next definition stage. - */ - Update withV1LegacyMode(Boolean v1LegacyMode); - } - - /** - * The stage of the Workspace update allowing to specify encryption. - */ - interface WithEncryption { - /** - * Specifies the encryption property: The encryption property.. - * - * @param encryption The encryption property. - * @return the next definition stage. - */ - Update withEncryption(EncryptionUpdateProperties encryption); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Workspace refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Workspace refresh(Context context); - - /** - * Diagnose workspace setup issue. - * - * @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 response. - */ - DiagnoseResponseResult diagnose(); - - /** - * Diagnose workspace setup issue. - * - * @param parameters The parameter of diagnosing workspace health. - * @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 response. - */ - DiagnoseResponseResult diagnose(DiagnoseWorkspaceParameters parameters, Context context); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @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 response body along with {@link Response}. - */ - Response listKeysWithResponse(Context context); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @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 response. - */ - ListWorkspaceKeysResult listKeys(); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @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. - */ - void resyncKeys(); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @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. - */ - void resyncKeys(Context context); - - /** - * return notebook access token and refresh token. - * - * @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 response body along with {@link Response}. - */ - Response listNotebookAccessTokenWithResponse(Context context); - - /** - * return notebook access token and refresh token. - * - * @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 response. - */ - NotebookAccessTokenResult listNotebookAccessToken(); - - /** - * Prepare a notebook. - * - * @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 response. - */ - NotebookResourceInfo prepareNotebook(); - - /** - * Prepare a notebook. - * - * @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 response. - */ - NotebookResourceInfo prepareNotebook(Context context); - - /** - * List storage account keys of a workspace. - * - * @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 response body along with {@link Response}. - */ - Response listStorageAccountKeysWithResponse(Context context); - - /** - * List storage account keys of a workspace. - * - * @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 response. - */ - ListStorageAccountKeysResult listStorageAccountKeys(); - - /** - * List keys of a notebook. - * - * @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 response body along with {@link Response}. - */ - Response listNotebookKeysWithResponse(Context context); - - /** - * List keys of a notebook. - * - * @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 response. - */ - ListNotebookKeysResult listNotebookKeys(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccessKey.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccessKey.java deleted file mode 100644 index 263d51da4983..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccessKey.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The WorkspaceConnectionAccessKey model. - */ -@Fluent -public final class WorkspaceConnectionAccessKey implements JsonSerializable { - /* - * The accessKeyId property. - */ - private String accessKeyId; - - /* - * The secretAccessKey property. - */ - private String secretAccessKey; - - /** - * Creates an instance of WorkspaceConnectionAccessKey class. - */ - public WorkspaceConnectionAccessKey() { - } - - /** - * Get the accessKeyId property: The accessKeyId property. - * - * @return the accessKeyId value. - */ - public String accessKeyId() { - return this.accessKeyId; - } - - /** - * Set the accessKeyId property: The accessKeyId property. - * - * @param accessKeyId the accessKeyId value to set. - * @return the WorkspaceConnectionAccessKey object itself. - */ - public WorkspaceConnectionAccessKey withAccessKeyId(String accessKeyId) { - this.accessKeyId = accessKeyId; - return this; - } - - /** - * Get the secretAccessKey property: The secretAccessKey property. - * - * @return the secretAccessKey value. - */ - public String secretAccessKey() { - return this.secretAccessKey; - } - - /** - * Set the secretAccessKey property: The secretAccessKey property. - * - * @param secretAccessKey the secretAccessKey value to set. - * @return the WorkspaceConnectionAccessKey object itself. - */ - public WorkspaceConnectionAccessKey withSecretAccessKey(String secretAccessKey) { - this.secretAccessKey = secretAccessKey; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("accessKeyId", this.accessKeyId); - jsonWriter.writeStringField("secretAccessKey", this.secretAccessKey); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceConnectionAccessKey from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceConnectionAccessKey if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkspaceConnectionAccessKey. - */ - public static WorkspaceConnectionAccessKey fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceConnectionAccessKey deserializedWorkspaceConnectionAccessKey = new WorkspaceConnectionAccessKey(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("accessKeyId".equals(fieldName)) { - deserializedWorkspaceConnectionAccessKey.accessKeyId = reader.getString(); - } else if ("secretAccessKey".equals(fieldName)) { - deserializedWorkspaceConnectionAccessKey.secretAccessKey = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceConnectionAccessKey; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccountKey.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccountKey.java deleted file mode 100644 index 8ef9051a7165..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccountKey.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The WorkspaceConnectionAccountKey model. - */ -@Fluent -public final class WorkspaceConnectionAccountKey implements JsonSerializable { - /* - * The key property. - */ - private String key; - - /** - * Creates an instance of WorkspaceConnectionAccountKey class. - */ - public WorkspaceConnectionAccountKey() { - } - - /** - * Get the key property: The key property. - * - * @return the key value. - */ - public String key() { - return this.key; - } - - /** - * Set the key property: The key property. - * - * @param key the key value to set. - * @return the WorkspaceConnectionAccountKey object itself. - */ - public WorkspaceConnectionAccountKey withKey(String key) { - this.key = key; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("key", this.key); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceConnectionAccountKey from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceConnectionAccountKey if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkspaceConnectionAccountKey. - */ - public static WorkspaceConnectionAccountKey fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceConnectionAccountKey deserializedWorkspaceConnectionAccountKey - = new WorkspaceConnectionAccountKey(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("key".equals(fieldName)) { - deserializedWorkspaceConnectionAccountKey.key = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceConnectionAccountKey; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionApiKey.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionApiKey.java deleted file mode 100644 index 68ca9ba9b279..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionApiKey.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Api key object for workspace connection credential. - */ -@Fluent -public final class WorkspaceConnectionApiKey implements JsonSerializable { - /* - * The key property. - */ - private String key; - - /** - * Creates an instance of WorkspaceConnectionApiKey class. - */ - public WorkspaceConnectionApiKey() { - } - - /** - * Get the key property: The key property. - * - * @return the key value. - */ - public String key() { - return this.key; - } - - /** - * Set the key property: The key property. - * - * @param key the key value to set. - * @return the WorkspaceConnectionApiKey object itself. - */ - public WorkspaceConnectionApiKey withKey(String key) { - this.key = key; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("key", this.key); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceConnectionApiKey from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceConnectionApiKey if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkspaceConnectionApiKey. - */ - public static WorkspaceConnectionApiKey fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceConnectionApiKey deserializedWorkspaceConnectionApiKey = new WorkspaceConnectionApiKey(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("key".equals(fieldName)) { - deserializedWorkspaceConnectionApiKey.key = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceConnectionApiKey; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java deleted file mode 100644 index 8868888c833f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The WorkspaceConnectionManagedIdentity model. - */ -@Fluent -public final class WorkspaceConnectionManagedIdentity implements JsonSerializable { - /* - * The resourceId property. - */ - private String resourceId; - - /* - * The clientId property. - */ - private String clientId; - - /** - * Creates an instance of WorkspaceConnectionManagedIdentity class. - */ - public WorkspaceConnectionManagedIdentity() { - } - - /** - * Get the resourceId property: The resourceId property. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: The resourceId property. - * - * @param resourceId the resourceId value to set. - * @return the WorkspaceConnectionManagedIdentity object itself. - */ - public WorkspaceConnectionManagedIdentity withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the clientId property: The clientId property. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: The clientId property. - * - * @param clientId the clientId value to set. - * @return the WorkspaceConnectionManagedIdentity object itself. - */ - public WorkspaceConnectionManagedIdentity withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceId", this.resourceId); - jsonWriter.writeStringField("clientId", this.clientId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceConnectionManagedIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceConnectionManagedIdentity if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkspaceConnectionManagedIdentity. - */ - public static WorkspaceConnectionManagedIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceConnectionManagedIdentity deserializedWorkspaceConnectionManagedIdentity - = new WorkspaceConnectionManagedIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceId".equals(fieldName)) { - deserializedWorkspaceConnectionManagedIdentity.resourceId = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedWorkspaceConnectionManagedIdentity.clientId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceConnectionManagedIdentity; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionOAuth2.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionOAuth2.java deleted file mode 100644 index bf543303d6e9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionOAuth2.java +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Objects; -import java.util.UUID; - -/** - * ClientId and ClientSecret are required. Other properties are optional - * depending on each OAuth2 provider's implementation. - */ -@Fluent -public final class WorkspaceConnectionOAuth2 implements JsonSerializable { - /* - * Required by Concur connection category - */ - private String authUrl; - - /* - * Client id in the format of UUID - */ - private UUID clientId; - - /* - * The clientSecret property. - */ - private String clientSecret; - - /* - * Required by GoogleAdWords connection category - */ - private String developerToken; - - /* - * The password property. - */ - private String password; - - /* - * Required by GoogleBigQuery, GoogleAdWords, Hubspot, QuickBooks, Square, Xero, Zoho - * where user needs to get RefreshToken offline - */ - private String refreshToken; - - /* - * Required by QuickBooks and Xero connection categories - */ - private String tenantId; - - /* - * Concur, ServiceNow auth server AccessToken grant type is 'Password' - * which requires UsernamePassword - */ - private String username; - - /** - * Creates an instance of WorkspaceConnectionOAuth2 class. - */ - public WorkspaceConnectionOAuth2() { - } - - /** - * Get the authUrl property: Required by Concur connection category. - * - * @return the authUrl value. - */ - public String authUrl() { - return this.authUrl; - } - - /** - * Set the authUrl property: Required by Concur connection category. - * - * @param authUrl the authUrl value to set. - * @return the WorkspaceConnectionOAuth2 object itself. - */ - public WorkspaceConnectionOAuth2 withAuthUrl(String authUrl) { - this.authUrl = authUrl; - return this; - } - - /** - * Get the clientId property: Client id in the format of UUID. - * - * @return the clientId value. - */ - public UUID clientId() { - return this.clientId; - } - - /** - * Set the clientId property: Client id in the format of UUID. - * - * @param clientId the clientId value to set. - * @return the WorkspaceConnectionOAuth2 object itself. - */ - public WorkspaceConnectionOAuth2 withClientId(UUID clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the clientSecret property: The clientSecret property. - * - * @return the clientSecret value. - */ - public String clientSecret() { - return this.clientSecret; - } - - /** - * Set the clientSecret property: The clientSecret property. - * - * @param clientSecret the clientSecret value to set. - * @return the WorkspaceConnectionOAuth2 object itself. - */ - public WorkspaceConnectionOAuth2 withClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - /** - * Get the developerToken property: Required by GoogleAdWords connection category. - * - * @return the developerToken value. - */ - public String developerToken() { - return this.developerToken; - } - - /** - * Set the developerToken property: Required by GoogleAdWords connection category. - * - * @param developerToken the developerToken value to set. - * @return the WorkspaceConnectionOAuth2 object itself. - */ - public WorkspaceConnectionOAuth2 withDeveloperToken(String developerToken) { - this.developerToken = developerToken; - return this; - } - - /** - * Get the password property: The password property. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: The password property. - * - * @param password the password value to set. - * @return the WorkspaceConnectionOAuth2 object itself. - */ - public WorkspaceConnectionOAuth2 withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the refreshToken property: Required by GoogleBigQuery, GoogleAdWords, Hubspot, QuickBooks, Square, Xero, Zoho - * where user needs to get RefreshToken offline. - * - * @return the refreshToken value. - */ - public String refreshToken() { - return this.refreshToken; - } - - /** - * Set the refreshToken property: Required by GoogleBigQuery, GoogleAdWords, Hubspot, QuickBooks, Square, Xero, Zoho - * where user needs to get RefreshToken offline. - * - * @param refreshToken the refreshToken value to set. - * @return the WorkspaceConnectionOAuth2 object itself. - */ - public WorkspaceConnectionOAuth2 withRefreshToken(String refreshToken) { - this.refreshToken = refreshToken; - return this; - } - - /** - * Get the tenantId property: Required by QuickBooks and Xero connection categories. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: Required by QuickBooks and Xero connection categories. - * - * @param tenantId the tenantId value to set. - * @return the WorkspaceConnectionOAuth2 object itself. - */ - public WorkspaceConnectionOAuth2 withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the username property: Concur, ServiceNow auth server AccessToken grant type is 'Password' - * which requires UsernamePassword. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: Concur, ServiceNow auth server AccessToken grant type is 'Password' - * which requires UsernamePassword. - * - * @param username the username value to set. - * @return the WorkspaceConnectionOAuth2 object itself. - */ - public WorkspaceConnectionOAuth2 withUsername(String username) { - this.username = username; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authUrl", this.authUrl); - jsonWriter.writeStringField("clientId", Objects.toString(this.clientId, null)); - jsonWriter.writeStringField("clientSecret", this.clientSecret); - jsonWriter.writeStringField("developerToken", this.developerToken); - jsonWriter.writeStringField("password", this.password); - jsonWriter.writeStringField("refreshToken", this.refreshToken); - jsonWriter.writeStringField("tenantId", this.tenantId); - jsonWriter.writeStringField("username", this.username); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceConnectionOAuth2 from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceConnectionOAuth2 if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkspaceConnectionOAuth2. - */ - public static WorkspaceConnectionOAuth2 fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceConnectionOAuth2 deserializedWorkspaceConnectionOAuth2 = new WorkspaceConnectionOAuth2(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("authUrl".equals(fieldName)) { - deserializedWorkspaceConnectionOAuth2.authUrl = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedWorkspaceConnectionOAuth2.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("clientSecret".equals(fieldName)) { - deserializedWorkspaceConnectionOAuth2.clientSecret = reader.getString(); - } else if ("developerToken".equals(fieldName)) { - deserializedWorkspaceConnectionOAuth2.developerToken = reader.getString(); - } else if ("password".equals(fieldName)) { - deserializedWorkspaceConnectionOAuth2.password = reader.getString(); - } else if ("refreshToken".equals(fieldName)) { - deserializedWorkspaceConnectionOAuth2.refreshToken = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedWorkspaceConnectionOAuth2.tenantId = reader.getString(); - } else if ("username".equals(fieldName)) { - deserializedWorkspaceConnectionOAuth2.username = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceConnectionOAuth2; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.java deleted file mode 100644 index 9dbd7d76251c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The WorkspaceConnectionPersonalAccessToken model. - */ -@Fluent -public final class WorkspaceConnectionPersonalAccessToken - implements JsonSerializable { - /* - * The pat property. - */ - private String pat; - - /** - * Creates an instance of WorkspaceConnectionPersonalAccessToken class. - */ - public WorkspaceConnectionPersonalAccessToken() { - } - - /** - * Get the pat property: The pat property. - * - * @return the pat value. - */ - public String pat() { - return this.pat; - } - - /** - * Set the pat property: The pat property. - * - * @param pat the pat value to set. - * @return the WorkspaceConnectionPersonalAccessToken object itself. - */ - public WorkspaceConnectionPersonalAccessToken withPat(String pat) { - this.pat = pat; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("pat", this.pat); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceConnectionPersonalAccessToken from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceConnectionPersonalAccessToken if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkspaceConnectionPersonalAccessToken. - */ - public static WorkspaceConnectionPersonalAccessToken fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceConnectionPersonalAccessToken deserializedWorkspaceConnectionPersonalAccessToken - = new WorkspaceConnectionPersonalAccessToken(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("pat".equals(fieldName)) { - deserializedWorkspaceConnectionPersonalAccessToken.pat = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceConnectionPersonalAccessToken; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java deleted file mode 100644 index 23ddc5256403..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java +++ /dev/null @@ -1,422 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; - -/** - * The WorkspaceConnectionPropertiesV2 model. - */ -@Fluent -public class WorkspaceConnectionPropertiesV2 implements JsonSerializable { - /* - * Authentication type of the connection target - */ - private ConnectionAuthType authType = ConnectionAuthType.fromString("WorkspaceConnectionPropertiesV2"); - - /* - * Category of the connection - */ - private ConnectionCategory category; - - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * The expiryTime property. - */ - private OffsetDateTime expiryTime; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - - /* - * The isSharedToAll property. - */ - private Boolean isSharedToAll; - - /* - * The target property. - */ - private String target; - - /* - * Store user metadata for this connection - */ - private Map metadata; - - /* - * The sharedUserList property. - */ - private List sharedUserList; - - /* - * Value details of the workspace connection. - */ - private String value; - - /* - * format for the workspace connection value - */ - private ValueFormat valueFormat; - - /** - * Creates an instance of WorkspaceConnectionPropertiesV2 class. - */ - public WorkspaceConnectionPropertiesV2() { - } - - /** - * Get the authType property: Authentication type of the connection target. - * - * @return the authType value. - */ - public ConnectionAuthType authType() { - return this.authType; - } - - /** - * Get the category property: Category of the connection. - * - * @return the category value. - */ - public ConnectionCategory category() { - return this.category; - } - - /** - * Set the category property: Category of the connection. - * - * @param category the category value to set. - * @return the WorkspaceConnectionPropertiesV2 object itself. - */ - public WorkspaceConnectionPropertiesV2 withCategory(ConnectionCategory category) { - this.category = category; - return this; - } - - /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Set the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @param createdByWorkspaceArmId the createdByWorkspaceArmId value to set. - * @return the WorkspaceConnectionPropertiesV2 object itself. - */ - WorkspaceConnectionPropertiesV2 withCreatedByWorkspaceArmId(String createdByWorkspaceArmId) { - this.createdByWorkspaceArmId = createdByWorkspaceArmId; - return this; - } - - /** - * Get the expiryTime property: The expiryTime property. - * - * @return the expiryTime value. - */ - public OffsetDateTime expiryTime() { - return this.expiryTime; - } - - /** - * Set the expiryTime property: The expiryTime property. - * - * @param expiryTime the expiryTime value to set. - * @return the WorkspaceConnectionPropertiesV2 object itself. - */ - public WorkspaceConnectionPropertiesV2 withExpiryTime(OffsetDateTime expiryTime) { - this.expiryTime = expiryTime; - return this; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. - */ - public ConnectionGroup group() { - return this.group; - } - - /** - * Set the group property: Group based on connection category. - * - * @param group the group value to set. - * @return the WorkspaceConnectionPropertiesV2 object itself. - */ - WorkspaceConnectionPropertiesV2 withGroup(ConnectionGroup group) { - this.group = group; - return this; - } - - /** - * Get the isSharedToAll property: The isSharedToAll property. - * - * @return the isSharedToAll value. - */ - public Boolean isSharedToAll() { - return this.isSharedToAll; - } - - /** - * Set the isSharedToAll property: The isSharedToAll property. - * - * @param isSharedToAll the isSharedToAll value to set. - * @return the WorkspaceConnectionPropertiesV2 object itself. - */ - public WorkspaceConnectionPropertiesV2 withIsSharedToAll(Boolean isSharedToAll) { - this.isSharedToAll = isSharedToAll; - return this; - } - - /** - * Get the target property: The target property. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Set the target property: The target property. - * - * @param target the target value to set. - * @return the WorkspaceConnectionPropertiesV2 object itself. - */ - public WorkspaceConnectionPropertiesV2 withTarget(String target) { - this.target = target; - return this; - } - - /** - * Get the metadata property: Store user metadata for this connection. - * - * @return the metadata value. - */ - public Map metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Store user metadata for this connection. - * - * @param metadata the metadata value to set. - * @return the WorkspaceConnectionPropertiesV2 object itself. - */ - public WorkspaceConnectionPropertiesV2 withMetadata(Map metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the sharedUserList property: The sharedUserList property. - * - * @return the sharedUserList value. - */ - public List sharedUserList() { - return this.sharedUserList; - } - - /** - * Set the sharedUserList property: The sharedUserList property. - * - * @param sharedUserList the sharedUserList value to set. - * @return the WorkspaceConnectionPropertiesV2 object itself. - */ - public WorkspaceConnectionPropertiesV2 withSharedUserList(List sharedUserList) { - this.sharedUserList = sharedUserList; - return this; - } - - /** - * Get the value property: Value details of the workspace connection. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Value details of the workspace connection. - * - * @param value the value value to set. - * @return the WorkspaceConnectionPropertiesV2 object itself. - */ - public WorkspaceConnectionPropertiesV2 withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the valueFormat property: format for the workspace connection value. - * - * @return the valueFormat value. - */ - public ValueFormat valueFormat() { - return this.valueFormat; - } - - /** - * Set the valueFormat property: format for the workspace connection value. - * - * @param valueFormat the valueFormat value to set. - * @return the WorkspaceConnectionPropertiesV2 object itself. - */ - public WorkspaceConnectionPropertiesV2 withValueFormat(ValueFormat valueFormat) { - this.valueFormat = valueFormat; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeStringField("category", this.category == null ? null : this.category.toString()); - jsonWriter.writeStringField("expiryTime", - this.expiryTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiryTime)); - jsonWriter.writeBooleanField("isSharedToAll", this.isSharedToAll); - jsonWriter.writeStringField("target", this.target); - jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("sharedUserList", this.sharedUserList, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", this.value); - jsonWriter.writeStringField("valueFormat", this.valueFormat == null ? null : this.valueFormat.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceConnectionPropertiesV2 from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceConnectionPropertiesV2 if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkspaceConnectionPropertiesV2. - */ - public static WorkspaceConnectionPropertiesV2 fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("authType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("PAT".equals(discriminatorValue)) { - return PatAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("SAS".equals(discriminatorValue)) { - return SasAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("UsernamePassword".equals(discriminatorValue)) { - return UsernamePasswordAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("None".equals(discriminatorValue)) { - return NoneAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("ManagedIdentity".equals(discriminatorValue)) { - return ManagedIdentityAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("AAD".equals(discriminatorValue)) { - return AadAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("AccessKey".equals(discriminatorValue)) { - return AccessKeyAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("AccountKey".equals(discriminatorValue)) { - return AccountKeyAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("ApiKey".equals(discriminatorValue)) { - return ApiKeyAuthWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("CustomKeys".equals(discriminatorValue)) { - return CustomKeysWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("OAuth2".equals(discriminatorValue)) { - return OAuth2AuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("ServicePrincipal".equals(discriminatorValue)) { - return ServicePrincipalAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static WorkspaceConnectionPropertiesV2 fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceConnectionPropertiesV2 deserializedWorkspaceConnectionPropertiesV2 - = new WorkspaceConnectionPropertiesV2(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("authType".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2.authType - = ConnectionAuthType.fromString(reader.getString()); - } else if ("category".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2.category - = ConnectionCategory.fromString(reader.getString()); - } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2.createdByWorkspaceArmId = reader.getString(); - } else if ("expiryTime".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2.expiryTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("group".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2.group = ConnectionGroup.fromString(reader.getString()); - } else if ("isSharedToAll".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2.isSharedToAll - = reader.getNullable(JsonReader::getBoolean); - } else if ("target".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2.target = reader.getString(); - } else if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedWorkspaceConnectionPropertiesV2.metadata = metadata; - } else if ("sharedUserList".equals(fieldName)) { - List sharedUserList = reader.readArray(reader1 -> reader1.getString()); - deserializedWorkspaceConnectionPropertiesV2.sharedUserList = sharedUserList; - } else if ("value".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2.value = reader.getString(); - } else if ("valueFormat".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2.valueFormat - = ValueFormat.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceConnectionPropertiesV2; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java deleted file mode 100644 index b5033785919a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; - -/** - * An immutable client-side representation of WorkspaceConnectionPropertiesV2BasicResource. - */ -public interface WorkspaceConnectionPropertiesV2BasicResource { - /** - * 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: The properties property. - * - * @return the properties value. - */ - WorkspaceConnectionPropertiesV2 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.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner object. - * - * @return the inner object. - */ - WorkspaceConnectionPropertiesV2BasicResourceInner innerModel(); - - /** - * The entirety of the WorkspaceConnectionPropertiesV2BasicResource definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The WorkspaceConnectionPropertiesV2BasicResource definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the WorkspaceConnectionPropertiesV2BasicResource definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the WorkspaceConnectionPropertiesV2BasicResource definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the WorkspaceConnectionPropertiesV2BasicResource definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties property.. - * - * @param properties The properties property. - * @return the next definition stage. - */ - WithCreate withProperties(WorkspaceConnectionPropertiesV2 properties); - } - - /** - * The stage of the WorkspaceConnectionPropertiesV2BasicResource 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - WorkspaceConnectionPropertiesV2BasicResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - WorkspaceConnectionPropertiesV2BasicResource create(Context context); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - WorkspaceConnectionPropertiesV2BasicResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - WorkspaceConnectionPropertiesV2BasicResource refresh(Context context); - - /** - * List all the secrets of a machine learning workspaces connections. - * - * @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 response body along with {@link Response}. - */ - Response listSecretsWithResponse(Context context); - - /** - * List all the secrets of a machine learning workspaces connections. - * - * @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 response. - */ - WorkspaceConnectionPropertiesV2BasicResource listSecrets(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java deleted file mode 100644 index 6b396ac6ae20..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * The WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult model. - */ -@Fluent -public final class WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult - implements JsonSerializable { - /* - * The value property. - */ - private List value; - - /* - * The nextLink property. - */ - private String nextLink; - - /** - * Creates an instance of WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult class. - */ - public WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult() { - } - - /** - * Get the value property: The value property. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult object itself. - */ - public WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult - withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The nextLink property. - * - * @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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult if the JsonReader was - * pointing to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult. - */ - public static WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult deserializedWorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult - = new WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader - .readArray(reader1 -> WorkspaceConnectionPropertiesV2BasicResourceInner.fromJson(reader1)); - deserializedWorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.nextLink - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.java deleted file mode 100644 index 0f05a562276f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The WorkspaceConnectionServicePrincipal model. - */ -@Fluent -public final class WorkspaceConnectionServicePrincipal - implements JsonSerializable { - /* - * The clientId property. - */ - private String clientId; - - /* - * The clientSecret property. - */ - private String clientSecret; - - /* - * The tenantId property. - */ - private String tenantId; - - /** - * Creates an instance of WorkspaceConnectionServicePrincipal class. - */ - public WorkspaceConnectionServicePrincipal() { - } - - /** - * Get the clientId property: The clientId property. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: The clientId property. - * - * @param clientId the clientId value to set. - * @return the WorkspaceConnectionServicePrincipal object itself. - */ - public WorkspaceConnectionServicePrincipal withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the clientSecret property: The clientSecret property. - * - * @return the clientSecret value. - */ - public String clientSecret() { - return this.clientSecret; - } - - /** - * Set the clientSecret property: The clientSecret property. - * - * @param clientSecret the clientSecret value to set. - * @return the WorkspaceConnectionServicePrincipal object itself. - */ - public WorkspaceConnectionServicePrincipal withClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - /** - * Get the tenantId property: The tenantId property. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: The tenantId property. - * - * @param tenantId the tenantId value to set. - * @return the WorkspaceConnectionServicePrincipal object itself. - */ - public WorkspaceConnectionServicePrincipal withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("clientId", this.clientId); - jsonWriter.writeStringField("clientSecret", this.clientSecret); - jsonWriter.writeStringField("tenantId", this.tenantId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceConnectionServicePrincipal from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceConnectionServicePrincipal if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkspaceConnectionServicePrincipal. - */ - public static WorkspaceConnectionServicePrincipal fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceConnectionServicePrincipal deserializedWorkspaceConnectionServicePrincipal - = new WorkspaceConnectionServicePrincipal(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("clientId".equals(fieldName)) { - deserializedWorkspaceConnectionServicePrincipal.clientId = reader.getString(); - } else if ("clientSecret".equals(fieldName)) { - deserializedWorkspaceConnectionServicePrincipal.clientSecret = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedWorkspaceConnectionServicePrincipal.tenantId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceConnectionServicePrincipal; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.java deleted file mode 100644 index f323a4d2b92b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The WorkspaceConnectionSharedAccessSignature model. - */ -@Fluent -public final class WorkspaceConnectionSharedAccessSignature - implements JsonSerializable { - /* - * The sas property. - */ - private String sas; - - /** - * Creates an instance of WorkspaceConnectionSharedAccessSignature class. - */ - public WorkspaceConnectionSharedAccessSignature() { - } - - /** - * Get the sas property: The sas property. - * - * @return the sas value. - */ - public String sas() { - return this.sas; - } - - /** - * Set the sas property: The sas property. - * - * @param sas the sas value to set. - * @return the WorkspaceConnectionSharedAccessSignature object itself. - */ - public WorkspaceConnectionSharedAccessSignature withSas(String sas) { - this.sas = sas; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sas", this.sas); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceConnectionSharedAccessSignature from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceConnectionSharedAccessSignature if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkspaceConnectionSharedAccessSignature. - */ - public static WorkspaceConnectionSharedAccessSignature fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceConnectionSharedAccessSignature deserializedWorkspaceConnectionSharedAccessSignature - = new WorkspaceConnectionSharedAccessSignature(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sas".equals(fieldName)) { - deserializedWorkspaceConnectionSharedAccessSignature.sas = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceConnectionSharedAccessSignature; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java deleted file mode 100644 index 6f9aa0d5ce36..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The WorkspaceConnectionUsernamePassword model. - */ -@Fluent -public final class WorkspaceConnectionUsernamePassword - implements JsonSerializable { - /* - * The username property. - */ - private String username; - - /* - * The password property. - */ - private String password; - - /* - * Optional, required by connections like SalesForce for extra security in addition to UsernamePassword - */ - private String securityToken; - - /** - * Creates an instance of WorkspaceConnectionUsernamePassword class. - */ - public WorkspaceConnectionUsernamePassword() { - } - - /** - * Get the username property: The username property. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: The username property. - * - * @param username the username value to set. - * @return the WorkspaceConnectionUsernamePassword object itself. - */ - public WorkspaceConnectionUsernamePassword withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: The password property. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: The password property. - * - * @param password the password value to set. - * @return the WorkspaceConnectionUsernamePassword object itself. - */ - public WorkspaceConnectionUsernamePassword withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the securityToken property: Optional, required by connections like SalesForce for extra security in addition - * to UsernamePassword. - * - * @return the securityToken value. - */ - public String securityToken() { - return this.securityToken; - } - - /** - * Set the securityToken property: Optional, required by connections like SalesForce for extra security in addition - * to UsernamePassword. - * - * @param securityToken the securityToken value to set. - * @return the WorkspaceConnectionUsernamePassword object itself. - */ - public WorkspaceConnectionUsernamePassword withSecurityToken(String securityToken) { - this.securityToken = securityToken; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("username", this.username); - jsonWriter.writeStringField("password", this.password); - jsonWriter.writeStringField("securityToken", this.securityToken); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceConnectionUsernamePassword from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceConnectionUsernamePassword if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkspaceConnectionUsernamePassword. - */ - public static WorkspaceConnectionUsernamePassword fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceConnectionUsernamePassword deserializedWorkspaceConnectionUsernamePassword - = new WorkspaceConnectionUsernamePassword(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("username".equals(fieldName)) { - deserializedWorkspaceConnectionUsernamePassword.username = reader.getString(); - } else if ("password".equals(fieldName)) { - deserializedWorkspaceConnectionUsernamePassword.password = reader.getString(); - } else if ("securityToken".equals(fieldName)) { - deserializedWorkspaceConnectionUsernamePassword.securityToken = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceConnectionUsernamePassword; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.java deleted file mode 100644 index 8cb1ea5814cb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.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.machinelearning.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 WorkspaceConnections. - */ -public interface WorkspaceConnections { - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response body along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, - String workspaceName, String connectionName, Context context); - - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response. - */ - WorkspaceConnectionPropertiesV2BasicResource get(String resourceGroupName, String workspaceName, - String connectionName); - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String connectionName, - Context context); - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String connectionName); - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @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 paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, - String target, String category, Context context); - - /** - * List all the secrets of a machine learning workspaces connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response body along with {@link Response}. - */ - Response listSecretsWithResponse(String resourceGroupName, - String workspaceName, String connectionName, Context context); - - /** - * List all the secrets of a machine learning workspaces connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @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 response. - */ - WorkspaceConnectionPropertiesV2BasicResource listSecrets(String resourceGroupName, String workspaceName, - String connectionName); - - /** - * The get operation. - * - * @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 response body along with {@link Response}. - */ - WorkspaceConnectionPropertiesV2BasicResource getById(String id); - - /** - * The get operation. - * - * @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 response body along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * The delete operation. - * - * @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. - */ - void deleteById(String id); - - /** - * The delete operation. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new WorkspaceConnectionPropertiesV2BasicResource resource. - * - * @param name resource name. - * @return the first stage of the new WorkspaceConnectionPropertiesV2BasicResource definition. - */ - WorkspaceConnectionPropertiesV2BasicResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceFeatures.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceFeatures.java deleted file mode 100644 index 3e150cf9c965..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceFeatures.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.machinelearning.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of WorkspaceFeatures. - */ -public interface WorkspaceFeatures { - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 List Aml user feature operation response as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 List Aml user feature operation response as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceHubConfig.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceHubConfig.java deleted file mode 100644 index b28e29616d6a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceHubConfig.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * WorkspaceHub's configuration object. - */ -@Fluent -public final class WorkspaceHubConfig implements JsonSerializable { - /* - * The additionalWorkspaceStorageAccounts property. - */ - private List additionalWorkspaceStorageAccounts; - - /* - * The defaultWorkspaceResourceGroup property. - */ - private String defaultWorkspaceResourceGroup; - - /** - * Creates an instance of WorkspaceHubConfig class. - */ - public WorkspaceHubConfig() { - } - - /** - * Get the additionalWorkspaceStorageAccounts property: The additionalWorkspaceStorageAccounts property. - * - * @return the additionalWorkspaceStorageAccounts value. - */ - public List additionalWorkspaceStorageAccounts() { - return this.additionalWorkspaceStorageAccounts; - } - - /** - * Set the additionalWorkspaceStorageAccounts property: The additionalWorkspaceStorageAccounts property. - * - * @param additionalWorkspaceStorageAccounts the additionalWorkspaceStorageAccounts value to set. - * @return the WorkspaceHubConfig object itself. - */ - public WorkspaceHubConfig withAdditionalWorkspaceStorageAccounts(List additionalWorkspaceStorageAccounts) { - this.additionalWorkspaceStorageAccounts = additionalWorkspaceStorageAccounts; - return this; - } - - /** - * Get the defaultWorkspaceResourceGroup property: The defaultWorkspaceResourceGroup property. - * - * @return the defaultWorkspaceResourceGroup value. - */ - public String defaultWorkspaceResourceGroup() { - return this.defaultWorkspaceResourceGroup; - } - - /** - * Set the defaultWorkspaceResourceGroup property: The defaultWorkspaceResourceGroup property. - * - * @param defaultWorkspaceResourceGroup the defaultWorkspaceResourceGroup value to set. - * @return the WorkspaceHubConfig object itself. - */ - public WorkspaceHubConfig withDefaultWorkspaceResourceGroup(String defaultWorkspaceResourceGroup) { - this.defaultWorkspaceResourceGroup = defaultWorkspaceResourceGroup; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("additionalWorkspaceStorageAccounts", this.additionalWorkspaceStorageAccounts, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("defaultWorkspaceResourceGroup", this.defaultWorkspaceResourceGroup); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceHubConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceHubConfig if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkspaceHubConfig. - */ - public static WorkspaceHubConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceHubConfig deserializedWorkspaceHubConfig = new WorkspaceHubConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("additionalWorkspaceStorageAccounts".equals(fieldName)) { - List additionalWorkspaceStorageAccounts = reader.readArray(reader1 -> reader1.getString()); - deserializedWorkspaceHubConfig.additionalWorkspaceStorageAccounts - = additionalWorkspaceStorageAccounts; - } else if ("defaultWorkspaceResourceGroup".equals(fieldName)) { - deserializedWorkspaceHubConfig.defaultWorkspaceResourceGroup = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceHubConfig; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceListResult.java deleted file mode 100644 index 1969d8e6e869..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceListResult.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner; -import java.io.IOException; -import java.util.List; - -/** - * The result of a request to list machine learning workspaces. - */ -@Fluent -public final class WorkspaceListResult implements JsonSerializable { - /* - * The list of machine learning workspaces. Since this list may be incomplete, the nextLink field should be used to - * request the next list of machine learning workspaces. - */ - private List value; - - /* - * The URI that can be used to request the next list of machine learning workspaces. - */ - private String nextLink; - - /** - * Creates an instance of WorkspaceListResult class. - */ - public WorkspaceListResult() { - } - - /** - * Get the value property: The list of machine learning workspaces. Since this list may be incomplete, the nextLink - * field should be used to request the next list of machine learning workspaces. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of machine learning workspaces. Since this list may be incomplete, the nextLink - * field should be used to request the next list of machine learning workspaces. - * - * @param value the value value to set. - * @return the WorkspaceListResult object itself. - */ - public WorkspaceListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URI that can be used to request the next list of machine learning workspaces. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The URI that can be used to request the next list of machine learning workspaces. - * - * @param nextLink the nextLink value to set. - * @return the WorkspaceListResult object itself. - */ - public WorkspaceListResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkspaceListResult. - */ - public static WorkspaceListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceListResult deserializedWorkspaceListResult = new WorkspaceListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> WorkspaceInner.fromJson(reader1)); - deserializedWorkspaceListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedWorkspaceListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceListResult; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProperties.java deleted file mode 100644 index 1bbaf7348fa1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProperties.java +++ /dev/null @@ -1,255 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesInner; -import java.util.List; - -/** - * An immutable client-side representation of WorkspaceProperties. - */ -public interface WorkspaceProperties { - /** - * Gets the workspaceId property: The immutable id associated with this workspace. - * - * @return the workspaceId value. - */ - String workspaceId(); - - /** - * Gets the description property: The description of this workspace. - * - * @return the description value. - */ - String description(); - - /** - * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @return the friendlyName value. - */ - String friendlyName(); - - /** - * Gets the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. - * - * @return the keyVault value. - */ - String keyVault(); - - /** - * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @return the applicationInsights value. - */ - String applicationInsights(); - - /** - * Gets the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @return the containerRegistry value. - */ - String containerRegistry(); - - /** - * Gets the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @return the storageAccount value. - */ - String storageAccount(); - - /** - * Gets the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning - * experimentation services. - * - * @return the discoveryUrl value. - */ - String discoveryUrl(); - - /** - * Gets the provisioningState property: The current deployment state of workspace resource. The provisioningState is - * to indicate states for resource provisioning. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the encryption property: The encryption settings of Azure ML workspace. - * - * @return the encryption value. - */ - EncryptionProperty encryption(); - - /** - * Gets the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. - * - * @return the hbiWorkspace value. - */ - Boolean hbiWorkspace(); - - /** - * Gets the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. - * - * @return the serviceProvisionedResourceGroup value. - */ - String serviceProvisionedResourceGroup(); - - /** - * Gets the privateLinkCount property: Count of private connections in the workspace. - * - * @return the privateLinkCount value. - */ - Integer privateLinkCount(); - - /** - * Gets the imageBuildCompute property: The compute name for image build. - * - * @return the imageBuildCompute value. - */ - String imageBuildCompute(); - - /** - * Gets the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when - * behind VNet. - * - * @return the allowPublicAccessWhenBehindVnet value. - */ - Boolean allowPublicAccessWhenBehindVnet(); - - /** - * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @return the publicNetworkAccess value. - */ - PublicNetworkAccess publicNetworkAccess(); - - /** - * Gets the privateEndpointConnections property: The list of private endpoint connections in the workspace. - * - * @return the privateEndpointConnections value. - */ - List privateEndpointConnections(); - - /** - * Gets the serverlessComputeSettings property: Settings for serverless compute created in the workspace. - * - * @return the serverlessComputeSettings value. - */ - ServerlessComputeSettings serverlessComputeSettings(); - - /** - * Gets the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. - * - * @return the sharedPrivateLinkResources value. - */ - List sharedPrivateLinkResources(); - - /** - * Gets the notebookInfo property: The notebook info of Azure ML workspace. - * - * @return the notebookInfo value. - */ - NotebookResourceInfo notebookInfo(); - - /** - * Gets the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @return the serviceManagedResourcesSettings value. - */ - ServiceManagedResourcesSettings serviceManagedResourcesSettings(); - - /** - * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @return the primaryUserAssignedIdentity value. - */ - String primaryUserAssignedIdentity(); - - /** - * Gets the tenantId property: The tenant id associated with this workspace. - * - * @return the tenantId value. - */ - String tenantId(); - - /** - * Gets the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) - * enabled. - * - * @return the storageHnsEnabled value. - */ - Boolean storageHnsEnabled(); - - /** - * Gets the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point - * at to set up tracking. - * - * @return the mlFlowTrackingUri value. - */ - String mlFlowTrackingUri(); - - /** - * Gets the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @return the v1LegacyMode value. - */ - Boolean v1LegacyMode(); - - /** - * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. - * - * @return the managedNetwork value. - */ - ManagedNetworkSettings managedNetwork(); - - /** - * Gets the featureStoreSettings property: Settings for feature store type workspace. - * - * @return the featureStoreSettings value. - */ - FeatureStoreSettings featureStoreSettings(); - - /** - * Gets the associatedWorkspaces property: The associatedWorkspaces property. - * - * @return the associatedWorkspaces value. - */ - List associatedWorkspaces(); - - /** - * Gets the enableDataIsolation property: The enableDataIsolation property. - * - * @return the enableDataIsolation value. - */ - Boolean enableDataIsolation(); - - /** - * Gets the hubResourceId property: The hubResourceId property. - * - * @return the hubResourceId value. - */ - String hubResourceId(); - - /** - * Gets the workspaceHubConfig property: WorkspaceHub's configuration object. - * - * @return the workspaceHubConfig value. - */ - WorkspaceHubConfig workspaceHubConfig(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesInner object. - * - * @return the inner object. - */ - WorkspacePropertiesInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePropertiesUpdateParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePropertiesUpdateParameters.java deleted file mode 100644 index 08fc15798bd3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePropertiesUpdateParameters.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParametersInner; - -/** - * An immutable client-side representation of WorkspacePropertiesUpdateParameters. - */ -public interface WorkspacePropertiesUpdateParameters { - /** - * Gets the description property: The description of this workspace. - * - * @return the description value. - */ - String description(); - - /** - * Gets the friendlyName property: The friendly name for this workspace. - * - * @return the friendlyName value. - */ - String friendlyName(); - - /** - * Gets the imageBuildCompute property: The compute name for image build. - * - * @return the imageBuildCompute value. - */ - String imageBuildCompute(); - - /** - * Gets the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @return the serviceManagedResourcesSettings value. - */ - ServiceManagedResourcesSettings serviceManagedResourcesSettings(); - - /** - * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @return the primaryUserAssignedIdentity value. - */ - String primaryUserAssignedIdentity(); - - /** - * Gets the serverlessComputeSettings property: Settings for serverless compute created in the workspace. - * - * @return the serverlessComputeSettings value. - */ - ServerlessComputeSettings serverlessComputeSettings(); - - /** - * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @return the publicNetworkAccess value. - */ - PublicNetworkAccess publicNetworkAccess(); - - /** - * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @return the applicationInsights value. - */ - String applicationInsights(); - - /** - * Gets the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @return the containerRegistry value. - */ - String containerRegistry(); - - /** - * Gets the featureStoreSettings property: Settings for feature store type workspace. - * - * @return the featureStoreSettings value. - */ - FeatureStoreSettings featureStoreSettings(); - - /** - * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. - * - * @return the managedNetwork value. - */ - ManagedNetworkSettings managedNetwork(); - - /** - * Gets the enableDataIsolation property: The enableDataIsolation property. - * - * @return the enableDataIsolation value. - */ - Boolean enableDataIsolation(); - - /** - * Gets the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @return the v1LegacyMode value. - */ - Boolean v1LegacyMode(); - - /** - * Gets the encryption property: The encryption property. - * - * @return the encryption value. - */ - EncryptionUpdateProperties encryption(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParametersInner - * object. - * - * @return the inner object. - */ - WorkspacePropertiesUpdateParametersInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java deleted file mode 100644 index ab58bf322a01..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParametersInner; -import java.io.IOException; -import java.util.Map; - -/** - * The parameters for updating a machine learning workspace. - */ -@Fluent -public final class WorkspaceUpdateParameters implements JsonSerializable { - /* - * The resource tags for the machine learning workspace. - */ - private Map tags; - - /* - * The sku of the workspace. - */ - private Sku sku; - - /* - * The identity of the resource. - */ - private ManagedServiceIdentity identity; - - /* - * The properties that the machine learning workspace will be updated with. - */ - private WorkspacePropertiesUpdateParametersInner innerProperties; - - /** - * Creates an instance of WorkspaceUpdateParameters class. - */ - public WorkspaceUpdateParameters() { - } - - /** - * Get the tags property: The resource tags for the machine learning workspace. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: The resource tags for the machine learning workspace. - * - * @param tags the tags value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the sku property: The sku of the workspace. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the innerProperties property: The properties that the machine learning workspace will be updated with. - * - * @return the innerProperties value. - */ - private WorkspacePropertiesUpdateParametersInner innerProperties() { - return this.innerProperties; - } - - /** - * Get the description property: The description of this workspace. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The description of this workspace. - * - * @param description the description value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the friendlyName property: The friendly name for this workspace. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Set the friendlyName property: The friendly name for this workspace. - * - * @param friendlyName the friendlyName value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withFriendlyName(String friendlyName) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withFriendlyName(friendlyName); - return this; - } - - /** - * Get the imageBuildCompute property: The compute name for image build. - * - * @return the imageBuildCompute value. - */ - public String imageBuildCompute() { - return this.innerProperties() == null ? null : this.innerProperties().imageBuildCompute(); - } - - /** - * Set the imageBuildCompute property: The compute name for image build. - * - * @param imageBuildCompute the imageBuildCompute value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withImageBuildCompute(String imageBuildCompute) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withImageBuildCompute(imageBuildCompute); - return this; - } - - /** - * Get the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @return the serviceManagedResourcesSettings value. - */ - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.innerProperties() == null ? null : this.innerProperties().serviceManagedResourcesSettings(); - } - - /** - * Set the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); - return this; - } - - /** - * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @return the primaryUserAssignedIdentity value. - */ - public String primaryUserAssignedIdentity() { - return this.innerProperties() == null ? null : this.innerProperties().primaryUserAssignedIdentity(); - } - - /** - * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); - return this; - } - - /** - * Get the serverlessComputeSettings property: Settings for serverless compute created in the workspace. - * - * @return the serverlessComputeSettings value. - */ - public ServerlessComputeSettings serverlessComputeSettings() { - return this.innerProperties() == null ? null : this.innerProperties().serverlessComputeSettings(); - } - - /** - * Set the serverlessComputeSettings property: Settings for serverless compute created in the workspace. - * - * @param serverlessComputeSettings the serverlessComputeSettings value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters - withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withServerlessComputeSettings(serverlessComputeSettings); - return this; - } - - /** - * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); - } - - /** - * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); - return this; - } - - /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @return the applicationInsights value. - */ - public String applicationInsights() { - return this.innerProperties() == null ? null : this.innerProperties().applicationInsights(); - } - - /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @param applicationInsights the applicationInsights value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withApplicationInsights(String applicationInsights) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withApplicationInsights(applicationInsights); - return this; - } - - /** - * Get the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @return the containerRegistry value. - */ - public String containerRegistry() { - return this.innerProperties() == null ? null : this.innerProperties().containerRegistry(); - } - - /** - * Set the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @param containerRegistry the containerRegistry value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withContainerRegistry(String containerRegistry) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withContainerRegistry(containerRegistry); - return this; - } - - /** - * Get the featureStoreSettings property: Settings for feature store type workspace. - * - * @return the featureStoreSettings value. - */ - public FeatureStoreSettings featureStoreSettings() { - return this.innerProperties() == null ? null : this.innerProperties().featureStoreSettings(); - } - - /** - * Set the featureStoreSettings property: Settings for feature store type workspace. - * - * @param featureStoreSettings the featureStoreSettings value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withFeatureStoreSettings(featureStoreSettings); - return this; - } - - /** - * Get the managedNetwork property: Managed Network settings for a machine learning workspace. - * - * @return the managedNetwork value. - */ - public ManagedNetworkSettingsInner managedNetwork() { - return this.innerProperties() == null ? null : this.innerProperties().managedNetwork(); - } - - /** - * Set the managedNetwork property: Managed Network settings for a machine learning workspace. - * - * @param managedNetwork the managedNetwork value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withManagedNetwork(managedNetwork); - return this; - } - - /** - * Get the enableDataIsolation property: The enableDataIsolation property. - * - * @return the enableDataIsolation value. - */ - public Boolean enableDataIsolation() { - return this.innerProperties() == null ? null : this.innerProperties().enableDataIsolation(); - } - - /** - * Set the enableDataIsolation property: The enableDataIsolation property. - * - * @param enableDataIsolation the enableDataIsolation value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withEnableDataIsolation(Boolean enableDataIsolation) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withEnableDataIsolation(enableDataIsolation); - return this; - } - - /** - * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @return the v1LegacyMode value. - */ - public Boolean v1LegacyMode() { - return this.innerProperties() == null ? null : this.innerProperties().v1LegacyMode(); - } - - /** - * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @param v1LegacyMode the v1LegacyMode value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withV1LegacyMode(Boolean v1LegacyMode) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withV1LegacyMode(v1LegacyMode); - return this; - } - - /** - * Get the encryption property: The encryption property. - * - * @return the encryption value. - */ - public EncryptionUpdateProperties encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); - } - - /** - * Set the encryption property: The encryption property. - * - * @param encryption the encryption value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withEncryption(EncryptionUpdateProperties encryption) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withEncryption(encryption); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() != null) { - sku().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("sku", this.sku); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceUpdateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceUpdateParameters if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkspaceUpdateParameters. - */ - public static WorkspaceUpdateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceUpdateParameters deserializedWorkspaceUpdateParameters = new WorkspaceUpdateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedWorkspaceUpdateParameters.tags = tags; - } else if ("sku".equals(fieldName)) { - deserializedWorkspaceUpdateParameters.sku = Sku.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedWorkspaceUpdateParameters.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("properties".equals(fieldName)) { - deserializedWorkspaceUpdateParameters.innerProperties - = WorkspacePropertiesUpdateParametersInner.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceUpdateParameters; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java deleted file mode 100644 index f80403ae6d76..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java +++ /dev/null @@ -1,374 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 Workspaces. - */ -public interface Workspaces { - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 the specified machine learning workspace along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 the specified machine learning workspace. - */ - Workspace getByResourceGroup(String resourceGroupName, String workspaceName); - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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. - */ - void delete(String resourceGroupName, String workspaceName); - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context); - - /** - * Lists all the available machine learning workspaces under the specified 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.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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. - * @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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context); - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - DiagnoseResponseResult diagnose(String resourceGroupName, String workspaceName); - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @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 response. - */ - DiagnoseResponseResult diagnose(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters, Context context); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response}. - */ - Response listKeysWithResponse(String resourceGroupName, String workspaceName, - Context context); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - ListWorkspaceKeysResult listKeys(String resourceGroupName, String workspaceName); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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. - */ - void resyncKeys(String resourceGroupName, String workspaceName); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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. - */ - void resyncKeys(String resourceGroupName, String workspaceName, Context context); - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String skip, Context context); - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response}. - */ - Response listNotebookAccessTokenWithResponse(String resourceGroupName, - String workspaceName, Context context); - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupName, String workspaceName); - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName); - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName, Context context); - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response}. - */ - Response listStorageAccountKeysWithResponse(String resourceGroupName, - String workspaceName, Context context); - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - ListStorageAccountKeysResult listStorageAccountKeys(String resourceGroupName, String workspaceName); - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response}. - */ - Response listNotebookKeysWithResponse(String resourceGroupName, String workspaceName, - Context context); - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - ListNotebookKeysResult listNotebookKeys(String resourceGroupName, String workspaceName); - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response body along with {@link Response}. - */ - Response listOutboundNetworkDependenciesEndpointsWithResponse(String resourceGroupName, - String workspaceName, Context context); - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 response. - */ - ExternalFqdnResponse listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String workspaceName); - - /** - * Gets the properties of the specified machine learning workspace. - * - * @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 the specified machine learning workspace along with {@link Response}. - */ - Workspace getById(String id); - - /** - * Gets the properties of the specified machine learning workspace. - * - * @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 the specified machine learning workspace along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a machine learning workspace. - * - * @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. - */ - void deleteById(String id); - - /** - * Deletes a machine learning workspace. - * - * @param id the resource ID. - * @param forceToPurge Flag to indicate delete is a purge request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Boolean forceToPurge, Context context); - - /** - * Begins definition for a new Workspace resource. - * - * @param name resource name. - * @return the first stage of the new Workspace definition. - */ - Workspace.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java deleted file mode 100644 index 3d3d39fb944c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the data models for AzureMachineLearningWorkspaces. - * These APIs allow end users to operate on Azure Machine Learning Workspace resources. - */ -package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java deleted file mode 100644 index 2f8911b54f4f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the classes for AzureMachineLearningWorkspaces. - * These APIs allow end users to operate on Azure Machine Learning Workspace resources. - */ -package com.azure.resourcemanager.machinelearning; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/module-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/module-info.java deleted file mode 100644 index 76d4252f4689..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/module-info.java +++ /dev/null @@ -1,15 +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.machinelearning { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.machinelearning; - exports com.azure.resourcemanager.machinelearning.fluent; - exports com.azure.resourcemanager.machinelearning.fluent.models; - exports com.azure.resourcemanager.machinelearning.models; - - opens com.azure.resourcemanager.machinelearning.fluent.models to com.azure.core; - opens com.azure.resourcemanager.machinelearning.models to com.azure.core; -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/proxy-config.json b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/proxy-config.json deleted file mode 100644 index 9b9cea98e6ae..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/proxy-config.json +++ /dev/null @@ -1 +0,0 @@ -[["com.azure.resourcemanager.machinelearning.implementation.BatchDeploymentsClientImpl$BatchDeploymentsService"],["com.azure.resourcemanager.machinelearning.implementation.BatchEndpointsClientImpl$BatchEndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.CodeContainersClientImpl$CodeContainersService"],["com.azure.resourcemanager.machinelearning.implementation.CodeVersionsClientImpl$CodeVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.ComponentContainersClientImpl$ComponentContainersService"],["com.azure.resourcemanager.machinelearning.implementation.ComponentVersionsClientImpl$ComponentVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.ComputesClientImpl$ComputesService"],["com.azure.resourcemanager.machinelearning.implementation.DataContainersClientImpl$DataContainersService"],["com.azure.resourcemanager.machinelearning.implementation.DataVersionsClientImpl$DataVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.DatastoresClientImpl$DatastoresService"],["com.azure.resourcemanager.machinelearning.implementation.EnvironmentContainersClientImpl$EnvironmentContainersService"],["com.azure.resourcemanager.machinelearning.implementation.EnvironmentVersionsClientImpl$EnvironmentVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturesClientImpl$FeaturesService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturesetContainersClientImpl$FeaturesetContainersService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturesetVersionsClientImpl$FeaturesetVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturestoreEntityContainersClientImpl$FeaturestoreEntityContainersService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturestoreEntityVersionsClientImpl$FeaturestoreEntityVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.JobsClientImpl$JobsService"],["com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkProvisionsClientImpl$ManagedNetworkProvisionsService"],["com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkSettingsRulesClientImpl$ManagedNetworkSettingsRulesService"],["com.azure.resourcemanager.machinelearning.implementation.MarketplaceSubscriptionsClientImpl$MarketplaceSubscriptionsService"],["com.azure.resourcemanager.machinelearning.implementation.ModelContainersClientImpl$ModelContainersService"],["com.azure.resourcemanager.machinelearning.implementation.ModelVersionsClientImpl$ModelVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.OnlineDeploymentsClientImpl$OnlineDeploymentsService"],["com.azure.resourcemanager.machinelearning.implementation.OnlineEndpointsClientImpl$OnlineEndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.machinelearning.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.machinelearning.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.machinelearning.implementation.QuotasClientImpl$QuotasService"],["com.azure.resourcemanager.machinelearning.implementation.RegistriesClientImpl$RegistriesService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryCodeContainersClientImpl$RegistryCodeContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryCodeVersionsClientImpl$RegistryCodeVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryComponentContainersClientImpl$RegistryComponentContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryComponentVersionsClientImpl$RegistryComponentVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryDataContainersClientImpl$RegistryDataContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryDataReferencesClientImpl$RegistryDataReferencesService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryDataVersionsClientImpl$RegistryDataVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentContainersClientImpl$RegistryEnvironmentContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentVersionsClientImpl$RegistryEnvironmentVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryModelContainersClientImpl$RegistryModelContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryModelVersionsClientImpl$RegistryModelVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.SchedulesClientImpl$SchedulesService"],["com.azure.resourcemanager.machinelearning.implementation.ServerlessEndpointsClientImpl$ServerlessEndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.UsagesClientImpl$UsagesService"],["com.azure.resourcemanager.machinelearning.implementation.VirtualMachineSizesClientImpl$VirtualMachineSizesService"],["com.azure.resourcemanager.machinelearning.implementation.WorkspaceConnectionsClientImpl$WorkspaceConnectionsService"],["com.azure.resourcemanager.machinelearning.implementation.WorkspaceFeaturesClientImpl$WorkspaceFeaturesService"],["com.azure.resourcemanager.machinelearning.implementation.WorkspacesClientImpl$WorkspacesService"]] \ No newline at end of file diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/reflect-config.json b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/reflect-config.json deleted file mode 100644 index 0637a088a01e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/reflect-config.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsCreateOrUpdateSamples.java deleted file mode 100644 index 5fb9abdf6b82..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentProperties; -import com.azure.resourcemanager.machinelearning.models.BatchLoggingLevel; -import com.azure.resourcemanager.machinelearning.models.BatchOutputAction; -import com.azure.resourcemanager.machinelearning.models.BatchRetrySettings; -import com.azure.resourcemanager.machinelearning.models.CodeConfiguration; -import com.azure.resourcemanager.machinelearning.models.DeploymentResourceConfiguration; -import com.azure.resourcemanager.machinelearning.models.IdAssetReference; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.io.IOException; -import java.time.Duration; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for BatchDeployments CreateOrUpdate. - */ -public final class BatchDeploymentsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Batch Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateWorkspaceBatchDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - manager.batchDeployments() - .define("testDeploymentName") - .withRegion("string") - .withExistingBatchEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties(new BatchDeploymentProperties().withDescription("string") - .withProperties(mapOf("string", "string")) - .withCodeConfiguration( - new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withCompute("string") - .withErrorThreshold(1) - .withRetrySettings(new BatchRetrySettings().withMaxRetries(1).withTimeout(Duration.parse("PT5M"))) - .withMiniBatchSize(1L) - .withLoggingLevel(BatchLoggingLevel.INFO) - .withModel(new IdAssetReference().withAssetId("string")) - .withMaxConcurrencyPerInstance(1) - .withOutputAction(BatchOutputAction.SUMMARY_ONLY) - .withOutputFileName("string") - .withResources(new DeploymentResourceConfiguration().withInstanceCount(1) - .withInstanceType("string") - .withProperties(mapOf("string", - SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"cd3c37dc-2876-4ca4-8a54-21bd7619724a\":null}", Object.class, - SerializerEncoding.JSON))))) - .withTags(mapOf()) - .withKind("string") - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withSku(new Sku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteSamples.java deleted file mode 100644 index 06c92f473d55..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for BatchDeployments Delete. - */ -public final class BatchDeploymentsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/delete.json - */ - /** - * Sample code: Delete Workspace Batch Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.batchDeployments() - .delete("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsGetSamples.java deleted file mode 100644 index c7444157d51a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsGetSamples.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.machinelearning.generated; - -/** - * Samples for BatchDeployments Get. - */ -public final class BatchDeploymentsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/get.json - */ - /** - * Sample code: Get Workspace Batch Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.batchDeployments() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsListSamples.java deleted file mode 100644 index f3574ad675fd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsListSamples.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.machinelearning.generated; - -/** - * Samples for BatchDeployments List. - */ -public final class BatchDeploymentsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/list.json - */ - /** - * Sample code: List Workspace Batch Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.batchDeployments() - .list("test-rg", "my-aml-workspace", "testEndpointName", "string", 1, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.java deleted file mode 100644 index 6eae68c89735..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.BatchDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for BatchDeployments Update. - */ -public final class BatchDeploymentsUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/update.json - */ - /** - * Sample code: Update Workspace Batch Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - updateWorkspaceBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - BatchDeployment resource = manager.batchDeployments() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf()) - .withProperties(new PartialBatchDeployment().withDescription("string")) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsCreateOrUpdateSamples.java deleted file mode 100644 index c4a73d58e430..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.BatchEndpointDefaults; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for BatchEndpoints CreateOrUpdate. - */ -public final class BatchEndpointsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Batch Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - createOrUpdateWorkspaceBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.batchEndpoints() - .define("testEndpointName") - .withRegion("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new BatchEndpointProperties().withDescription("string") - .withProperties(mapOf("string", "string")) - .withAuthMode(EndpointAuthMode.AMLTOKEN) - .withDefaults(new BatchEndpointDefaults().withDeploymentName("string"))) - .withTags(mapOf()) - .withKind("string") - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withSku(new Sku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteSamples.java deleted file mode 100644 index 8503ee1bbc3d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for BatchEndpoints Delete. - */ -public final class BatchEndpointsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/delete.json - */ - /** - * Sample code: Delete Workspace Batch Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.batchEndpoints() - .delete("resourceGroup-1234", "testworkspace", "testBatchEndpoint", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsGetSamples.java deleted file mode 100644 index 60c40b868032..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsGetSamples.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.machinelearning.generated; - -/** - * Samples for BatchEndpoints Get. - */ -public final class BatchEndpointsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/get.json - */ - /** - * Sample code: Get Workspace Batch Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.batchEndpoints() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListKeysSamples.java deleted file mode 100644 index 989994a98661..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListKeysSamples.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.machinelearning.generated; - -/** - * Samples for BatchEndpoints ListKeys. - */ -public final class BatchEndpointsListKeysSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/listKeys.json - */ - /** - * Sample code: ListKeys Workspace Batch Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listKeysWorkspaceBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.batchEndpoints() - .listKeysWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListSamples.java deleted file mode 100644 index 73cf262f6eb2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListSamples.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.machinelearning.generated; - -/** - * Samples for BatchEndpoints List. - */ -public final class BatchEndpointsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/list.json - */ - /** - * Sample code: List Workspace Batch Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.batchEndpoints().list("test-rg", "my-aml-workspace", 1, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsUpdateSamples.java deleted file mode 100644 index eab2df210e2c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsUpdateSamples.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.machinelearning.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.BatchEndpoint; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for BatchEndpoints Update. - */ -public final class BatchEndpointsUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/update.json - */ - /** - * Sample code: Update Workspace Batch Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateWorkspaceBatchEndpoint( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - BatchEndpoint resource = manager.batchEndpoints() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf()) - .withIdentity(new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", - SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateSamples.java deleted file mode 100644 index bae016098686..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for CodeContainers CreateOrUpdate. - */ -public final class CodeContainersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Code Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - createOrUpdateWorkspaceCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.codeContainers() - .define("testContainer") - .withExistingWorkspace("testrg123", "testworkspace") - .withProperties(new CodeContainerProperties().withDescription("string") - .withTags(mapOf("tag1", "value1", "tag2", "value2"))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteSamples.java deleted file mode 100644 index b5e12705aa1d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteSamples.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.machinelearning.generated; - -/** - * Samples for CodeContainers Delete. - */ -public final class CodeContainersDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/delete.json - */ - /** - * Sample code: Delete Workspace Code Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.codeContainers() - .deleteWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetSamples.java deleted file mode 100644 index 201e70303316..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetSamples.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.machinelearning.generated; - -/** - * Samples for CodeContainers Get. - */ -public final class CodeContainersGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/get.json - */ - /** - * Sample code: Get Workspace Code Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.codeContainers() - .getWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListSamples.java deleted file mode 100644 index 7d6cbc2ab729..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListSamples.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.machinelearning.generated; - -/** - * Samples for CodeContainers List. - */ -public final class CodeContainersListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/list.json - */ - /** - * Sample code: List Workspace Code Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.codeContainers().list("testrg123", "testworkspace", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrGetStartPendingUploadSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrGetStartPendingUploadSamples.java deleted file mode 100644 index a27755b88618..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrGetStartPendingUploadSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; -import com.azure.resourcemanager.machinelearning.models.PendingUploadType; - -/** - * Samples for CodeVersions CreateOrGetStartPendingUpload. - */ -public final class CodeVersionsCreateOrGetStartPendingUploadSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/createOrGetStartPendingUpload.json - */ - /** - * Sample code: CreateOrGetStartPendingUpload Workspace Code Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrGetStartPendingUploadWorkspaceCodeVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.codeVersions() - .createOrGetStartPendingUploadWithResponse("test-rg", "my-aml-workspace", "string", "string", - new PendingUploadRequestDto().withPendingUploadId("string") - .withPendingUploadType(PendingUploadType.NONE), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrUpdateSamples.java deleted file mode 100644 index 6d789a13b24b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.CodeVersionProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for CodeVersions CreateOrUpdate. - */ -public final class CodeVersionsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Code Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - createOrUpdateWorkspaceCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.codeVersions() - .define("string") - .withExistingCode("test-rg", "my-aml-workspace", "string") - .withProperties(new CodeVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsAnonymous(false) - .withCodeUri("fakeTokenPlaceholder")) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteSamples.java deleted file mode 100644 index 9a59e05bc323..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for CodeVersions Delete. - */ -public final class CodeVersionsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/delete.json - */ - /** - * Sample code: Delete Workspace Code Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.codeVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsGetSamples.java deleted file mode 100644 index ccf5e5db61c4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsGetSamples.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.machinelearning.generated; - -/** - * Samples for CodeVersions Get. - */ -public final class CodeVersionsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/get.json - */ - /** - * Sample code: Get Workspace Code Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.codeVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsListSamples.java deleted file mode 100644 index 50c9ac2415fb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsListSamples.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.machinelearning.generated; - -/** - * Samples for CodeVersions List. - */ -public final class CodeVersionsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/list.json - */ - /** - * Sample code: List Workspace Code Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.codeVersions() - .list("test-rg", "my-aml-workspace", "string", "string", 1, null, null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishSamples.java deleted file mode 100644 index 4a584602e6e8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; - -/** - * Samples for CodeVersions Publish. - */ -public final class CodeVersionsPublishSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/publish.json - */ - /** - * Sample code: Publish Workspace Code Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - publishWorkspaceCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.codeVersions() - .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateSamples.java deleted file mode 100644 index 5353abcb80db..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ComponentContainers CreateOrUpdate. - */ -public final class ComponentContainersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Component Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateWorkspaceComponentContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.componentContainers() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new ComponentContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string"))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteSamples.java deleted file mode 100644 index f233a499cc6c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteSamples.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.machinelearning.generated; - -/** - * Samples for ComponentContainers Delete. - */ -public final class ComponentContainersDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/delete.json - */ - /** - * Sample code: Delete Workspace Component Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceComponentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.componentContainers() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetSamples.java deleted file mode 100644 index 52b21f5d04df..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetSamples.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.machinelearning.generated; - -/** - * Samples for ComponentContainers Get. - */ -public final class ComponentContainersGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/get.json - */ - /** - * Sample code: Get Workspace Component Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceComponentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.componentContainers() - .getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListSamples.java deleted file mode 100644 index b899b529d462..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListSamples.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.machinelearning.generated; - -/** - * Samples for ComponentContainers List. - */ -public final class ComponentContainersListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/list.json - */ - /** - * Sample code: List Workspace Component Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceComponentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.componentContainers().list("test-rg", "my-aml-workspace", null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateSamples.java deleted file mode 100644 index 07a972a658f4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ComponentVersions CreateOrUpdate. - */ -public final class ComponentVersionsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Component Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateWorkspaceComponentVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - manager.componentVersions() - .define("string") - .withExistingComponent("test-rg", "my-aml-workspace", "string") - .withProperties(new ComponentVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsAnonymous(false) - .withComponentSpec(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"8ced901b-d826-477d-bfef-329da9672513\":null}", Object.class, - SerializerEncoding.JSON))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteSamples.java deleted file mode 100644 index 67fe02db7ccb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for ComponentVersions Delete. - */ -public final class ComponentVersionsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/delete.json - */ - /** - * Sample code: Delete Workspace Component Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.componentVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetSamples.java deleted file mode 100644 index c836b72d4a0f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetSamples.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.machinelearning.generated; - -/** - * Samples for ComponentVersions Get. - */ -public final class ComponentVersionsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/get.json - */ - /** - * Sample code: Get Workspace Component Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.componentVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListSamples.java deleted file mode 100644 index 907bfd41d4b4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListSamples.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.machinelearning.generated; - -/** - * Samples for ComponentVersions List. - */ -public final class ComponentVersionsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/list.json - */ - /** - * Sample code: List Workspace Component Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.componentVersions() - .list("test-rg", "my-aml-workspace", "string", "string", 1, null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishSamples.java deleted file mode 100644 index 671c520395c4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; - -/** - * Samples for ComponentVersions Publish. - */ -public final class ComponentVersionsPublishSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/publish.json - */ - /** - * Sample code: Publish Workspace Component Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - publishWorkspaceComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.componentVersions() - .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java deleted file mode 100644 index ade306d1c991..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.Aks; -import com.azure.resourcemanager.machinelearning.models.AksSchemaProperties; -import com.azure.resourcemanager.machinelearning.models.AmlCompute; -import com.azure.resourcemanager.machinelearning.models.AmlComputeProperties; -import com.azure.resourcemanager.machinelearning.models.ApplicationSharingPolicy; -import com.azure.resourcemanager.machinelearning.models.AssignedUser; -import com.azure.resourcemanager.machinelearning.models.ComputeInstance; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceAuthorizationType; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceProperties; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceSshSettings; -import com.azure.resourcemanager.machinelearning.models.ComputePowerAction; -import com.azure.resourcemanager.machinelearning.models.ComputeSchedules; -import com.azure.resourcemanager.machinelearning.models.ComputeStartStopSchedule; -import com.azure.resourcemanager.machinelearning.models.ComputeTriggerType; -import com.azure.resourcemanager.machinelearning.models.Cron; -import com.azure.resourcemanager.machinelearning.models.CustomService; -import com.azure.resourcemanager.machinelearning.models.DataFactory; -import com.azure.resourcemanager.machinelearning.models.Docker; -import com.azure.resourcemanager.machinelearning.models.Endpoint; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVariable; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType; -import com.azure.resourcemanager.machinelearning.models.Image; -import com.azure.resourcemanager.machinelearning.models.ImageType; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; -import com.azure.resourcemanager.machinelearning.models.Kubernetes; -import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; -import com.azure.resourcemanager.machinelearning.models.OsType; -import com.azure.resourcemanager.machinelearning.models.PersonalComputeInstanceSettings; -import com.azure.resourcemanager.machinelearning.models.Protocol; -import com.azure.resourcemanager.machinelearning.models.RemoteLoginPortPublicAccess; -import com.azure.resourcemanager.machinelearning.models.ResourceId; -import com.azure.resourcemanager.machinelearning.models.ScaleSettings; -import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; -import com.azure.resourcemanager.machinelearning.models.SshPublicAccess; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineImage; -import com.azure.resourcemanager.machinelearning.models.VmPriority; -import com.azure.resourcemanager.machinelearning.models.VolumeDefinition; -import com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType; -import java.time.Duration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Compute CreateOrUpdate. - */ -public final class ComputeCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/BasicAKSCompute.json - */ - /** - * Sample code: Create an AKS Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createAnAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties(new Aks()) - .create(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/AKSCompute.json - */ - /** - * Sample code: Update an AKS Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateAnAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties(new Aks().withDescription("some compute") - .withResourceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2") - .withProperties(new AksSchemaProperties().withAgentCount(4))) - .create(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/KubernetesCompute.json - */ - /** - * Sample code: Attach a Kubernetes Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - attachAKubernetesCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties(new Kubernetes().withDescription("some compute") - .withResourceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2") - .withProperties(new KubernetesProperties().withNamespace("default") - .withDefaultInstanceType("defaultInstanceType") - .withInstanceTypes(mapOf("defaultInstanceType", - new InstanceTypeSchema().withResources(new InstanceTypeSchemaResources() - .withRequests(mapOf("cpu", "1", "memory", "4Gi", "nvidia.com/gpu", null)) - .withLimits(mapOf("cpu", "1", "memory", "4Gi", "nvidia.com/gpu", null))))))) - .create(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json - */ - /** - * Sample code: Create an ComputeInstance Compute with Schedules. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createAnComputeInstanceComputeWithSchedules( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new ComputeInstance().withProperties(new ComputeInstanceProperties().withVmSize("STANDARD_NC6") - .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) - .withSshSettings(new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) - .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) - .withPersonalComputeInstanceSettings(new PersonalComputeInstanceSettings() - .withAssignedUser(new AssignedUser().withObjectId("00000000-0000-0000-0000-000000000000") - .withTenantId("00000000-0000-0000-0000-000000000000"))) - .withSchedules(new ComputeSchedules().withComputeStartStop( - Arrays.asList(new ComputeStartStopSchedule().withStatus(ScheduleStatus.ENABLED) - .withAction(ComputePowerAction.STOP) - .withTriggerType(ComputeTriggerType.CRON) - .withCron(new Cron().withStartTime("2021-04-23T01:30:00") - .withTimeZone("Pacific Standard Time") - .withExpression("0 18 * * *"))))))) - .create(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/BasicAmlCompute.json - */ - /** - * Sample code: Create a AML Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createAAMLCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties(new AmlCompute().withProperties(new AmlComputeProperties().withOsType(OsType.WINDOWS) - .withVmSize("STANDARD_NC6") - .withVmPriority(VmPriority.DEDICATED) - .withVirtualMachineImage(new VirtualMachineImage().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myImageGallery/images/myImageDefinition/versions/0.0.1")) - .withIsolatedNetwork(false) - .withScaleSettings(new ScaleSettings().withMaxNodeCount(1) - .withMinNodeCount(0) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M"))) - .withRemoteLoginPortPublicAccess(RemoteLoginPortPublicAccess.NOT_SPECIFIED) - .withEnableNodePublicIp(true))) - .create(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/ComputeInstance.json - */ - /** - * Sample code: Create an ComputeInstance Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - createAnComputeInstanceCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new ComputeInstance().withProperties(new ComputeInstanceProperties().withVmSize("STANDARD_NC6") - .withSubnet(new ResourceId().withId("test-subnet-resource-id")) - .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) - .withSshSettings(new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) - .withCustomServices(Arrays.asList(new CustomService().withName("rstudio") - .withImage(new Image().withType(ImageType.DOCKER) - .withReference("ghcr.io/azure/rocker-rstudio-ml-verse:latest") - .withAdditionalProperties(mapOf())) - .withEnvironmentVariables(mapOf("test_variable", - new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("test_value") - .withAdditionalProperties(mapOf()))) - .withDocker(new Docker().withPrivileged(true).withAdditionalProperties(mapOf())) - .withEndpoints(Arrays.asList(new Endpoint().withProtocol(Protocol.HTTP) - .withName("connect") - .withTarget(8787) - .withPublished(8787))) - .withVolumes(Arrays.asList(new VolumeDefinition().withType(VolumeDefinitionType.BIND) - .withReadOnly(false) - .withSource("/home/azureuser/cloudfiles") - .withTarget("/home/azureuser/cloudfiles"))) - .withAdditionalProperties(mapOf()))) - .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) - .withPersonalComputeInstanceSettings(new PersonalComputeInstanceSettings() - .withAssignedUser(new AssignedUser().withObjectId("00000000-0000-0000-0000-000000000000") - .withTenantId("00000000-0000-0000-0000-000000000000"))))) - .create(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/ComputeInstanceMinimal.json - */ - /** - * Sample code: Create an ComputeInstance Compute with minimal inputs. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createAnComputeInstanceComputeWithMinimalInputs( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new ComputeInstance().withProperties(new ComputeInstanceProperties().withVmSize("STANDARD_NC6"))) - .create(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/AmlCompute.json - */ - /** - * Sample code: Update a AML Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateAAMLCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties(new AmlCompute().withDescription("some compute") - .withProperties(new AmlComputeProperties().withScaleSettings(new ScaleSettings().withMaxNodeCount(4) - .withMinNodeCount(4) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M"))))) - .create(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/BasicDataFactoryCompute.json - */ - /** - * Sample code: Create a DataFactory Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - createADataFactoryCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties(new DataFactory()) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeDeleteSamples.java deleted file mode 100644 index 3f79c372a349..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeDeleteSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; - -/** - * Samples for Compute Delete. - */ -public final class ComputeDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/delete.json - */ - /** - * Sample code: Delete Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes() - .delete("testrg123", "workspaces123", "compute123", UnderlyingResourceAction.DELETE, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetSamples.java deleted file mode 100644 index e5faf9f2527b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetSamples.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.machinelearning.generated; - -/** - * Samples for Compute Get. - */ -public final class ComputeGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/AKSCompute.json - */ - /** - * Sample code: Get a AKS Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getAAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/KubernetesCompute.json - */ - /** - * Sample code: Get a Kubernetes Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getAKubernetesCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/ComputeInstance.json - */ - /** - * Sample code: Get an ComputeInstance. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getAnComputeInstance(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/AmlCompute.json - */ - /** - * Sample code: Get a AML Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getAAMLCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListKeysSamples.java deleted file mode 100644 index d0fb89edfa07..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListKeysSamples.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.machinelearning.generated; - -/** - * Samples for Compute ListKeys. - */ -public final class ComputeListKeysSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/listKeys.json - */ - /** - * Sample code: List AKS Compute Keys. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listAKSComputeKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes() - .listKeysWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListNodesSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListNodesSamples.java deleted file mode 100644 index ec498b55c38c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListNodesSamples.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.machinelearning.generated; - -/** - * Samples for Compute ListNodes. - */ -public final class ComputeListNodesSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/listNodes.json - */ - /** - * Sample code: Get compute nodes information for a compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getComputeNodesInformationForACompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes().listNodes("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListSamples.java deleted file mode 100644 index ed57fd9e9949..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListSamples.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.machinelearning.generated; - -/** - * Samples for Compute List. - */ -public final class ComputeListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/list.json - */ - /** - * Sample code: Get Computes. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getComputes(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes().list("testrg123", "workspaces123", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeRestartSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeRestartSamples.java deleted file mode 100644 index c6b4e49c3411..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeRestartSamples.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.machinelearning.generated; - -/** - * Samples for Compute Restart. - */ -public final class ComputeRestartSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/restart.json - */ - /** - * Sample code: Restart ComputeInstance Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - restartComputeInstanceCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes().restart("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartSamples.java deleted file mode 100644 index 583d315d644a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartSamples.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.machinelearning.generated; - -/** - * Samples for Compute Start. - */ -public final class ComputeStartSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/start.json - */ - /** - * Sample code: Start ComputeInstance Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - startComputeInstanceCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes().start("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStopSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStopSamples.java deleted file mode 100644 index 7731bc4a61e8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStopSamples.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.machinelearning.generated; - -/** - * Samples for Compute Stop. - */ -public final class ComputeStopSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/stop.json - */ - /** - * Sample code: Stop ComputeInstance Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - stopComputeInstanceCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes().stop("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateSamples.java deleted file mode 100644 index a21805726381..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.ComputeResource; -import com.azure.resourcemanager.machinelearning.models.ScaleSettings; -import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; -import java.time.Duration; - -/** - * Samples for Compute Update. - */ -public final class ComputeUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/patch.json - */ - /** - * Sample code: Update a AmlCompute Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - updateAAmlComputeCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - ComputeResource resource = manager.computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new ScaleSettingsInformation().withScaleSettings(new ScaleSettings().withMaxNodeCount(4) - .withMinNodeCount(4) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M")))) - .apply(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateSamples.java deleted file mode 100644 index 2f06e50e8ec3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DataContainers CreateOrUpdate. - */ -public final class DataContainersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Data Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - createOrUpdateWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataContainers() - .define("datacontainer123") - .withExistingWorkspace("testrg123", "workspace123") - .withProperties(new DataContainerProperties().withDescription("string") - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withProperties(mapOf("properties1", "value1", "properties2", "value2")) - .withDataType(DataType.fromString("UriFile"))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteSamples.java deleted file mode 100644 index bab9d03cc317..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteSamples.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.machinelearning.generated; - -/** - * Samples for DataContainers Delete. - */ -public final class DataContainersDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/delete.json - */ - /** - * Sample code: Delete Workspace Data Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataContainers() - .deleteWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetSamples.java deleted file mode 100644 index c1e4a7cf069e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetSamples.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.machinelearning.generated; - -/** - * Samples for DataContainers Get. - */ -public final class DataContainersGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/get.json - */ - /** - * Sample code: Get Workspace Data Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataContainers() - .getWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListSamples.java deleted file mode 100644 index 0a1b2aad4e41..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListSamples.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.machinelearning.generated; - -/** - * Samples for DataContainers List. - */ -public final class DataContainersListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/list.json - */ - /** - * Sample code: List Workspace Data Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataContainers().list("testrg123", "workspace123", null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateSamples.java deleted file mode 100644 index 5848152474d8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.UriFileDataVersion; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DataVersions CreateOrUpdate. - */ -public final class DataVersionsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Data Version Base. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateWorkspaceDataVersionBase( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataVersions() - .define("string") - .withExistingData("test-rg", "my-aml-workspace", "string") - .withProperties(new UriFileDataVersion().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsAnonymous(false) - .withDataUri("string")) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteSamples.java deleted file mode 100644 index fde0f26ab3da..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for DataVersions Delete. - */ -public final class DataVersionsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/delete.json - */ - /** - * Sample code: Delete Workspace Data Version Base. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetSamples.java deleted file mode 100644 index 49ee47564ac6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetSamples.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.machinelearning.generated; - -/** - * Samples for DataVersions Get. - */ -public final class DataVersionsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/get.json - */ - /** - * Sample code: Get Workspace Data Version Base. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListSamples.java deleted file mode 100644 index bdb29955a794..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListSamples.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.machinelearning.generated; - -/** - * Samples for DataVersions List. - */ -public final class DataVersionsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/list.json - */ - /** - * Sample code: List Workspace Data Version Base. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataVersions() - .list("test-rg", "my-aml-workspace", "string", "string", 1, null, "string", null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishSamples.java deleted file mode 100644 index dea270455a33..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; - -/** - * Samples for DataVersions Publish. - */ -public final class DataVersionsPublishSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/publish.json - */ - /** - * Sample code: Publish Workspace Data Version Base. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - publishWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataVersions() - .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresCreateOrUpdateSamples.java deleted file mode 100644 index 996818977188..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresCreateOrUpdateSamples.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreCredentials; -import com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreSecrets; -import com.azure.resourcemanager.machinelearning.models.AzureBlobDatastore; -import com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen1Datastore; -import com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen2Datastore; -import com.azure.resourcemanager.machinelearning.models.AzureFileDatastore; -import com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreCredentials; -import com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreSecrets; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -/** - * Samples for Datastores CreateOrUpdate. - */ -public final class DatastoresCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal). - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new AzureDataLakeGen1Datastore().withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials(new ServicePrincipalDatastoreCredentials().withAuthorityUrl("string") - .withResourceUrl("string") - .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder"))) - .withStoreName("string")) - .withSkipValidation(false) - .create(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal). - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new AzureDataLakeGen2Datastore().withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials(new ServicePrincipalDatastoreCredentials().withAuthorityUrl("string") - .withResourceUrl("string") - .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder"))) - .withFilesystem("string") - .withAccountName("string") - .withEndpoint("string") - .withProtocol("string")) - .withSkipValidation(false) - .create(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate datastore (AzureBlob w/ AccountKey). - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateDatastoreAzureBlobWAccountKey( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new AzureBlobDatastore().withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials(new AccountKeyDatastoreCredentials() - .withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))) - .withAccountName("string") - .withContainerName("string") - .withEndpoint("core.windows.net") - .withProtocol("https")) - .withSkipValidation(false) - .create(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureFileWAccountKey/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate datastore (Azure File store w/ AccountKey). - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateDatastoreAzureFileStoreWAccountKey( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new AzureFileDatastore().withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials(new AccountKeyDatastoreCredentials() - .withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))) - .withAccountName("string") - .withFileShareName("string") - .withEndpoint("string") - .withProtocol("string")) - .withSkipValidation(false) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteSamples.java deleted file mode 100644 index 0d06f750abe2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteSamples.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.machinelearning.generated; - -/** - * Samples for Datastores Delete. - */ -public final class DatastoresDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/delete.json - */ - /** - * Sample code: Delete datastore. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteDatastore(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.java deleted file mode 100644 index 303e65dd90d1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.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.machinelearning.generated; - -/** - * Samples for Datastores Get. - */ -public final class DatastoresGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/get.json - */ - /** - * Sample code: Get datastore. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getDatastore(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSamples.java deleted file mode 100644 index 116ae1358472..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSamples.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.machinelearning.generated; - -import java.util.Arrays; - -/** - * Samples for Datastores List. - */ -public final class DatastoresListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/list.json - */ - /** - * Sample code: List datastores. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listDatastores(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores() - .list("test-rg", "my-aml-workspace", null, 1, false, Arrays.asList("string"), "string", "string", false, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSecretsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSecretsSamples.java deleted file mode 100644 index fbff23456a49..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSecretsSamples.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.machinelearning.generated; - -/** - * Samples for Datastores ListSecrets. - */ -public final class DatastoresListSecretsSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/listSecrets.json - */ - /** - * Sample code: Get datastore secrets. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getDatastoreSecrets(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores() - .listSecretsWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateSamples.java deleted file mode 100644 index e247c99ce7fa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for EnvironmentContainers CreateOrUpdate. - */ -public final class EnvironmentContainersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Environment Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateWorkspaceEnvironmentContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentContainers() - .define("testEnvironment") - .withExistingWorkspace("testrg123", "testworkspace") - .withProperties(new EnvironmentContainerProperties().withDescription("string") - .withTags(mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) - .withProperties( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteSamples.java deleted file mode 100644 index f1d0f352b809..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteSamples.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.machinelearning.generated; - -/** - * Samples for EnvironmentContainers Delete. - */ -public final class EnvironmentContainersDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/delete.json - */ - /** - * Sample code: Delete Workspace Environment Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentContainers() - .deleteWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetSamples.java deleted file mode 100644 index 0a4e3d8be7f4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetSamples.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.machinelearning.generated; - -/** - * Samples for EnvironmentContainers Get. - */ -public final class EnvironmentContainersGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/get.json - */ - /** - * Sample code: Get Workspace Environment Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentContainers() - .getWithResponse("testrg123", "testworkspace", "testEnvironment", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListSamples.java deleted file mode 100644 index 5e7fa63a1092..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListSamples.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.machinelearning.generated; - -/** - * Samples for EnvironmentContainers List. - */ -public final class EnvironmentContainersListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/list.json - */ - /** - * Sample code: List Workspace Environment Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentContainers() - .list("testrg123", "testworkspace", null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateSamples.java deleted file mode 100644 index 82cd4de87f59..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.Route; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for EnvironmentVersions CreateOrUpdate. - */ -public final class EnvironmentVersionsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Environment Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateWorkspaceEnvironmentVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentVersions() - .define("string") - .withExistingEnvironment("test-rg", "my-aml-workspace", "string") - .withProperties(new EnvironmentVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsAnonymous(false) - .withImage("docker.io/tensorflow/serving:latest") - .withCondaFile("string") - .withBuild(new BuildContext().withContextUri( - "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") - .withDockerfilePath("prod/Dockerfile")) - .withInferenceConfig( - new InferenceContainerProperties().withLivenessRoute(new Route().withPath("string").withPort(1)) - .withReadinessRoute(new Route().withPath("string").withPort(1)) - .withScoringRoute(new Route().withPath("string").withPort(1)))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteSamples.java deleted file mode 100644 index 412d60573bdf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for EnvironmentVersions Delete. - */ -public final class EnvironmentVersionsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/delete.json - */ - /** - * Sample code: Delete Workspace Environment Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetSamples.java deleted file mode 100644 index 289043d8fb9a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetSamples.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.machinelearning.generated; - -/** - * Samples for EnvironmentVersions Get. - */ -public final class EnvironmentVersionsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/get.json - */ - /** - * Sample code: Get Workspace Environment Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListSamples.java deleted file mode 100644 index 72e5668bc711..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListSamples.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.machinelearning.generated; - -/** - * Samples for EnvironmentVersions List. - */ -public final class EnvironmentVersionsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/list.json - */ - /** - * Sample code: List Workspace Environment Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentVersions() - .list("test-rg", "my-aml-workspace", "string", "string", 1, null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishSamples.java deleted file mode 100644 index ad60e007c4f4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; - -/** - * Samples for EnvironmentVersions Publish. - */ -public final class EnvironmentVersionsPublishSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/publish.json - */ - /** - * Sample code: Publish Workspace Environment Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - publishWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentVersions() - .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetSamples.java deleted file mode 100644 index 7d2372bebf65..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetSamples.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.machinelearning.generated; - -/** - * Samples for Features Get. - */ -public final class FeaturesGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Feature/get.json - */ - /** - * Sample code: Get Feature. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getFeature(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.features() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", "string", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListSamples.java deleted file mode 100644 index 88754e3799cb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListSamples.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.machinelearning.generated; - -/** - * Samples for Features List. - */ -public final class FeaturesListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Feature/list.json - */ - /** - * Sample code: List Feature. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listFeature(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.features() - .list("test-rg", "my-aml-workspace", "string", "string", null, "string", "string", "string", null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateSamples.java deleted file mode 100644 index 7d37a501db9d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for FeaturesetContainers CreateOrUpdate. - */ -public final class FeaturesetContainersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Featureset Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateWorkspaceFeaturesetContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetContainers() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new FeaturesetContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsArchived(false)) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteSamples.java deleted file mode 100644 index 9575c34ce336..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteSamples.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.machinelearning.generated; - -/** - * Samples for FeaturesetContainers Delete. - */ -public final class FeaturesetContainersDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/delete.json - */ - /** - * Sample code: Delete Workspace Featureset Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceFeaturesetContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetContainers() - .delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntitySamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntitySamples.java deleted file mode 100644 index 22ec1d806e0f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntitySamples.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.machinelearning.generated; - -/** - * Samples for FeaturesetContainers GetEntity. - */ -public final class FeaturesetContainersGetEntitySamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/getEntity.json - */ - /** - * Sample code: GetEntity Workspace Featureset Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getEntityWorkspaceFeaturesetContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetContainers() - .getEntityWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListSamples.java deleted file mode 100644 index f585cdb2c8e1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * Samples for FeaturesetContainers List. - */ -public final class FeaturesetContainersListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/list.json - */ - /** - * Sample code: List Workspace Featureset Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceFeaturesetContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetContainers() - .list("test-rg", "my-aml-workspace", null, "string", ListViewType.ARCHIVED_ONLY, null, null, null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillSamples.java deleted file mode 100644 index 948db8be1384..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.DataAvailabilityStatus; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; -import com.azure.resourcemanager.machinelearning.models.FeatureWindow; -import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for FeaturesetVersions Backfill. - */ -public final class FeaturesetVersionsBackfillSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/backfill.json - */ - /** - * Sample code: Backfill Workspace Featureset Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - backfillWorkspaceFeaturesetVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetVersions() - .backfill("test-rg", "my-aml-workspace", "string", "string", - new FeaturesetVersionBackfillRequest().withDisplayName("string") - .withDescription("string") - .withFeatureWindow(new FeatureWindow() - .withFeatureWindowStart(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51")) - .withFeatureWindowEnd(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51"))) - .withDataAvailabilityStatus(Arrays.asList(DataAvailabilityStatus.NONE)) - .withJobId("string") - .withTags(mapOf("string", "string")) - .withResource(new MaterializationComputeResource().withInstanceType("string")) - .withSparkConfiguration(mapOf("string", "string")), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateSamples.java deleted file mode 100644 index 9765d26856f5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties; -import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; -import com.azure.resourcemanager.machinelearning.models.MaterializationSettings; -import com.azure.resourcemanager.machinelearning.models.MaterializationStoreType; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for FeaturesetVersions CreateOrUpdate. - */ -public final class FeaturesetVersionsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Featureset Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateWorkspaceFeaturesetVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetVersions() - .define("string") - .withExistingFeatureset("test-rg", "my-aml-workspace", "string") - .withProperties(new FeaturesetVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsArchived(false) - .withIsAnonymous(false) - .withSpecification(new FeaturesetSpecification().withPath("string")) - .withMaterializationSettings( - new MaterializationSettings().withStoreType(MaterializationStoreType.ONLINE) - .withSchedule(new RecurrenceTrigger().withEndTime("string") - .withStartTime("string") - .withTimeZone("string") - .withFrequency(RecurrenceFrequency.DAY) - .withInterval(1) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList(1)) - .withMinutes(Arrays.asList(1)) - .withWeekDays(Arrays.asList(WeekDay.MONDAY)) - .withMonthDays(Arrays.asList(1)))) - .withNotification(new NotificationSetting().withEmails(Arrays.asList("string")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED))) - .withResource(new MaterializationComputeResource().withInstanceType("string")) - .withSparkConfiguration(mapOf("string", "string"))) - .withStage("string") - .withEntities(Arrays.asList("string"))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteSamples.java deleted file mode 100644 index 48a4b01aa8e5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for FeaturesetVersions Delete. - */ -public final class FeaturesetVersionsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/delete.json - */ - /** - * Sample code: Delete Workspace Featureset Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceFeaturesetVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetVersions() - .delete("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetSamples.java deleted file mode 100644 index 059e017be1ea..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetSamples.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.machinelearning.generated; - -/** - * Samples for FeaturesetVersions Get. - */ -public final class FeaturesetVersionsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/get.json - */ - /** - * Sample code: Get Workspace Featureset Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceFeaturesetVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListSamples.java deleted file mode 100644 index d44a4673c733..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * Samples for FeaturesetVersions List. - */ -public final class FeaturesetVersionsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/list.json - */ - /** - * Sample code: List Workspace Featureset Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceFeaturesetVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetVersions() - .list("test-rg", "my-aml-workspace", "string", null, "string", ListViewType.ALL, null, null, null, null, - null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateSamples.java deleted file mode 100644 index 3dca0b60ead7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for FeaturestoreEntityContainers CreateOrUpdate. - */ -public final class FeaturestoreEntityContainersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Featurestore Entity Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateWorkspaceFeaturestoreEntityContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityContainers() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsArchived(false)) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteSamples.java deleted file mode 100644 index 8ea6a8bb35b6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteSamples.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.machinelearning.generated; - -/** - * Samples for FeaturestoreEntityContainers Delete. - */ -public final class FeaturestoreEntityContainersDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/delete.json - */ - /** - * Sample code: Delete Workspace Featurestore Entity Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteWorkspaceFeaturestoreEntityContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityContainers() - .delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntitySamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntitySamples.java deleted file mode 100644 index 657178baa01f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntitySamples.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.machinelearning.generated; - -/** - * Samples for FeaturestoreEntityContainers GetEntity. - */ -public final class FeaturestoreEntityContainersGetEntitySamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/getEntity.json - */ - /** - * Sample code: GetEntity Workspace Featurestore Entity Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getEntityWorkspaceFeaturestoreEntityContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityContainers() - .getEntityWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListSamples.java deleted file mode 100644 index 51852e6c654c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * Samples for FeaturestoreEntityContainers List. - */ -public final class FeaturestoreEntityContainersListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/list.json - */ - /** - * Sample code: List Workspace Featurestore Entity Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listWorkspaceFeaturestoreEntityContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityContainers() - .list("test-rg", "my-aml-workspace", null, "string", ListViewType.ALL, null, null, null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateSamples.java deleted file mode 100644 index df724c33bd15..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties; -import com.azure.resourcemanager.machinelearning.models.IndexColumn; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for FeaturestoreEntityVersions CreateOrUpdate. - */ -public final class FeaturestoreEntityVersionsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Featurestore Entity Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateWorkspaceFeaturestoreEntityVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityVersions() - .define("string") - .withExistingFeaturestoreEntity("test-rg", "my-aml-workspace", "string") - .withProperties( - new FeaturestoreEntityVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsArchived(false) - .withIsAnonymous(false) - .withIndexColumns(Arrays - .asList(new IndexColumn().withDataType(FeatureDataType.DATETIME).withColumnName("string")))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteSamples.java deleted file mode 100644 index 260d6d2592a6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for FeaturestoreEntityVersions Delete. - */ -public final class FeaturestoreEntityVersionsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/delete.json - */ - /** - * Sample code: Delete Workspace Featurestore Entity Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteWorkspaceFeaturestoreEntityVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityVersions() - .delete("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetSamples.java deleted file mode 100644 index 92c8afc6ee90..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetSamples.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.machinelearning.generated; - -/** - * Samples for FeaturestoreEntityVersions Get. - */ -public final class FeaturestoreEntityVersionsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/get.json - */ - /** - * Sample code: Get Workspace Featurestore Entity Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getWorkspaceFeaturestoreEntityVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListSamples.java deleted file mode 100644 index 86fdd78399a8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * Samples for FeaturestoreEntityVersions List. - */ -public final class FeaturestoreEntityVersionsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/list.json - */ - /** - * Sample code: List Workspace Featurestore Entity Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listWorkspaceFeaturestoreEntityVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityVersions() - .list("test-rg", "my-aml-workspace", "string", null, "string", ListViewType.ACTIVE_ONLY, null, null, null, - null, null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelSamples.java deleted file mode 100644 index b088c953d6ab..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelSamples.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.machinelearning.generated; - -/** - * Samples for Jobs Cancel. - */ -public final class JobsCancelSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/cancel.json - */ - /** - * Sample code: Cancel Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void cancelJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().cancel("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java deleted file mode 100644 index 0b075fc721a1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.AmlToken; -import com.azure.resourcemanager.machinelearning.models.AutoMLJob; -import com.azure.resourcemanager.machinelearning.models.CommandJob; -import com.azure.resourcemanager.machinelearning.models.CommandJobLimits; -import com.azure.resourcemanager.machinelearning.models.Goal; -import com.azure.resourcemanager.machinelearning.models.GridSamplingAlgorithm; -import com.azure.resourcemanager.machinelearning.models.ImageClassification; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.LiteralJobInput; -import com.azure.resourcemanager.machinelearning.models.MedianStoppingPolicy; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.Mpi; -import com.azure.resourcemanager.machinelearning.models.Objective; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.PipelineJob; -import com.azure.resourcemanager.machinelearning.models.SweepJob; -import com.azure.resourcemanager.machinelearning.models.SweepJobLimits; -import com.azure.resourcemanager.machinelearning.models.TensorFlow; -import com.azure.resourcemanager.machinelearning.models.TrialComponent; -import com.azure.resourcemanager.machinelearning.models.UriFileJobOutput; -import java.io.IOException; -import java.time.Duration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Jobs CreateOrUpdate. - */ -public final class JobsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/AutoMLJob/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate AutoML Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateAutoMLJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - manager.jobs() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new AutoMLJob().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withDisplayName("string") - .withExperimentName("string") - .withServices(mapOf("string", - new JobService().withJobServiceType("string") - .withPort(1) - .withEndpoint("string") - .withProperties(mapOf("string", "string")))) - .withComputeId("string") - .withIsArchived(false) - .withIdentity(new AmlToken()) - .withResources(new JobResourceConfiguration().withInstanceCount(1) - .withInstanceType("string") - .withProperties(mapOf("string", - SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad\":null}", Object.class, - SerializerEncoding.JSON)))) - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withTaskDetails(new ImageClassification().withTrainingData(new MLTableJobInput().withUri("string")) - .withTargetColumnName("string") - .withModelSettings(new ImageModelSettingsClassification().withValidationCropSize(2)) - .withSearchSpace(Arrays.asList( - new ImageModelDistributionSettingsClassification().withValidationCropSize("choice(2, 360)"))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(2))) - .withOutputs(mapOf("string", - new UriFileJobOutput().withDescription("string") - .withUri("string") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT)))) - .create(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/SweepJob/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Sweep Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateSweepJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - manager.jobs() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new SweepJob().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withDisplayName("string") - .withExperimentName("string") - .withServices(mapOf("string", - new JobService().withJobServiceType("string") - .withPort(1) - .withEndpoint("string") - .withProperties(mapOf("string", "string")))) - .withComputeId("string") - .withSearchSpace(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"string\":{}}", Object.class, SerializerEncoding.JSON)) - .withSamplingAlgorithm(new GridSamplingAlgorithm()) - .withLimits(new SweepJobLimits().withMaxTotalTrials(1) - .withMaxConcurrentTrials(1) - .withTrialTimeout(Duration.parse("PT1S"))) - .withEarlyTermination(new MedianStoppingPolicy().withEvaluationInterval(1).withDelayEvaluation(1)) - .withObjective(new Objective().withPrimaryMetric("string").withGoal(Goal.MINIMIZE)) - .withTrial(new TrialComponent().withCodeId("fakeTokenPlaceholder") - .withCommand("string") - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withDistribution(new Mpi().withProcessCountPerInstance(1)) - .withResources(new JobResourceConfiguration().withInstanceCount(1) - .withInstanceType("string") - .withProperties(mapOf("string", - SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"e6b6493e-7d5e-4db3-be1e-306ec641327e\":null}", Object.class, - SerializerEncoding.JSON)))))) - .create(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/PipelineJob/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Pipeline Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdatePipelineJob( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - manager.jobs() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new PipelineJob().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withDisplayName("string") - .withExperimentName("string") - .withServices(mapOf("string", - new JobService().withJobServiceType("string") - .withPort(1) - .withEndpoint("string") - .withProperties(mapOf("string", "string")))) - .withComputeId("string") - .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)) - .withInputs(mapOf("string", new LiteralJobInput().withDescription("string").withValue("string"))) - .withOutputs(mapOf("string", - new UriFileJobOutput().withDescription("string") - .withUri("string") - .withMode(OutputDeliveryMode.UPLOAD)))) - .create(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/CommandJob/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Command Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateCommandJob( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - manager.jobs() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new CommandJob().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withDisplayName("string") - .withExperimentName("string") - .withServices(mapOf("string", - new JobService().withJobServiceType("string") - .withPort(1) - .withEndpoint("string") - .withProperties(mapOf("string", "string")))) - .withComputeId("string") - .withIdentity(new AmlToken()) - .withResources(new JobResourceConfiguration().withInstanceCount(1) - .withInstanceType("string") - .withProperties(mapOf("string", - SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"e6b6493e-7d5e-4db3-be1e-306ec641327e\":null}", Object.class, - SerializerEncoding.JSON)))) - .withCodeId("fakeTokenPlaceholder") - .withCommand("string") - .withEnvironmentId("string") - .withInputs(mapOf("string", new LiteralJobInput().withDescription("string").withValue("string"))) - .withOutputs(mapOf("string", - new UriFileJobOutput().withDescription("string") - .withUri("string") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT))) - .withDistribution(new TensorFlow().withWorkerCount(1).withParameterServerCount(1)) - .withLimits(new CommandJobLimits().withTimeout(Duration.parse("PT5M"))) - .withEnvironmentVariables(mapOf("string", "string"))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteSamples.java deleted file mode 100644 index 06c963d241c3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for Jobs Delete. - */ -public final class JobsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/delete.json - */ - /** - * Sample code: Delete Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs() - .delete("test-rg", "my-aml-workspace", - "http://subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/my-favorite-aml-job", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsGetSamples.java deleted file mode 100644 index 1577e8c5a9e1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsGetSamples.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.machinelearning.generated; - -/** - * Samples for Jobs Get. - */ -public final class JobsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/CommandJob/get.json - */ - /** - * Sample code: Get Command Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getCommandJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/AutoMLJob/get.json - */ - /** - * Sample code: Get AutoML Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getAutoMLJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/SweepJob/get.json - */ - /** - * Sample code: Get Sweep Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getSweepJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/PipelineJob/get.json - */ - /** - * Sample code: Get Pipeline Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getPipelineJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsListSamples.java deleted file mode 100644 index 96283b6c8e09..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsListSamples.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.machinelearning.generated; - -/** - * Samples for Jobs List. - */ -public final class JobsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/CommandJob/list.json - */ - /** - * Sample code: List Command Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listCommandJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs() - .list("test-rg", "my-aml-workspace", null, "string", "string", null, null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/PipelineJob/list.json - */ - /** - * Sample code: List Pipeline Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listPipelineJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs() - .list("test-rg", "my-aml-workspace", null, "string", "string", null, null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/SweepJob/list.json - */ - /** - * Sample code: List Sweep Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listSweepJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs() - .list("test-rg", "my-aml-workspace", null, "string", "string", null, null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/AutoMLJob/list.json - */ - /** - * Sample code: List AutoML Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listAutoMLJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs() - .list("test-rg", "my-aml-workspace", null, null, null, null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkSamples.java deleted file mode 100644 index fe00570a7558..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions; - -/** - * Samples for ManagedNetworkProvisions ProvisionManagedNetwork. - */ -public final class ManagedNetworkProvisionsProvisionManagedNetworkSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/provision.json - */ - /** - * Sample code: Provision ManagedNetwork. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - provisionManagedNetwork(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.managedNetworkProvisions() - .provisionManagedNetwork("test-rg", "aml-workspace-name", - new ManagedNetworkProvisionOptions().withIncludeSpark(false), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleCreateOrUpdateSamples.java deleted file mode 100644 index ddd8e88b1351..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.FqdnOutboundRule; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; - -/** - * Samples for ManagedNetworkSettingsRule CreateOrUpdate. - */ -public final class ManagedNetworkSettingsRuleCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/createOrUpdateRule.json - */ - /** - * Sample code: CreateOrUpdate ManagedNetworkSettingsRule. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateManagedNetworkSettingsRule( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.managedNetworkSettingsRules() - .define("rule_name_1") - .withExistingWorkspace("test-rg", "aml-workspace-name") - .withProperties(new FqdnOutboundRule().withCategory(RuleCategory.USER_DEFINED) - .withStatus(RuleStatus.ACTIVE) - .withDestination("destination_endpoint")) - .create(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleDeleteSamples.java deleted file mode 100644 index a90f21df55ff..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleDeleteSamples.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.machinelearning.generated; - -/** - * Samples for ManagedNetworkSettingsRule Delete. - */ -public final class ManagedNetworkSettingsRuleDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/deleteRule.json - */ - /** - * Sample code: Delete ManagedNetworkSettingsRule. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteManagedNetworkSettingsRule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.managedNetworkSettingsRules() - .delete("test-rg", "aml-workspace-name", "rule-name", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleGetSamples.java deleted file mode 100644 index 1ccacdcb5e9f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleGetSamples.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.machinelearning.generated; - -/** - * Samples for ManagedNetworkSettingsRule Get. - */ -public final class ManagedNetworkSettingsRuleGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/getRule.json - */ - /** - * Sample code: Get ManagedNetworkSettingsRule. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getManagedNetworkSettingsRule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.managedNetworkSettingsRules() - .getWithResponse("test-rg", "aml-workspace-name", "name_of_the_fqdn_rule", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleListSamples.java deleted file mode 100644 index 2f19211ab7b5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleListSamples.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.machinelearning.generated; - -/** - * Samples for ManagedNetworkSettingsRule List. - */ -public final class ManagedNetworkSettingsRuleListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/listRule.json - */ - /** - * Sample code: List ManagedNetworkSettingsRule. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listManagedNetworkSettingsRule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.managedNetworkSettingsRules().list("test-rg", "aml-workspace-name", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateSamples.java deleted file mode 100644 index 6c2429d5bb83..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties; - -/** - * Samples for MarketplaceSubscriptions CreateOrUpdate. - */ -public final class MarketplaceSubscriptionsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Marketplace Subscription. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateWorkspaceMarketplaceSubscription( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.marketplaceSubscriptions() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new MarketplaceSubscriptionProperties().withModelId("string")) - .create(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsDeleteSamples.java deleted file mode 100644 index 4fa5c22d7102..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for MarketplaceSubscriptions Delete. - */ -public final class MarketplaceSubscriptionsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/delete.json - */ - /** - * Sample code: Delete Workspace Marketplace Subscription. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteWorkspaceMarketplaceSubscription( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.marketplaceSubscriptions() - .delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetSamples.java deleted file mode 100644 index 243cf647cdc2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetSamples.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.machinelearning.generated; - -/** - * Samples for MarketplaceSubscriptions Get. - */ -public final class MarketplaceSubscriptionsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/get.json - */ - /** - * Sample code: Get Workspace Marketplace Subscription. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceMarketplaceSubscription(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.marketplaceSubscriptions() - .getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListSamples.java deleted file mode 100644 index 346d0fe46a83..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListSamples.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.machinelearning.generated; - -/** - * Samples for MarketplaceSubscriptions List. - */ -public final class MarketplaceSubscriptionsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/list.json - */ - /** - * Sample code: List Workspace Marketplace Subscription. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceMarketplaceSubscription(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.marketplaceSubscriptions().list("test-rg", "my-aml-workspace", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateSamples.java deleted file mode 100644 index 12628a6fbc3e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ModelContainers CreateOrUpdate. - */ -public final class ModelContainersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Model Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateWorkspaceModelContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.modelContainers() - .define("testContainer") - .withExistingWorkspace("testrg123", "workspace123") - .withProperties(new ModelContainerProperties().withDescription("Model container description") - .withTags(mapOf("tag1", "value1", "tag2", "value2"))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteSamples.java deleted file mode 100644 index b9a5dac8d512..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteSamples.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.machinelearning.generated; - -/** - * Samples for ModelContainers Delete. - */ -public final class ModelContainersDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/delete.json - */ - /** - * Sample code: Delete Workspace Model Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.modelContainers() - .deleteWithResponse("testrg123", "workspace123", "testContainer", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetSamples.java deleted file mode 100644 index 2835c3d7abce..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetSamples.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.machinelearning.generated; - -/** - * Samples for ModelContainers Get. - */ -public final class ModelContainersGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/get.json - */ - /** - * Sample code: Get Workspace Model Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.modelContainers() - .getWithResponse("testrg123", "workspace123", "testContainer", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListSamples.java deleted file mode 100644 index 22a403b08f35..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListSamples.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.machinelearning.generated; - -/** - * Samples for ModelContainers List. - */ -public final class ModelContainersListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/list.json - */ - /** - * Sample code: List Workspace Model Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.modelContainers().list("testrg123", "workspace123", null, null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateSamples.java deleted file mode 100644 index 05f0b164b294..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ModelVersions CreateOrUpdate. - */ -public final class ModelVersionsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Model Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - createOrUpdateWorkspaceModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.modelVersions() - .define("string") - .withExistingModel("test-rg", "my-aml-workspace", "string") - .withProperties(new ModelVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsAnonymous(false) - .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) - .withModelType("CustomModel") - .withModelUri("string")) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteSamples.java deleted file mode 100644 index 81d7fee23d4e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for ModelVersions Delete. - */ -public final class ModelVersionsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/delete.json - */ - /** - * Sample code: Delete Workspace Model Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.modelVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetSamples.java deleted file mode 100644 index a7ebce68fb46..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetSamples.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.machinelearning.generated; - -/** - * Samples for ModelVersions Get. - */ -public final class ModelVersionsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/get.json - */ - /** - * Sample code: Get Workspace Model Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.modelVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListSamples.java deleted file mode 100644 index dde491a5bc15..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListSamples.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.machinelearning.generated; - -/** - * Samples for ModelVersions List. - */ -public final class ModelVersionsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/list.json - */ - /** - * Sample code: List Workspace Model Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.modelVersions() - .list("test-rg", "my-aml-workspace", "string", null, "string", 1, "string", "string", 1, "string", "string", - null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishSamples.java deleted file mode 100644 index dad0ce4285f3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; - -/** - * Samples for ModelVersions Publish. - */ -public final class ModelVersionsPublishSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/publish.json - */ - /** - * Sample code: Publish Workspace Model Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - publishWorkspaceModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.modelVersions() - .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsCreateOrUpdateSamples.java deleted file mode 100644 index b21db6a8c226..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.CodeConfiguration; -import com.azure.resourcemanager.machinelearning.models.ContainerResourceRequirements; -import com.azure.resourcemanager.machinelearning.models.ContainerResourceSettings; -import com.azure.resourcemanager.machinelearning.models.DefaultScaleSettings; -import com.azure.resourcemanager.machinelearning.models.KubernetesOnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.ManagedOnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineRequestSettings; -import com.azure.resourcemanager.machinelearning.models.ProbeSettings; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.time.Duration; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for OnlineDeployments CreateOrUpdate. - */ -public final class OnlineDeploymentsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Kubernetes Online Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateKubernetesOnlineDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineDeployments() - .define("testDeploymentName") - .withRegion("string") - .withExistingOnlineEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties(new KubernetesOnlineDeployment().withDescription("string") - .withProperties(mapOf("string", "string")) - .withCodeConfiguration( - new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withScaleSettings(new DefaultScaleSettings()) - .withRequestSettings(new OnlineRequestSettings().withMaxQueueWait(Duration.parse("PT5M")) - .withRequestTimeout(Duration.parse("PT5M")) - .withMaxConcurrentRequestsPerInstance(1)) - .withModelMountPath("string") - .withAppInsightsEnabled(false) - .withLivenessProbe(new ProbeSettings().withFailureThreshold(1) - .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT5M")) - .withPeriod(Duration.parse("PT5M")) - .withInitialDelay(Duration.parse("PT5M"))) - .withInstanceType("string") - .withModel("string") - .withContainerResourceRequirements(new ContainerResourceRequirements() - .withContainerResourceRequests( - new ContainerResourceSettings().withCpu("\"1\"").withMemory("\"2Gi\"").withGpu("\"1\"")) - .withContainerResourceLimits( - new ContainerResourceSettings().withCpu("\"1\"").withMemory("\"2Gi\"").withGpu("\"1\"")))) - .withTags(mapOf()) - .withKind("string") - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withSku(new Sku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .create(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Managed Online Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateManagedOnlineDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineDeployments() - .define("testDeploymentName") - .withRegion("string") - .withExistingOnlineEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties(new ManagedOnlineDeployment().withDescription("string") - .withProperties(mapOf("string", "string")) - .withCodeConfiguration( - new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withScaleSettings(new DefaultScaleSettings()) - .withRequestSettings(new OnlineRequestSettings().withMaxQueueWait(Duration.parse("PT5M")) - .withRequestTimeout(Duration.parse("PT5M")) - .withMaxConcurrentRequestsPerInstance(1)) - .withModelMountPath("string") - .withAppInsightsEnabled(false) - .withLivenessProbe(new ProbeSettings().withFailureThreshold(1) - .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT5M")) - .withPeriod(Duration.parse("PT5M")) - .withInitialDelay(Duration.parse("PT5M"))) - .withReadinessProbe(new ProbeSettings().withFailureThreshold(30) - .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT2S")) - .withPeriod(Duration.parse("PT10S")) - .withInitialDelay(Duration.parse("PT1S"))) - .withInstanceType("string") - .withModel("string")) - .withTags(mapOf()) - .withKind("string") - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withSku(new Sku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteSamples.java deleted file mode 100644 index 76577d8486dd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for OnlineDeployments Delete. - */ -public final class OnlineDeploymentsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineDeployment/delete.json - */ - /** - * Sample code: Delete Workspace Online Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceOnlineDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineDeployments() - .delete("testrg123", "workspace123", "testEndpoint", "testDeployment", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsSamples.java deleted file mode 100644 index 77f5fa60698b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.ContainerType; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; - -/** - * Samples for OnlineDeployments GetLogs. - */ -public final class OnlineDeploymentsGetLogsSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/getLogs.json - */ - /** - * Sample code: Get Online Deployment Logs. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getOnlineDeploymentLogs(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineDeployments() - .getLogsWithResponse("testrg123", "workspace123", "testEndpoint", "testDeployment", - new DeploymentLogsRequest().withContainerType(ContainerType.STORAGE_INITIALIZER).withTail(0), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetSamples.java deleted file mode 100644 index f883224d2527..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetSamples.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.machinelearning.generated; - -/** - * Samples for OnlineDeployments Get. - */ -public final class OnlineDeploymentsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/get.json - */ - /** - * Sample code: Get Kubernetes Online Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getKubernetesOnlineDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineDeployments() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/get.json - */ - /** - * Sample code: Get Managed Online Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getManagedOnlineDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineDeployments() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSamples.java deleted file mode 100644 index 2327d527e2bd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSamples.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.machinelearning.generated; - -/** - * Samples for OnlineDeployments List. - */ -public final class OnlineDeploymentsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/list.json - */ - /** - * Sample code: List Online Deployments. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listOnlineDeployments(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineDeployments() - .list("test-rg", "my-aml-workspace", "testEndpointName", "string", 1, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.java deleted file mode 100644 index f9c82cad08a9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.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.machinelearning.generated; - -/** - * Samples for OnlineDeployments ListSkus. - */ -public final class OnlineDeploymentsListSkusSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json - */ - /** - * Sample code: List Managed Online Deployment Skus. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listManagedOnlineDeploymentSkus(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineDeployments() - .listSkus("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", 1, null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json - */ - /** - * Sample code: List Kubernetes Online Deployment Skus. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listKubernetesOnlineDeploymentSkus(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineDeployments() - .listSkus("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", 1, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsUpdateSamples.java deleted file mode 100644 index cf33e07fcbeb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.OnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for OnlineDeployments Update. - */ -public final class OnlineDeploymentsUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/update.json - */ - /** - * Sample code: Update Managed Online Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - updateManagedOnlineDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - OnlineDeployment resource = manager.onlineDeployments() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf()) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .apply(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/update.json - */ - /** - * Sample code: Update Kubernetes Online Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - updateKubernetesOnlineDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - OnlineDeployment resource = manager.onlineDeployments() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf()) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsCreateOrUpdateSamples.java deleted file mode 100644 index ba5238faf74a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.EndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for OnlineEndpoints CreateOrUpdate. - */ -public final class OnlineEndpointsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateWorkspaceOnlineEndpoint( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineEndpoints() - .define("testEndpointName") - .withRegion("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new OnlineEndpointProperties().withDescription("string") - .withProperties(mapOf("string", "string")) - .withAuthMode(EndpointAuthMode.AMLTOKEN) - .withCompute("string") - .withTraffic(mapOf("string", 1))) - .withTags(mapOf()) - .withKind("string") - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withSku(new Sku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteSamples.java deleted file mode 100644 index 98fe3c6eac61..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for OnlineEndpoints Delete. - */ -public final class OnlineEndpointsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/delete.json - */ - /** - * Sample code: Delete Workspace Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineEndpoints() - .delete("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetSamples.java deleted file mode 100644 index 166c01c35334..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetSamples.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.machinelearning.generated; - -/** - * Samples for OnlineEndpoints Get. - */ -public final class OnlineEndpointsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/get.json - */ - /** - * Sample code: Get Workspace Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineEndpoints() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetTokenSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetTokenSamples.java deleted file mode 100644 index ced9eb79c111..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetTokenSamples.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.machinelearning.generated; - -/** - * Samples for OnlineEndpoints GetToken. - */ -public final class OnlineEndpointsGetTokenSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/getToken.json - */ - /** - * Sample code: GetToken Workspace Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getTokenWorkspaceOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineEndpoints() - .getTokenWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListKeysSamples.java deleted file mode 100644 index f588f47ec28c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListKeysSamples.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.machinelearning.generated; - -/** - * Samples for OnlineEndpoints ListKeys. - */ -public final class OnlineEndpointsListKeysSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/listKeys.json - */ - /** - * Sample code: ListKeys Workspace Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listKeysWorkspaceOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineEndpoints() - .listKeysWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListSamples.java deleted file mode 100644 index c38212d46e73..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.EndpointComputeType; -import com.azure.resourcemanager.machinelearning.models.OrderString; - -/** - * Samples for OnlineEndpoints List. - */ -public final class OnlineEndpointsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/list.json - */ - /** - * Sample code: List Workspace Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineEndpoints() - .list("test-rg", "my-aml-workspace", "string", 1, EndpointComputeType.MANAGED, null, "string", "string", - OrderString.CREATED_AT_DESC, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsRegenerateKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsRegenerateKeysSamples.java deleted file mode 100644 index 02405cfeda2b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsRegenerateKeysSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.KeyType; -import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; - -/** - * Samples for OnlineEndpoints RegenerateKeys. - */ -public final class OnlineEndpointsRegenerateKeysSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/regenerateKeys.json - */ - /** - * Sample code: RegenerateKeys Workspace Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void regenerateKeysWorkspaceOnlineEndpoint( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineEndpoints() - .regenerateKeys("test-rg", "my-aml-workspace", "testEndpointName", - new RegenerateEndpointKeysRequest().withKeyType(KeyType.PRIMARY).withKeyValue("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsUpdateSamples.java deleted file mode 100644 index da734f187c6b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsUpdateSamples.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.machinelearning.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpoint; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for OnlineEndpoints Update. - */ -public final class OnlineEndpointsUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/update.json - */ - /** - * Sample code: Update Workspace Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateWorkspaceOnlineEndpoint( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - OnlineEndpoint resource = manager.onlineEndpoints() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf()) - .withIdentity(new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", - SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OperationsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OperationsListSamples.java deleted file mode 100644 index 1de8bcc4511a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OperationsListSamples.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.machinelearning.generated; - -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/operationsList.json - */ - /** - * Sample code: OperationsList. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void operationsList(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java deleted file mode 100644 index 7637883c3920..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; - -/** - * Samples for PrivateEndpointConnections CreateOrUpdate. - */ -public final class PrivateEndpointConnectionsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/createOrUpdate.json - */ - /** - * Sample code: WorkspacePutPrivateEndpointConnection. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void workspacePutPrivateEndpointConnection( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.privateEndpointConnections() - .define("{privateEndpointConnectionName}") - .withExistingWorkspace("rg-1234", "testworkspace") - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Auto-Approved")) - .create(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteSamples.java deleted file mode 100644 index b64f4d37ef22..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for PrivateEndpointConnections Delete. - */ -public final class PrivateEndpointConnectionsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/delete.json - */ - /** - * Sample code: WorkspaceDeletePrivateEndpointConnection. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void workspaceDeletePrivateEndpointConnection( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.privateEndpointConnections() - .deleteWithResponse("rg-1234", "testworkspace", "{privateEndpointConnectionName}", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetSamples.java deleted file mode 100644 index b137954fedb3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetSamples.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.machinelearning.generated; - -/** - * Samples for PrivateEndpointConnections Get. - */ -public final class PrivateEndpointConnectionsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/get.json - */ - /** - * Sample code: WorkspaceGetPrivateEndpointConnection. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void workspaceGetPrivateEndpointConnection( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.privateEndpointConnections() - .getWithResponse("rg-1234", "testworkspace", "{privateEndpointConnectionName}", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListSamples.java deleted file mode 100644 index a87e0762b3a8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListSamples.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.machinelearning.generated; - -/** - * Samples for PrivateEndpointConnections List. - */ -public final class PrivateEndpointConnectionsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/list.json - */ - /** - * Sample code: StorageAccountListPrivateEndpointConnections. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void storageAccountListPrivateEndpointConnections( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.privateEndpointConnections().list("rg-1234", "testworkspace", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListSamples.java deleted file mode 100644 index 6821d71c24f1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListSamples.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.machinelearning.generated; - -/** - * Samples for PrivateLinkResources List. - */ -public final class PrivateLinkResourcesListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateLinkResource/list.json - */ - /** - * Sample code: WorkspaceListPrivateLinkResources. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - workspaceListPrivateLinkResources(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.privateLinkResources().listWithResponse("rg-1234", "testworkspace", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasListSamples.java deleted file mode 100644 index 9b662845f970..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasListSamples.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.machinelearning.generated; - -/** - * Samples for Quotas List. - */ -public final class QuotasListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Quota/list.json - */ - /** - * Sample code: List workspace quotas by VMFamily. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceQuotasByVMFamily(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.quotas().list("eastus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateSamples.java deleted file mode 100644 index affcf1a4cfdf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties; -import com.azure.resourcemanager.machinelearning.models.QuotaUnit; -import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; -import java.util.Arrays; - -/** - * Samples for Quotas Update. - */ -public final class QuotasUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Quota/update.json - */ - /** - * Sample code: update quotas. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateQuotas(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.quotas() - .updateWithResponse("eastus", new QuotaUpdateParameters().withValue(Arrays.asList( - new QuotaBaseProperties().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs") - .withType("Microsoft.MachineLearningServices/workspaces/quotas") - .withLimit(100L) - .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs") - .withType("Microsoft.MachineLearningServices/workspaces/quotas") - .withLimit(200L) - .withUnit(QuotaUnit.COUNT))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateSamples.java deleted file mode 100644 index 97c56eab19df..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateSamples.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.AcrDetails; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Registries CreateOrUpdate. - */ -public final class RegistriesCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/createOrUpdate-SystemCreated.json - */ - /** - * Sample code: CreateOrUpdate Registry with system created accounts. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateRegistryWithSystemCreatedAccounts( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registries() - .define("string") - .withRegion("string") - .withExistingResourceGroup("test-rg") - .withTags(mapOf()) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withKind("string") - .withSku(new Sku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .withDiscoveryUrl("string") - .withIntellectualPropertyPublisher("string") - .withManagedResourceGroup(new ArmResourceId().withResourceId("string")) - .withMlFlowRegistryUri("string") - .withRegistryPrivateEndpointConnections( - Arrays.asList(new RegistryPrivateEndpointConnection().withId("string") - .withLocation("string") - .withGroupIds(Arrays.asList("string")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("string")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("string") - .withDescription("string") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) - .withProvisioningState("string"))) - .withPublicNetworkAccess("string") - .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("string") - .withAcrAccountSku("string") - .withArmResourceId(new ArmResourceId().withResourceId("string"))))) - .withLocation("string") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails() - .withSystemCreatedStorageAccount(new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId().withResourceId("string")) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("string") - .withStorageAccountType("string")))))) - .create(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/createOrUpdate-UserCreated.json - */ - /** - * Sample code: CreateOrUpdate Registry with user created accounts. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateRegistryWithUserCreatedAccounts( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registries() - .define("string") - .withRegion("string") - .withExistingResourceGroup("test-rg") - .withTags(mapOf()) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withKind("string") - .withSku(new Sku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .withDiscoveryUrl("string") - .withIntellectualPropertyPublisher("string") - .withManagedResourceGroup(new ArmResourceId().withResourceId("string")) - .withMlFlowRegistryUri("string") - .withRegistryPrivateEndpointConnections( - Arrays.asList(new RegistryPrivateEndpointConnection().withId("string") - .withLocation("string") - .withGroupIds(Arrays.asList("string")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("string")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("string") - .withDescription("string") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) - .withProvisioningState("string"))) - .withPublicNetworkAccess("string") - .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails().withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId().withResourceId("string"))))) - .withLocation("string") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails().withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId().withResourceId("string"))))))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteSamples.java deleted file mode 100644 index 605b18f560ce..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteSamples.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.machinelearning.generated; - -/** - * Samples for Registries Delete. - */ -public final class RegistriesDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/delete.json - */ - /** - * Sample code: Delete Registry. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteRegistry(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registries().delete("test-rg", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupSamples.java deleted file mode 100644 index 5ac1ac193302..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupSamples.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.machinelearning.generated; - -/** - * Samples for Registries GetByResourceGroup. - */ -public final class RegistriesGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/get-UserCreated.json - */ - /** - * Sample code: Get Registry with user created accounts. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getRegistryWithUserCreatedAccounts(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registries().getByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/get-SystemCreated.json - */ - /** - * Sample code: Get Registry with system created accounts. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getRegistryWithSystemCreatedAccounts(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registries().getByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupSamples.java deleted file mode 100644 index 510ee99393b7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupSamples.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.machinelearning.generated; - -/** - * Samples for Registries ListByResourceGroup. - */ -public final class RegistriesListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/list-UserCreated.json - */ - /** - * Sample code: List registries with user created accounts. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listRegistriesWithUserCreatedAccounts( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registries().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/list-SystemCreated.json - */ - /** - * Sample code: List registries with system created accounts. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listRegistriesWithSystemCreatedAccounts( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registries().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListSamples.java deleted file mode 100644 index 45d93209a5ce..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListSamples.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.machinelearning.generated; - -/** - * Samples for Registries List. - */ -public final class RegistriesListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/listBySubscription.json - */ - /** - * Sample code: List registries by subscription. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listRegistriesBySubscription(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registries().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsSamples.java deleted file mode 100644 index fe5143d1e173..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; -import com.azure.resourcemanager.machinelearning.models.AcrDetails; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Registries RemoveRegions. - */ -public final class RegistriesRemoveRegionsSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/removeRegions.json - */ - /** - * Sample code: Remove regions from registry. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - removeRegionsFromRegistry(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registries() - .removeRegions("test-rg", "string", - new RegistryInner().withLocation("string") - .withTags(mapOf()) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withKind("string") - .withSku(new Sku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .withDiscoveryUrl("string") - .withIntellectualPropertyPublisher("string") - .withManagedResourceGroup(new ArmResourceId().withResourceId("string")) - .withMlFlowRegistryUri("string") - .withRegistryPrivateEndpointConnections( - Arrays.asList(new RegistryPrivateEndpointConnection().withId("string") - .withLocation("string") - .withGroupIds(Arrays.asList("string")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("string")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("string") - .withDescription("string") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) - .withProvisioningState("string"))) - .withPublicNetworkAccess("string") - .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("string") - .withAcrAccountSku("string") - .withArmResourceId(new ArmResourceId().withResourceId("string"))) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount() - .withArmResourceId(new ArmResourceId().withResourceId("string"))))) - .withLocation("string") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails() - .withSystemCreatedStorageAccount( - new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId().withResourceId("string")) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("string") - .withStorageAccountType("string")) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount() - .withArmResourceId(new ArmResourceId().withResourceId("string"))))))), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesUpdateSamples.java deleted file mode 100644 index 32fc0e4361f4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.Registry; -import com.azure.resourcemanager.machinelearning.models.RegistryPartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Registries Update. - */ -public final class RegistriesUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/update-UserCreated.json - */ - /** - * Sample code: Update Registry with user created accounts. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateRegistryWithUserCreatedAccounts( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - Registry resource = manager.registries() - .getByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf()) - .withIdentity(new RegistryPartialManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.BASIC) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .apply(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/update-SystemCreated.json - */ - /** - * Sample code: Update Registry with system created accounts. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateRegistryWithSystemCreatedAccounts( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - Registry resource = manager.registries() - .getByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf()) - .withIdentity( - new RegistryPartialManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.BASIC) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateSamples.java deleted file mode 100644 index 3948fe8e66d1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for RegistryCodeContainers CreateOrUpdate. - */ -public final class RegistryCodeContainersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Registry Code Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - createOrUpdateRegistryCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryCodeContainers() - .createOrUpdate("testrg123", "testregistry", "testContainer", - new CodeContainerInner().withProperties(new CodeContainerProperties().withDescription("string") - .withTags(mapOf("tag1", "value1", "tag2", "value2"))), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteSamples.java deleted file mode 100644 index fddf1645491f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteSamples.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.machinelearning.generated; - -/** - * Samples for RegistryCodeContainers Delete. - */ -public final class RegistryCodeContainersDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/delete.json - */ - /** - * Sample code: Delete Registry Code Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteRegistryCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryCodeContainers() - .delete("testrg123", "testregistry", "testContainer", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetSamples.java deleted file mode 100644 index 55c87a4fd3cd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetSamples.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.machinelearning.generated; - -/** - * Samples for RegistryCodeContainers Get. - */ -public final class RegistryCodeContainersGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/get.json - */ - /** - * Sample code: Get Registry Code Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getRegistryCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryCodeContainers() - .getWithResponse("testrg123", "testregistry", "testContainer", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListSamples.java deleted file mode 100644 index c93e32301197..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListSamples.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.machinelearning.generated; - -/** - * Samples for RegistryCodeContainers List. - */ -public final class RegistryCodeContainersListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/list.json - */ - /** - * Sample code: List Registry Code Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listRegistryCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryCodeContainers().list("testrg123", "testregistry", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrGetStartPendingUploadSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrGetStartPendingUploadSamples.java deleted file mode 100644 index 5797cfd6351e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrGetStartPendingUploadSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; -import com.azure.resourcemanager.machinelearning.models.PendingUploadType; - -/** - * Samples for RegistryCodeVersions CreateOrGetStartPendingUpload. - */ -public final class RegistryCodeVersionsCreateOrGetStartPendingUploadSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/createOrGetStartPendingUpload.json - */ - /** - * Sample code: CreateOrGetStartPendingUpload Registry Code Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrGetStartPendingUploadRegistryCodeVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryCodeVersions() - .createOrGetStartPendingUploadWithResponse("test-rg", "registryName", "string", "string", - new PendingUploadRequestDto().withPendingUploadId("string") - .withPendingUploadType(PendingUploadType.TEMPORARY_BLOB_REFERENCE), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrUpdateSamples.java deleted file mode 100644 index 81b813de1f16..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; -import com.azure.resourcemanager.machinelearning.models.CodeVersionProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for RegistryCodeVersions CreateOrUpdate. - */ -public final class RegistryCodeVersionsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Registry Code Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - createOrUpdateRegistryCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryCodeVersions() - .createOrUpdate("test-rg", "my-aml-registry", "string", "string", - new CodeVersionInner().withProperties(new CodeVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsAnonymous(false) - .withCodeUri("fakeTokenPlaceholder")), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteSamples.java deleted file mode 100644 index 06bf92b4951f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for RegistryCodeVersions Delete. - */ -public final class RegistryCodeVersionsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/delete.json - */ - /** - * Sample code: Delete Registry Code Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteRegistryCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryCodeVersions() - .delete("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsGetSamples.java deleted file mode 100644 index 03d9147a92f5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsGetSamples.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.machinelearning.generated; - -/** - * Samples for RegistryCodeVersions Get. - */ -public final class RegistryCodeVersionsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/get.json - */ - /** - * Sample code: Get Registry Code Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getRegistryCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryCodeVersions() - .getWithResponse("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsListSamples.java deleted file mode 100644 index 6cd2872433f7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsListSamples.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.machinelearning.generated; - -/** - * Samples for RegistryCodeVersions List. - */ -public final class RegistryCodeVersionsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/list.json - */ - /** - * Sample code: List Registry Code Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listRegistryCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryCodeVersions() - .list("test-rg", "my-aml-registry", "string", "string", 1, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateSamples.java deleted file mode 100644 index ae9ac890e6b7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for RegistryComponentContainers CreateOrUpdate. - */ -public final class RegistryComponentContainersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Registry Component Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateRegistryComponentContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryComponentContainers() - .createOrUpdate("test-rg", "my-aml-registry", "string", - new ComponentContainerInner() - .withProperties(new ComponentContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string"))), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteSamples.java deleted file mode 100644 index 82604e36820c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteSamples.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.machinelearning.generated; - -/** - * Samples for RegistryComponentContainers Delete. - */ -public final class RegistryComponentContainersDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/delete.json - */ - /** - * Sample code: Delete Registry Component Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteRegistryComponentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryComponentContainers() - .delete("test-rg", "my-aml-registry", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetSamples.java deleted file mode 100644 index a69d3dc48395..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetSamples.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.machinelearning.generated; - -/** - * Samples for RegistryComponentContainers Get. - */ -public final class RegistryComponentContainersGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/get.json - */ - /** - * Sample code: Get Registry Component Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getRegistryComponentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryComponentContainers() - .getWithResponse("test-rg", "my-aml-registry", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListSamples.java deleted file mode 100644 index 4039f905f383..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListSamples.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.machinelearning.generated; - -/** - * Samples for RegistryComponentContainers List. - */ -public final class RegistryComponentContainersListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/list.json - */ - /** - * Sample code: List Registry Component Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listRegistryComponentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryComponentContainers() - .list("test-rg", "my-aml-registry", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateSamples.java deleted file mode 100644 index 9daa8bc433dd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for RegistryComponentVersions CreateOrUpdate. - */ -public final class RegistryComponentVersionsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Registry Component Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateRegistryComponentVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - manager.registryComponentVersions() - .createOrUpdate("test-rg", "my-aml-registry", "string", "string", - new ComponentVersionInner().withProperties(new ComponentVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsAnonymous(false) - .withComponentSpec(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"8ced901b-d826-477d-bfef-329da9672513\":null}", Object.class, - SerializerEncoding.JSON))), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteSamples.java deleted file mode 100644 index ab5498d5b70c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for RegistryComponentVersions Delete. - */ -public final class RegistryComponentVersionsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/delete.json - */ - /** - * Sample code: Delete Registry Component Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteRegistryComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryComponentVersions() - .delete("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetSamples.java deleted file mode 100644 index 79cfeb53d1d4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetSamples.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.machinelearning.generated; - -/** - * Samples for RegistryComponentVersions Get. - */ -public final class RegistryComponentVersionsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/get.json - */ - /** - * Sample code: Get Registry Component Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getRegistryComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryComponentVersions() - .getWithResponse("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListSamples.java deleted file mode 100644 index 2ace72a2c328..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListSamples.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.machinelearning.generated; - -/** - * Samples for RegistryComponentVersions List. - */ -public final class RegistryComponentVersionsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/list.json - */ - /** - * Sample code: List Registry Component Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listRegistryComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryComponentVersions() - .list("test-rg", "my-aml-registry", "string", "string", 1, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateSamples.java deleted file mode 100644 index f95a428f5c20..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for RegistryDataContainers CreateOrUpdate. - */ -public final class RegistryDataContainersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Registry Data Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - createOrUpdateRegistryDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryDataContainers() - .createOrUpdate("test-rg", "registryName", "string", - new DataContainerInner().withProperties(new DataContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsArchived(false) - .withDataType(DataType.URI_FOLDER)), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteSamples.java deleted file mode 100644 index b18b5baab55a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteSamples.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.machinelearning.generated; - -/** - * Samples for RegistryDataContainers Delete. - */ -public final class RegistryDataContainersDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/delete.json - */ - /** - * Sample code: Delete Registry Data Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteRegistryDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryDataContainers().delete("test-rg", "registryName", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetSamples.java deleted file mode 100644 index b2c13cde5452..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetSamples.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.machinelearning.generated; - -/** - * Samples for RegistryDataContainers Get. - */ -public final class RegistryDataContainersGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/get.json - */ - /** - * Sample code: Get Registry Data Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getRegistryDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryDataContainers() - .getWithResponse("test-rg", "registryName", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListSamples.java deleted file mode 100644 index 0a4362fe4de4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * Samples for RegistryDataContainers List. - */ -public final class RegistryDataContainersListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/registryList.json - */ - /** - * Sample code: RegistryList Registry Data Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - registryListRegistryDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryDataContainers() - .list("test-rg", "registryName", null, ListViewType.ALL, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataReferencesGetBlobReferenceSasSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataReferencesGetBlobReferenceSasSamples.java deleted file mode 100644 index 8f77dd21585b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataReferencesGetBlobReferenceSasSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasRequestDto; - -/** - * Samples for RegistryDataReferences GetBlobReferenceSas. - */ -public final class RegistryDataReferencesGetBlobReferenceSasSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/DataReference/getBlobReferenceSAS.json - */ - /** - * Sample code: GetBlobReferenceSAS Data Reference. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getBlobReferenceSASDataReference(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryDataReferences() - .getBlobReferenceSasWithResponse("test-rg", "registryName", "string", "string", - new GetBlobReferenceSasRequestDto().withAssetId("string") - .withBlobUri("https://www.contoso.com/example"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrGetStartPendingUploadSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrGetStartPendingUploadSamples.java deleted file mode 100644 index c54d42479df1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrGetStartPendingUploadSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; -import com.azure.resourcemanager.machinelearning.models.PendingUploadType; - -/** - * Samples for RegistryDataVersions CreateOrGetStartPendingUpload. - */ -public final class RegistryDataVersionsCreateOrGetStartPendingUploadSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/createOrGetStartPendingUpload.json - */ - /** - * Sample code: CreateOrGetStartPendingUpload Registry Data Version Base. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrGetStartPendingUploadRegistryDataVersionBase( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryDataVersions() - .createOrGetStartPendingUploadWithResponse("test-rg", "registryName", "string", "string", - new PendingUploadRequestDto().withPendingUploadId("string") - .withPendingUploadType(PendingUploadType.NONE), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateSamples.java deleted file mode 100644 index 576d7f848fa8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.MLTableData; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for RegistryDataVersions CreateOrUpdate. - */ -public final class RegistryDataVersionsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Registry Data Version Base. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateRegistryDataVersionBase( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryDataVersions() - .createOrUpdate("test-rg", "registryName", "string", "string", - new DataVersionBaseInner().withProperties(new MLTableData().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsArchived(false) - .withIsAnonymous(false) - .withDataUri("string") - .withReferencedUris(Arrays.asList("string"))), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteSamples.java deleted file mode 100644 index b7ce0a9f75cf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for RegistryDataVersions Delete. - */ -public final class RegistryDataVersionsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/delete.json - */ - /** - * Sample code: Delete Registry Data Version Base. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteRegistryDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryDataVersions() - .delete("test-rg", "registryName", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetSamples.java deleted file mode 100644 index a5a3dbcbfda9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetSamples.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.machinelearning.generated; - -/** - * Samples for RegistryDataVersions Get. - */ -public final class RegistryDataVersionsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/get.json - */ - /** - * Sample code: Get Registry Data Version Base. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getRegistryDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryDataVersions() - .getWithResponse("test-rg", "registryName", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListSamples.java deleted file mode 100644 index dc192c672fb8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * Samples for RegistryDataVersions List. - */ -public final class RegistryDataVersionsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/registryList.json - */ - /** - * Sample code: RegistryList Registry Data Version Base. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - registryListRegistryDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryDataVersions() - .list("test-rg", "registryName", "string", "string", 1, null, "string", ListViewType.ARCHIVED_ONLY, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateSamples.java deleted file mode 100644 index 518e85b26ba0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for RegistryEnvironmentContainers CreateOrUpdate. - */ -public final class RegistryEnvironmentContainersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Registry Environment Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateRegistryEnvironmentContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryEnvironmentContainers() - .createOrUpdate("testrg123", "testregistry", "testEnvironment", - new EnvironmentContainerInner().withProperties(new EnvironmentContainerProperties() - .withDescription("string") - .withTags( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) - .withProperties( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteSamples.java deleted file mode 100644 index c763ae823871..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteSamples.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.machinelearning.generated; - -/** - * Samples for RegistryEnvironmentContainers Delete. - */ -public final class RegistryEnvironmentContainersDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/delete.json - */ - /** - * Sample code: Delete Registry Environment Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteRegistryEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryEnvironmentContainers() - .delete("testrg123", "testregistry", "testContainer", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetSamples.java deleted file mode 100644 index 4544a14f3b79..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetSamples.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.machinelearning.generated; - -/** - * Samples for RegistryEnvironmentContainers Get. - */ -public final class RegistryEnvironmentContainersGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/get.json - */ - /** - * Sample code: Get Registry Environment Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getRegistryEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryEnvironmentContainers() - .getWithResponse("testrg123", "testregistry", "testEnvironment", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListSamples.java deleted file mode 100644 index 8c55031c2ce8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListSamples.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.machinelearning.generated; - -/** - * Samples for RegistryEnvironmentContainers List. - */ -public final class RegistryEnvironmentContainersListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/list.json - */ - /** - * Sample code: List Registry Environment Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listRegistryEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryEnvironmentContainers() - .list("testrg123", "testregistry", null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateSamples.java deleted file mode 100644 index f8d55faf952d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.Route; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for RegistryEnvironmentVersions CreateOrUpdate. - */ -public final class RegistryEnvironmentVersionsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Registry Environment Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateRegistryEnvironmentVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryEnvironmentVersions() - .createOrUpdate("test-rg", "my-aml-registry", "string", "string", - new EnvironmentVersionInner().withProperties(new EnvironmentVersionProperties() - .withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsAnonymous(false) - .withImage("docker.io/tensorflow/serving:latest") - .withCondaFile("string") - .withBuild(new BuildContext().withContextUri( - "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") - .withDockerfilePath("prod/Dockerfile")) - .withInferenceConfig( - new InferenceContainerProperties().withLivenessRoute(new Route().withPath("string").withPort(1)) - .withReadinessRoute(new Route().withPath("string").withPort(1)) - .withScoringRoute(new Route().withPath("string").withPort(1)))), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteSamples.java deleted file mode 100644 index 92d4b8e34026..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for RegistryEnvironmentVersions Delete. - */ -public final class RegistryEnvironmentVersionsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/delete.json - */ - /** - * Sample code: Delete Registry Environment Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteRegistryEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryEnvironmentVersions() - .delete("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetSamples.java deleted file mode 100644 index 21b46cad644b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetSamples.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.machinelearning.generated; - -/** - * Samples for RegistryEnvironmentVersions Get. - */ -public final class RegistryEnvironmentVersionsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/get.json - */ - /** - * Sample code: Get Registry Environment Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getRegistryEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryEnvironmentVersions() - .getWithResponse("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListSamples.java deleted file mode 100644 index 3fc953fcd188..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListSamples.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.machinelearning.generated; - -/** - * Samples for RegistryEnvironmentVersions List. - */ -public final class RegistryEnvironmentVersionsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/list.json - */ - /** - * Sample code: List Registry Environment Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listRegistryEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryEnvironmentVersions() - .list("test-rg", "my-aml-regsitry", "string", "string", 1, null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateSamples.java deleted file mode 100644 index b6531faab826..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for RegistryModelContainers CreateOrUpdate. - */ -public final class RegistryModelContainersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Registry Model Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - createOrUpdateRegistryModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryModelContainers() - .createOrUpdate("testrg123", "registry123", "testContainer", - new ModelContainerInner() - .withProperties(new ModelContainerProperties().withDescription("Model container description") - .withTags(mapOf("tag1", "value1", "tag2", "value2"))), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteSamples.java deleted file mode 100644 index 08663fd5e9e8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteSamples.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.machinelearning.generated; - -/** - * Samples for RegistryModelContainers Delete. - */ -public final class RegistryModelContainersDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/delete.json - */ - /** - * Sample code: Delete Registry Model Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteRegistryModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryModelContainers() - .delete("testrg123", "registry123", "testContainer", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetSamples.java deleted file mode 100644 index d0b5913c3d98..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetSamples.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.machinelearning.generated; - -/** - * Samples for RegistryModelContainers Get. - */ -public final class RegistryModelContainersGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/get.json - */ - /** - * Sample code: Get Registry Model Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getRegistryModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryModelContainers() - .getWithResponse("testrg123", "registry123", "testContainer", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListSamples.java deleted file mode 100644 index 5db8eb515db4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListSamples.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.machinelearning.generated; - -/** - * Samples for RegistryModelContainers List. - */ -public final class RegistryModelContainersListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/list.json - */ - /** - * Sample code: List Registry Model Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listRegistryModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryModelContainers() - .list("testrg123", "registry123", null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrGetStartPendingUploadSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrGetStartPendingUploadSamples.java deleted file mode 100644 index f8364e1a447b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrGetStartPendingUploadSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; -import com.azure.resourcemanager.machinelearning.models.PendingUploadType; - -/** - * Samples for RegistryModelVersions CreateOrGetStartPendingUpload. - */ -public final class RegistryModelVersionsCreateOrGetStartPendingUploadSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/createOrGetStartPendingUpload.json - */ - /** - * Sample code: CreateOrGetStartPendingUpload Registry Model Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrGetStartPendingUploadRegistryModelVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryModelVersions() - .createOrGetStartPendingUploadWithResponse("test-rg", "registryName", "string", "string", - new PendingUploadRequestDto().withPendingUploadId("string") - .withPendingUploadType(PendingUploadType.TEMPORARY_BLOB_REFERENCE), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateSamples.java deleted file mode 100644 index b203ed258ad9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for RegistryModelVersions CreateOrUpdate. - */ -public final class RegistryModelVersionsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Registry Model Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - createOrUpdateRegistryModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryModelVersions() - .createOrUpdate("test-rg", "my-aml-registry", "string", "string", - new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsAnonymous(false) - .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) - .withModelType("CustomModel") - .withModelUri("string")), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteSamples.java deleted file mode 100644 index e58641c85172..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for RegistryModelVersions Delete. - */ -public final class RegistryModelVersionsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/delete.json - */ - /** - * Sample code: Delete Registry Model Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteRegistryModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryModelVersions() - .delete("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetSamples.java deleted file mode 100644 index d53c83a65957..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetSamples.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.machinelearning.generated; - -/** - * Samples for RegistryModelVersions Get. - */ -public final class RegistryModelVersionsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/get.json - */ - /** - * Sample code: Get Registry Model Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getRegistryModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryModelVersions() - .getWithResponse("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListSamples.java deleted file mode 100644 index c9c644f3b10d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListSamples.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.machinelearning.generated; - -/** - * Samples for RegistryModelVersions List. - */ -public final class RegistryModelVersionsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/list.json - */ - /** - * Sample code: List Registry Model Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listRegistryModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registryModelVersions() - .list("test-rg", "my-aml-registry", "string", null, "string", 1, "string", "string", "string", "string", - null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.java deleted file mode 100644 index cc1553834154..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.CronTrigger; -import com.azure.resourcemanager.machinelearning.models.EndpointScheduleAction; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Schedules CreateOrUpdate. - */ -public final class SchedulesCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Schedule. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateSchedule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - manager.schedules() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new ScheduleProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withDisplayName("string") - .withIsEnabled(false) - .withTrigger(new CronTrigger().withEndTime("string") - .withStartTime("string") - .withTimeZone("string") - .withExpression("string")) - .withAction(new EndpointScheduleAction() - .withEndpointInvocationDefinition(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"9965593e-526f-4b89-bb36-761138cf2794\":null}", Object.class, - SerializerEncoding.JSON)))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteSamples.java deleted file mode 100644 index 531602b888c2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteSamples.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.machinelearning.generated; - -/** - * Samples for Schedules Delete. - */ -public final class SchedulesDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/delete.json - */ - /** - * Sample code: Delete Schedule. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteSchedule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.schedules().delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetSamples.java deleted file mode 100644 index bac015b98e50..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetSamples.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.machinelearning.generated; - -/** - * Samples for Schedules Get. - */ -public final class SchedulesGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/get.json - */ - /** - * Sample code: Get Schedule. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getSchedule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.schedules().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListSamples.java deleted file mode 100644 index f8aa057f06b0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListSamples.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.machinelearning.generated; - -/** - * Samples for Schedules List. - */ -public final class SchedulesListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/list.json - */ - /** - * Sample code: List Schedules. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listSchedules(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.schedules().list("test-rg", "my-aml-workspace", null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateSamples.java deleted file mode 100644 index 21d2d0b4525d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.ContentSafety; -import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.ModelSettings; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ServerlessEndpoints CreateOrUpdate. - */ -public final class ServerlessEndpointsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Workspace Serverless Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateWorkspaceServerlessEndpoint( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.serverlessEndpoints() - .define("string") - .withRegion("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new ServerlessEndpointProperties().withModelSettings(new ModelSettings().withModelId("string")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety(new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED))) - .withTags(mapOf()) - .withKind("string") - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withSku(new Sku().withName("string") - .withTier(SkuTier.STANDARD) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsDeleteSamples.java deleted file mode 100644 index 9451dd9810cc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for ServerlessEndpoints Delete. - */ -public final class ServerlessEndpointsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/delete.json - */ - /** - * Sample code: Delete Workspace Serverless Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceServerlessEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.serverlessEndpoints().delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetSamples.java deleted file mode 100644 index 55332d342143..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetSamples.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.machinelearning.generated; - -/** - * Samples for ServerlessEndpoints Get. - */ -public final class ServerlessEndpointsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/get.json - */ - /** - * Sample code: Get Workspace Serverless Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceServerlessEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.serverlessEndpoints() - .getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListKeysSamples.java deleted file mode 100644 index e1ae216c6ac7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListKeysSamples.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.machinelearning.generated; - -/** - * Samples for ServerlessEndpoints ListKeys. - */ -public final class ServerlessEndpointsListKeysSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/listKeys.json - */ - /** - * Sample code: ListKeys Workspace Serverless Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listKeysWorkspaceServerlessEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.serverlessEndpoints() - .listKeysWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListSamples.java deleted file mode 100644 index d0fee73469a5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListSamples.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.machinelearning.generated; - -/** - * Samples for ServerlessEndpoints List. - */ -public final class ServerlessEndpointsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/list.json - */ - /** - * Sample code: List Workspace Serverless Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceServerlessEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.serverlessEndpoints().list("test-rg", "my-aml-workspace", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsRegenerateKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsRegenerateKeysSamples.java deleted file mode 100644 index 252985f25b8e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsRegenerateKeysSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.KeyType; -import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; - -/** - * Samples for ServerlessEndpoints RegenerateKeys. - */ -public final class ServerlessEndpointsRegenerateKeysSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/regenerateKeys.json - */ - /** - * Sample code: RegenerateKeys Workspace Serverless Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void regenerateKeysWorkspaceServerlessEndpoint( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.serverlessEndpoints() - .regenerateKeys("test-rg", "my-aml-workspace", "string", - new RegenerateEndpointKeysRequest().withKeyType(KeyType.PRIMARY).withKeyValue("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsUpdateSamples.java deleted file mode 100644 index 4d9507a9342e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsUpdateSamples.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.machinelearning.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoint; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ServerlessEndpoints Update. - */ -public final class ServerlessEndpointsUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/update.json - */ - /** - * Sample code: Update Workspace Serverless Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateWorkspaceServerlessEndpoint( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - ServerlessEndpoint resource = manager.serverlessEndpoints() - .getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf()) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.PREMIUM) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .withIdentity(new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("string", - SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/UsagesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/UsagesListSamples.java deleted file mode 100644 index d49082939225..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/UsagesListSamples.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.machinelearning.generated; - -/** - * Samples for Usages List. - */ -public final class UsagesListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Usage/list.json - */ - /** - * Sample code: List Usages. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listUsages(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.usages().list("eastus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListSamples.java deleted file mode 100644 index 578235e20d63..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListSamples.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.machinelearning.generated; - -/** - * Samples for VirtualMachineSizes List. - */ -public final class VirtualMachineSizesListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/VirtualMachineSize/list.json - */ - /** - * Sample code: List VM Sizes. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listVMSizes(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.virtualMachineSizes().listWithResponse("eastus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateSamples.java deleted file mode 100644 index f06e496ea020..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties; - -/** - * Samples for WorkspaceConnections Create. - */ -public final class WorkspaceConnectionsCreateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/create.json - */ - /** - * Sample code: CreateWorkspaceConnection. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - createWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaceConnections() - .define("connection-1") - .withExistingWorkspace("resourceGroup-1", "workspace-1") - .withProperties( - new NoneAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.CONTAINER_REGISTRY) - .withTarget("www.facebook.com")) - .create(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteSamples.java deleted file mode 100644 index 99e07c7030e3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteSamples.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.machinelearning.generated; - -/** - * Samples for WorkspaceConnections Delete. - */ -public final class WorkspaceConnectionsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/delete.json - */ - /** - * Sample code: DeleteWorkspaceConnection. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - deleteWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaceConnections() - .deleteWithResponse("resourceGroup-1", "workspace-1", "connection-1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetSamples.java deleted file mode 100644 index 2f8139326149..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetSamples.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.machinelearning.generated; - -/** - * Samples for WorkspaceConnections Get. - */ -public final class WorkspaceConnectionsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/get.json - */ - /** - * Sample code: GetWorkspaceConnection. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaceConnections() - .getWithResponse("resourceGroup-1", "workspace-1", "connection-1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSamples.java deleted file mode 100644 index 54c33bad1de8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSamples.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.machinelearning.generated; - -/** - * Samples for WorkspaceConnections List. - */ -public final class WorkspaceConnectionsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/list.json - */ - /** - * Sample code: ListWorkspaceConnections. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - listWorkspaceConnections(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaceConnections() - .list("resourceGroup-1", "workspace-1", "www.facebook.com", "ContainerRegistry", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsSamples.java deleted file mode 100644 index 7c48c51c1dec..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsSamples.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.machinelearning.generated; - -/** - * Samples for WorkspaceConnections ListSecrets. - */ -public final class WorkspaceConnectionsListSecretsSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/listSecrets.json - */ - /** - * Sample code: GetWorkspaceConnection. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaceConnections() - .listSecretsWithResponse("test-rg", "workspace-1", "connection-1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListSamples.java deleted file mode 100644 index a1437795cee4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListSamples.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.machinelearning.generated; - -/** - * Samples for WorkspaceFeatures List. - */ -public final class WorkspaceFeaturesListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceFeature/list.json - */ - /** - * Sample code: List Workspace features. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listWorkspaceFeatures(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaceFeatures().list("myResourceGroup", "testworkspace", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesCreateOrUpdateSamples.java deleted file mode 100644 index 6e450329fdb2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesCreateOrUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.EncryptionKeyVaultProperties; -import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; -import com.azure.resourcemanager.machinelearning.models.EncryptionStatus; -import com.azure.resourcemanager.machinelearning.models.IdentityForCmk; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Workspaces CreateOrUpdate. - */ -public final class WorkspacesCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/create.json - */ - /** - * Sample code: Create Workspace. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces() - .define("testworkspace") - .withExistingResourceGroup("workspace-1234") - .withRegion("eastus2euap") - .withIdentity(new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai", - new UserAssignedIdentity()))) - .withDescription("test description") - .withFriendlyName("HelloName") - .withKeyVault( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv") - .withApplicationInsights( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights") - .withContainerRegistry( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry") - .withStorageAccount( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount") - .withEncryption(new EncryptionProperty().withStatus(EncryptionStatus.ENABLED) - .withIdentity(new IdentityForCmk().withUserAssignedIdentity( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai")) - .withKeyVaultProperties(new EncryptionKeyVaultProperties().withKeyVaultArmId("fakeTokenPlaceholder") - .withKeyIdentifier("fakeTokenPlaceholder") - .withIdentityClientId(""))) - .withHbiWorkspace(false) - .withSharedPrivateLinkResources(Arrays.asList(new SharedPrivateLinkResource().withName("testdbresource") - .withPrivateLinkResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql") - .withGroupId("Sql") - .withRequestMessage("Please approve") - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteSamples.java deleted file mode 100644 index 785fbd3e9ca7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteSamples.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.machinelearning.generated; - -/** - * Samples for Workspaces Delete. - */ -public final class WorkspacesDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/delete.json - */ - /** - * Sample code: Delete Workspace. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().delete("workspace-1234", "testworkspace", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDiagnoseSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDiagnoseSamples.java deleted file mode 100644 index d2af3a41e6c0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDiagnoseSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.DiagnoseRequestProperties; -import com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Workspaces Diagnose. - */ -public final class WorkspacesDiagnoseSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/diagnose.json - */ - /** - * Sample code: Diagnose Workspace. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void diagnoseWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces() - .diagnose("workspace-1234", "testworkspace", - new DiagnoseWorkspaceParameters().withValue(new DiagnoseRequestProperties().withUdr(mapOf()) - .withNsg(mapOf()) - .withResourceLock(mapOf()) - .withDnsResolution(mapOf()) - .withStorageAccount(mapOf()) - .withKeyVault(mapOf()) - .withContainerRegistry(mapOf()) - .withApplicationInsights(mapOf()) - .withOthers(mapOf())), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesGetByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesGetByResourceGroupSamples.java deleted file mode 100644 index 7ada38a5bcc3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesGetByResourceGroupSamples.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.machinelearning.generated; - -/** - * Samples for Workspaces GetByResourceGroup. - */ -public final class WorkspacesGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/get.json - */ - /** - * Sample code: Get Workspace. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces() - .getByResourceGroupWithResponse("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListByResourceGroupSamples.java deleted file mode 100644 index d9ef531759b2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListByResourceGroupSamples.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.machinelearning.generated; - -/** - * Samples for Workspaces ListByResourceGroup. - */ -public final class WorkspacesListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listByResourceGroup.json - */ - /** - * Sample code: Get Workspaces by Resource Group. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspacesByResourceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().listByResourceGroup("workspace-1234", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListKeysSamples.java deleted file mode 100644 index f40eacb0c172..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListKeysSamples.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.machinelearning.generated; - -/** - * Samples for Workspaces ListKeys. - */ -public final class WorkspacesListKeysSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listKeys.json - */ - /** - * Sample code: List Workspace Keys. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().listKeysWithResponse("testrg123", "workspaces123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookAccessTokenSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookAccessTokenSamples.java deleted file mode 100644 index 1d4294bdfb10..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookAccessTokenSamples.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.machinelearning.generated; - -/** - * Samples for Workspaces ListNotebookAccessToken. - */ -public final class WorkspacesListNotebookAccessTokenSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listNotebookAccessToken.json - */ - /** - * Sample code: List Workspace Keys. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces() - .listNotebookAccessTokenWithResponse("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookKeysSamples.java deleted file mode 100644 index b59fc17ce7c2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookKeysSamples.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.machinelearning.generated; - -/** - * Samples for Workspaces ListNotebookKeys. - */ -public final class WorkspacesListNotebookKeysSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Notebook/listKeys.json - */ - /** - * Sample code: List Workspace Keys. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces() - .listNotebookKeysWithResponse("testrg123", "workspaces123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsSamples.java deleted file mode 100644 index 30c9aae061c1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsSamples.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.machinelearning.generated; - -/** - * Samples for Workspaces ListOutboundNetworkDependenciesEndpoints. - */ -public final class WorkspacesListOutboundNetworkDependenciesEndpointsSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ExternalFQDN/get.json - */ - /** - * Sample code: ListOutboundNetworkDependenciesEndpoints. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listOutboundNetworkDependenciesEndpoints( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces() - .listOutboundNetworkDependenciesEndpointsWithResponse("workspace-1234", "testworkspace", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListSamples.java deleted file mode 100644 index 3f53b0bfd5bd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListSamples.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.machinelearning.generated; - -/** - * Samples for Workspaces List. - */ -public final class WorkspacesListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listBySubscription.json - */ - /** - * Sample code: Get Workspaces by subscription. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getWorkspacesBySubscription(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().list(null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListStorageAccountKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListStorageAccountKeysSamples.java deleted file mode 100644 index 01e342c2fc7b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListStorageAccountKeysSamples.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.machinelearning.generated; - -/** - * Samples for Workspaces ListStorageAccountKeys. - */ -public final class WorkspacesListStorageAccountKeysSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listStorageAccountKeys.json - */ - /** - * Sample code: List Workspace Keys. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces() - .listStorageAccountKeysWithResponse("testrg123", "workspaces123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesPrepareNotebookSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesPrepareNotebookSamples.java deleted file mode 100644 index 269407da1cc2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesPrepareNotebookSamples.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.machinelearning.generated; - -/** - * Samples for Workspaces PrepareNotebook. - */ -public final class WorkspacesPrepareNotebookSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Notebook/prepare.json - */ - /** - * Sample code: Prepare Notebook. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void prepareNotebook(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().prepareNotebook("testrg123", "workspaces123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysSamples.java deleted file mode 100644 index dd194c1daed9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysSamples.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.machinelearning.generated; - -/** - * Samples for Workspaces ResyncKeys. - */ -public final class WorkspacesResyncKeysSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/resyncKeys.json - */ - /** - * Sample code: Resync Workspace Keys. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void resyncWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().resyncKeys("testrg123", "workspaces123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesUpdateSamples.java deleted file mode 100644 index 5747af6e63e0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesUpdateSamples.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.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; -import com.azure.resourcemanager.machinelearning.models.Workspace; - -/** - * Samples for Workspaces Update. - */ -public final class WorkspacesUpdateSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/update.json - */ - /** - * Sample code: Update Workspace. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - Workspace resource = manager.workspaces() - .getByResourceGroupWithResponse("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withDescription("new description") - .withFriendlyName("New friendly name") - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .apply(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AadAuthTypeWorkspaceConnectionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AadAuthTypeWorkspaceConnectionPropertiesTests.java deleted file mode 100644 index a3381403e317..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AadAuthTypeWorkspaceConnectionPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AadAuthTypeWorkspaceConnectionProperties; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AadAuthTypeWorkspaceConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AadAuthTypeWorkspaceConnectionProperties model = BinaryData.fromString( - "{\"authType\":\"AAD\",\"category\":\"MySql\",\"createdByWorkspaceArmId\":\"dixqbo\",\"expiryTime\":\"2021-04-26T10:17:01Z\",\"group\":\"NoSQL\",\"isSharedToAll\":false,\"target\":\"egatxgrznm\",\"metadata\":{\"bmgjymncjc\":\"mtsdixchwk\",\"cqzoofjnqjsve\":\"gair\"},\"sharedUserList\":[\"htleberpyljek\",\"fqnwjjqx\",\"wkdnjrxgkrhwiehy\"],\"value\":\"nowawonoehrguqlh\",\"valueFormat\":\"JSON\"}") - .toObject(AadAuthTypeWorkspaceConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.MY_SQL, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-26T10:17:01Z"), model.expiryTime()); - Assertions.assertEquals(false, model.isSharedToAll()); - Assertions.assertEquals("egatxgrznm", model.target()); - Assertions.assertEquals("mtsdixchwk", model.metadata().get("bmgjymncjc")); - Assertions.assertEquals("htleberpyljek", model.sharedUserList().get(0)); - Assertions.assertEquals("nowawonoehrguqlh", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AadAuthTypeWorkspaceConnectionProperties model - = new AadAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.MY_SQL) - .withExpiryTime(OffsetDateTime.parse("2021-04-26T10:17:01Z")) - .withIsSharedToAll(false) - .withTarget("egatxgrznm") - .withMetadata(mapOf("bmgjymncjc", "mtsdixchwk", "cqzoofjnqjsve", "gair")) - .withSharedUserList(Arrays.asList("htleberpyljek", "fqnwjjqx", "wkdnjrxgkrhwiehy")) - .withValue("nowawonoehrguqlh") - .withValueFormat(ValueFormat.JSON); - model = BinaryData.fromObject(model).toObject(AadAuthTypeWorkspaceConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.MY_SQL, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-26T10:17:01Z"), model.expiryTime()); - Assertions.assertEquals(false, model.isSharedToAll()); - Assertions.assertEquals("egatxgrznm", model.target()); - Assertions.assertEquals("mtsdixchwk", model.metadata().get("bmgjymncjc")); - Assertions.assertEquals("htleberpyljek", model.sharedUserList().get(0)); - Assertions.assertEquals("nowawonoehrguqlh", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AcrDetailsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AcrDetailsTests.java deleted file mode 100644 index 5923d941ff5b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AcrDetailsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AcrDetails; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import org.junit.jupiter.api.Assertions; - -public final class AcrDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AcrDetails model = BinaryData.fromString( - "{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"rgdtpeqnacyheqw\",\"acrAccountSku\":\"qq\",\"armResourceId\":{\"resourceId\":\"u\"}},\"userCreatedAcrAccount\":{\"armResourceId\":{\"resourceId\":\"ozf\"}}}") - .toObject(AcrDetails.class); - Assertions.assertEquals("rgdtpeqnacyheqw", model.systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("qq", model.systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("u", model.systemCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("ozf", model.userCreatedAcrAccount().armResourceId().resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AcrDetails model = new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("rgdtpeqnacyheqw") - .withAcrAccountSku("qq") - .withArmResourceId(new ArmResourceId().withResourceId("u"))) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId().withResourceId("ozf"))); - model = BinaryData.fromObject(model).toObject(AcrDetails.class); - Assertions.assertEquals("rgdtpeqnacyheqw", model.systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("qq", model.systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("u", model.systemCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("ozf", model.userCreatedAcrAccount().armResourceId().resourceId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.java deleted file mode 100644 index 41691600817e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AksNetworkingConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class AksNetworkingConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AksNetworkingConfiguration model = BinaryData.fromString( - "{\"subnetId\":\"mffngdyfcixr\",\"serviceCidr\":\"cqvhoejgoiutgwrm\",\"dnsServiceIP\":\"hpqhazyntacihn\",\"dockerBridgeCidr\":\"gmipnmliqmvlbhik\"}") - .toObject(AksNetworkingConfiguration.class); - Assertions.assertEquals("mffngdyfcixr", model.subnetId()); - Assertions.assertEquals("cqvhoejgoiutgwrm", model.serviceCidr()); - Assertions.assertEquals("hpqhazyntacihn", model.dnsServiceIp()); - Assertions.assertEquals("gmipnmliqmvlbhik", model.dockerBridgeCidr()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AksNetworkingConfiguration model = new AksNetworkingConfiguration().withSubnetId("mffngdyfcixr") - .withServiceCidr("cqvhoejgoiutgwrm") - .withDnsServiceIp("hpqhazyntacihn") - .withDockerBridgeCidr("gmipnmliqmvlbhik"); - model = BinaryData.fromObject(model).toObject(AksNetworkingConfiguration.class); - Assertions.assertEquals("mffngdyfcixr", model.subnetId()); - Assertions.assertEquals("cqvhoejgoiutgwrm", model.serviceCidr()); - Assertions.assertEquals("hpqhazyntacihn", model.dnsServiceIp()); - Assertions.assertEquals("gmipnmliqmvlbhik", model.dockerBridgeCidr()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllFeaturesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllFeaturesTests.java deleted file mode 100644 index 960b4c98194f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllFeaturesTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AllFeatures; - -public final class AllFeaturesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllFeatures model = BinaryData.fromString("{\"filterType\":\"AllFeatures\"}").toObject(AllFeatures.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllFeatures model = new AllFeatures(); - model = BinaryData.fromObject(model).toObject(AllFeatures.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllNodesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllNodesTests.java deleted file mode 100644 index a964c0776dfa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllNodesTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AllNodes; - -public final class AllNodesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllNodes model = BinaryData.fromString("{\"nodesValueType\":\"All\"}").toObject(AllNodes.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllNodes model = new AllNodes(); - model = BinaryData.fromObject(model).toObject(AllNodes.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodeInformationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodeInformationTests.java deleted file mode 100644 index 88c90d480609..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodeInformationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; - -public final class AmlComputeNodeInformationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlComputeNodeInformation model = BinaryData.fromString( - "{\"nodeId\":\"nxipeil\",\"privateIpAddress\":\"zuaejxd\",\"publicIpAddress\":\"tskzbbtdzumveek\",\"port\":1792717087,\"nodeState\":\"preparing\",\"runId\":\"hkfpbs\"}") - .toObject(AmlComputeNodeInformation.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlComputeNodeInformation model = new AmlComputeNodeInformation(); - model = BinaryData.fromObject(model).toObject(AmlComputeNodeInformation.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodesInformationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodesInformationTests.java deleted file mode 100644 index 28fea97b88c3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodesInformationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodesInformation; - -public final class AmlComputeNodesInformationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlComputeNodesInformation model = BinaryData.fromString( - "{\"nodes\":[{\"nodeId\":\"wrtz\",\"privateIpAddress\":\"zg\",\"publicIpAddress\":\"zmh\",\"port\":1672254683,\"nodeState\":\"running\",\"runId\":\"ts\"},{\"nodeId\":\"jcbpwxqpsrknft\",\"privateIpAddress\":\"vriuhprwmdyvx\",\"publicIpAddress\":\"ayriwwroyqbexrm\",\"port\":1486337456,\"nodeState\":\"running\",\"runId\":\"nojvknmefqsg\"},{\"nodeId\":\"ah\",\"privateIpAddress\":\"jyzhpvgq\",\"publicIpAddress\":\"j\",\"port\":391970506,\"nodeState\":\"preempted\",\"runId\":\"lmwlxkvugfhzo\"}],\"nextLink\":\"wjvzunluthnn\"}") - .toObject(AmlComputeNodesInformation.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlComputeNodesInformation model = new AmlComputeNodesInformation(); - model = BinaryData.fromObject(model).toObject(AmlComputeNodesInformation.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenComputeIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenComputeIdentityTests.java deleted file mode 100644 index dc143c2e942c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenComputeIdentityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AmlTokenComputeIdentity; - -public final class AmlTokenComputeIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlTokenComputeIdentity model - = BinaryData.fromString("{\"computeIdentityType\":\"AmlToken\"}").toObject(AmlTokenComputeIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlTokenComputeIdentity model = new AmlTokenComputeIdentity(); - model = BinaryData.fromObject(model).toObject(AmlTokenComputeIdentity.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenTests.java deleted file mode 100644 index 4500fbd74409..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AmlToken; - -public final class AmlTokenTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlToken model = BinaryData.fromString("{\"identityType\":\"AMLToken\"}").toObject(AmlToken.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlToken model = new AmlToken(); - model = BinaryData.fromObject(model).toObject(AmlToken.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlUserFeatureInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlUserFeatureInnerTests.java deleted file mode 100644 index 8e69984b63ba..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlUserFeatureInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner; -import org.junit.jupiter.api.Assertions; - -public final class AmlUserFeatureInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlUserFeatureInner model - = BinaryData.fromString("{\"id\":\"yyyzlwhbw\",\"displayName\":\"nufzr\",\"description\":\"m\"}") - .toObject(AmlUserFeatureInner.class); - Assertions.assertEquals("yyyzlwhbw", model.id()); - Assertions.assertEquals("nufzr", model.displayName()); - Assertions.assertEquals("m", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlUserFeatureInner model - = new AmlUserFeatureInner().withId("yyyzlwhbw").withDisplayName("nufzr").withDescription("m"); - model = BinaryData.fromObject(model).toObject(AmlUserFeatureInner.class); - Assertions.assertEquals("yyyzlwhbw", model.id()); - Assertions.assertEquals("nufzr", model.displayName()); - Assertions.assertEquals("m", model.description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ArmResourceIdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ArmResourceIdTests.java deleted file mode 100644 index 9ab857d7bec8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ArmResourceIdTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import org.junit.jupiter.api.Assertions; - -public final class ArmResourceIdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ArmResourceId model = BinaryData.fromString("{\"resourceId\":\"bmom\"}").toObject(ArmResourceId.class); - Assertions.assertEquals("bmom", model.resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ArmResourceId model = new ArmResourceId().withResourceId("bmom"); - model = BinaryData.fromObject(model).toObject(ArmResourceId.class); - Assertions.assertEquals("bmom", model.resourceId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetBaseTests.java deleted file mode 100644 index 2f2ab05dd909..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetBaseTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssetBase; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AssetBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssetBase model = BinaryData.fromString( - "{\"isArchived\":false,\"isAnonymous\":true,\"description\":\"jrkvfgbvfvpdbo\",\"tags\":{\"bdeibqipqk\":\"izsjqlhkrr\",\"rwkq\":\"hvxndzwmkrefajpj\",\"sjabibs\":\"yhgbijtjivfx\",\"bjxbkzbzk\":\"stawfsdjpvkv\"},\"properties\":{\"zhjjklffhmouwq\":\"cjabudurgkakmo\"}}") - .toObject(AssetBase.class); - Assertions.assertEquals("jrkvfgbvfvpdbo", model.description()); - Assertions.assertEquals("izsjqlhkrr", model.tags().get("bdeibqipqk")); - Assertions.assertEquals("cjabudurgkakmo", model.properties().get("zhjjklffhmouwq")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetBase model = new AssetBase().withDescription("jrkvfgbvfvpdbo") - .withTags(mapOf("bdeibqipqk", "izsjqlhkrr", "rwkq", "hvxndzwmkrefajpj", "sjabibs", "yhgbijtjivfx", - "bjxbkzbzk", "stawfsdjpvkv")) - .withProperties(mapOf("zhjjklffhmouwq", "cjabudurgkakmo")) - .withIsArchived(false) - .withIsAnonymous(true); - model = BinaryData.fromObject(model).toObject(AssetBase.class); - Assertions.assertEquals("jrkvfgbvfvpdbo", model.description()); - Assertions.assertEquals("izsjqlhkrr", model.tags().get("bdeibqipqk")); - Assertions.assertEquals("cjabudurgkakmo", model.properties().get("zhjjklffhmouwq")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetContainerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetContainerTests.java deleted file mode 100644 index 23f553036557..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetContainerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssetContainer; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AssetContainerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssetContainer model = BinaryData.fromString( - "{\"isArchived\":true,\"latestVersion\":\"equi\",\"nextVersion\":\"xicslfao\",\"description\":\"piyylhalnswhccsp\",\"tags\":{\"oluhczbwemh\":\"ivwitqscywugg\",\"sbrgz\":\"i\",\"ggicccnxqhue\":\"wmsweypqwd\"},\"properties\":{\"ncsdtclusiyp\":\"ttlstvlzywemhz\"}}") - .toObject(AssetContainer.class); - Assertions.assertEquals("piyylhalnswhccsp", model.description()); - Assertions.assertEquals("ivwitqscywugg", model.tags().get("oluhczbwemh")); - Assertions.assertEquals("ttlstvlzywemhz", model.properties().get("ncsdtclusiyp")); - Assertions.assertEquals(true, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetContainer model = new AssetContainer().withDescription("piyylhalnswhccsp") - .withTags(mapOf("oluhczbwemh", "ivwitqscywugg", "sbrgz", "i", "ggicccnxqhue", "wmsweypqwd")) - .withProperties(mapOf("ncsdtclusiyp", "ttlstvlzywemhz")) - .withIsArchived(true); - model = BinaryData.fromObject(model).toObject(AssetContainer.class); - Assertions.assertEquals("piyylhalnswhccsp", model.description()); - Assertions.assertEquals("ivwitqscywugg", model.tags().get("oluhczbwemh")); - Assertions.assertEquals("ttlstvlzywemhz", model.properties().get("ncsdtclusiyp")); - Assertions.assertEquals(true, model.isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobInputTests.java deleted file mode 100644 index 3ebea634df0e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobInputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssetJobInput; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class AssetJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssetJobInput model = BinaryData.fromString("{\"uri\":\"ynosugkfhaxt\",\"mode\":\"ReadWriteMount\"}") - .toObject(AssetJobInput.class); - Assertions.assertEquals("ynosugkfhaxt", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetJobInput model = new AssetJobInput().withUri("ynosugkfhaxt").withMode(InputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(AssetJobInput.class); - Assertions.assertEquals("ynosugkfhaxt", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobOutputTests.java deleted file mode 100644 index 8550d30cc810..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobOutputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssetJobOutput; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class AssetJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssetJobOutput model - = BinaryData.fromString("{\"uri\":\"mwgsghq\",\"mode\":\"ReadWriteMount\"}").toObject(AssetJobOutput.class); - Assertions.assertEquals("mwgsghq", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetJobOutput model = new AssetJobOutput().withUri("mwgsghq").withMode(OutputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(AssetJobOutput.class); - Assertions.assertEquals("mwgsghq", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetReferenceBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetReferenceBaseTests.java deleted file mode 100644 index a4292e144687..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetReferenceBaseTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssetReferenceBase; - -public final class AssetReferenceBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssetReferenceBase model - = BinaryData.fromString("{\"referenceType\":\"AssetReferenceBase\"}").toObject(AssetReferenceBase.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetReferenceBase model = new AssetReferenceBase(); - model = BinaryData.fromObject(model).toObject(AssetReferenceBase.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssignedUserTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssignedUserTests.java deleted file mode 100644 index 570b61b7f59c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssignedUserTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssignedUser; -import org.junit.jupiter.api.Assertions; - -public final class AssignedUserTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssignedUser model = BinaryData.fromString("{\"objectId\":\"lmcskyk\",\"tenantId\":\"fuofixcnpcfykkp\"}") - .toObject(AssignedUser.class); - Assertions.assertEquals("lmcskyk", model.objectId()); - Assertions.assertEquals("fuofixcnpcfykkp", model.tenantId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssignedUser model = new AssignedUser().withObjectId("lmcskyk").withTenantId("fuofixcnpcfykkp"); - model = BinaryData.fromObject(model).toObject(AssignedUser.class); - Assertions.assertEquals("lmcskyk", model.objectId()); - Assertions.assertEquals("fuofixcnpcfykkp", model.tenantId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoForecastHorizonTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoForecastHorizonTests.java deleted file mode 100644 index 44430f0e8225..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoForecastHorizonTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoForecastHorizon; - -public final class AutoForecastHorizonTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoForecastHorizon model = BinaryData.fromString("{\"mode\":\"Auto\"}").toObject(AutoForecastHorizon.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoForecastHorizon model = new AutoForecastHorizon(); - model = BinaryData.fromObject(model).toObject(AutoForecastHorizon.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLJobTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLJobTests.java deleted file mode 100644 index 8a5082e2e258..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLJobTests.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoMLJob; -import com.azure.resourcemanager.machinelearning.models.AutoMLVertical; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.JobOutput; -import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.JobTier; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.Nodes; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.QueueSettings; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AutoMLJobTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoMLJob model = BinaryData.fromString( - "{\"jobType\":\"AutoML\",\"resources\":{\"shmSize\":\"dd\",\"dockerArgs\":\"qm\",\"instanceCount\":1650398695,\"instanceType\":\"othxuarigrjd\",\"properties\":{\"pruulhg\":\"datakqhvkrbzkuastaxk\",\"izwxvs\":\"datat\",\"fxcz\":\"dataksgfyyskyekg\"}},\"environmentId\":\"cckwrtwle\",\"environmentVariables\":{\"lhpdhwynctaczcnj\":\"eszr\",\"x\":\"mbbfnv\",\"nkrtikl\":\"tzo\"},\"taskDetails\":{\"taskType\":\"AutoMLVertical\",\"logVerbosity\":\"Error\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"ihqlcoqks\",\"mode\":\"ReadOnlyMount\",\"description\":\"hyxwbgbud\"},\"targetColumnName\":\"qdo\"},\"outputs\":{\"thojvlirknucos\":{\"jobOutputType\":\"JobOutput\",\"description\":\"qcd\"},\"pya\":{\"jobOutputType\":\"JobOutput\",\"description\":\"rdtnagzl\"}},\"queueSettings\":{\"jobTier\":\"Basic\"},\"displayName\":\"qjjtsmuydqfttka\",\"status\":\"Canceled\",\"experimentName\":\"ue\",\"services\":{\"lvqzrwtrdgscnv\":{\"jobServiceType\":\"cdcpkshloj\",\"port\":1132917743,\"endpoint\":\"zics\",\"status\":\"d\",\"errorMessage\":\"yaaknyukibxiglhp\",\"properties\":{\"z\":\"xqtejpiilhvt\",\"k\":\"agjjn\",\"f\":\"ylhyyx\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"l\":{\"jobServiceType\":\"on\",\"port\":1449590493,\"endpoint\":\"xlw\",\"status\":\"zyohxpthc\",\"errorMessage\":\"pvkvtwf\",\"properties\":{\"cdyarnggcjfwblqh\":\"obpbokhmm\",\"s\":\"kasmcolmugpyva\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"nbxqaeht\":{\"jobServiceType\":\"zxeygzvtye\",\"port\":2081188062,\"endpoint\":\"bnob\",\"status\":\"qisqsqkp\",\"errorMessage\":\"ioyj\",\"properties\":{\"qdvrdmvxyrxdh\":\"lviqcpszpmc\",\"mbtple\":\"vqojbxaotcgbz\",\"muuv\":\"oioyidoxznvgvd\",\"erxrzutylcurza\":\"awsxmrszbknimxlp\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"jmbnvynf\",\"isArchived\":true,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"c\",\"notificationSetting\":{\"emails\":[\"glskakddi\",\"ahzllrqmtlpb\",\"xroi\"],\"emailOn\":[\"JobCompleted\"],\"webhooks\":{\"brjjtalxrdsjr\":{\"webhookType\":\"Webhook\",\"eventType\":\"fmnoiicsudy\"},\"dp\":{\"webhookType\":\"Webhook\",\"eventType\":\"luqwgusxxhd\"}}},\"description\":\"yblvtbdmvsbyi\",\"tags\":{\"jfb\":\"lqpvekmk\",\"gdusxurs\":\"tlo\",\"iqrizfwihvaan\":\"ivuxcjkcoqwczs\"},\"properties\":{\"bbaex\":\"nhjrfdmfd\",\"vmuafmc\":\"jfwtgdfkkaui\",\"vpltidajjvy\":\"fedyuep\"}}") - .toObject(AutoMLJob.class); - Assertions.assertEquals("yblvtbdmvsbyi", model.description()); - Assertions.assertEquals("lqpvekmk", model.tags().get("jfb")); - Assertions.assertEquals("nhjrfdmfd", model.properties().get("bbaex")); - Assertions.assertEquals("qjjtsmuydqfttka", model.displayName()); - Assertions.assertEquals("ue", model.experimentName()); - Assertions.assertEquals("cdcpkshloj", model.services().get("lvqzrwtrdgscnv").jobServiceType()); - Assertions.assertEquals(1132917743, model.services().get("lvqzrwtrdgscnv").port()); - Assertions.assertEquals("zics", model.services().get("lvqzrwtrdgscnv").endpoint()); - Assertions.assertEquals("xqtejpiilhvt", model.services().get("lvqzrwtrdgscnv").properties().get("z")); - Assertions.assertEquals("jmbnvynf", model.computeId()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("c", model.componentId()); - Assertions.assertEquals("glskakddi", model.notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, - model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("fmnoiicsudy", model.notificationSetting().webhooks().get("brjjtalxrdsjr").eventType()); - Assertions.assertEquals(1650398695, model.resources().instanceCount()); - Assertions.assertEquals("othxuarigrjd", model.resources().instanceType()); - Assertions.assertEquals("dd", model.resources().shmSize()); - Assertions.assertEquals("qm", model.resources().dockerArgs()); - Assertions.assertEquals("cckwrtwle", model.environmentId()); - Assertions.assertEquals("eszr", model.environmentVariables().get("lhpdhwynctaczcnj")); - Assertions.assertEquals(LogVerbosity.ERROR, model.taskDetails().logVerbosity()); - Assertions.assertEquals("hyxwbgbud", model.taskDetails().trainingData().description()); - Assertions.assertEquals("ihqlcoqks", model.taskDetails().trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.taskDetails().trainingData().mode()); - Assertions.assertEquals("qdo", model.taskDetails().targetColumnName()); - Assertions.assertEquals("qcd", model.outputs().get("thojvlirknucos").description()); - Assertions.assertEquals(JobTier.BASIC, model.queueSettings().jobTier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoMLJob model - = new AutoMLJob().withDescription("yblvtbdmvsbyi") - .withTags(mapOf("jfb", "lqpvekmk", "gdusxurs", "tlo", "iqrizfwihvaan", "ivuxcjkcoqwczs")) - .withProperties(mapOf("bbaex", "nhjrfdmfd", "vmuafmc", "jfwtgdfkkaui", "vpltidajjvy", "fedyuep")) - .withDisplayName("qjjtsmuydqfttka") - .withExperimentName("ue") - .withServices(mapOf("lvqzrwtrdgscnv", - new JobService().withJobServiceType("cdcpkshloj") - .withPort(1132917743) - .withEndpoint("zics") - .withProperties(mapOf("z", "xqtejpiilhvt", "k", "agjjn", "f", "ylhyyx")) - .withNodes(new Nodes()), - "l", - new JobService().withJobServiceType("on") - .withPort(1449590493) - .withEndpoint("xlw") - .withProperties(mapOf("cdyarnggcjfwblqh", "obpbokhmm", "s", "kasmcolmugpyva")) - .withNodes(new Nodes()), - "nbxqaeht", - new JobService().withJobServiceType("zxeygzvtye") - .withPort(2081188062) - .withEndpoint("bnob") - .withProperties(mapOf("qdvrdmvxyrxdh", "lviqcpszpmc", "mbtple", "vqojbxaotcgbz", "muuv", - "oioyidoxznvgvd", "erxrzutylcurza", "awsxmrszbknimxlp")) - .withNodes(new Nodes()))) - .withComputeId("jmbnvynf") - .withIsArchived(true) - .withIdentity(new IdentityConfiguration()) - .withComponentId("c") - .withNotificationSetting(new NotificationSetting() - .withEmails(Arrays.asList("glskakddi", "ahzllrqmtlpb", "xroi")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED)) - .withWebhooks(mapOf("brjjtalxrdsjr", new Webhook().withEventType("fmnoiicsudy"), "dp", - new Webhook().withEventType("luqwgusxxhd")))) - .withResources(new JobResourceConfiguration().withInstanceCount(1650398695) - .withInstanceType("othxuarigrjd") - .withProperties( - mapOf("pruulhg", "datakqhvkrbzkuastaxk", "izwxvs", "datat", "fxcz", "dataksgfyyskyekg")) - .withShmSize("dd") - .withDockerArgs("qm")) - .withEnvironmentId("cckwrtwle") - .withEnvironmentVariables(mapOf("lhpdhwynctaczcnj", "eszr", "x", "mbbfnv", "nkrtikl", "tzo")) - .withTaskDetails(new AutoMLVertical().withLogVerbosity(LogVerbosity.ERROR) - .withTrainingData(new MLTableJobInput().withDescription("hyxwbgbud") - .withUri("ihqlcoqks") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withTargetColumnName("qdo")) - .withOutputs(mapOf("thojvlirknucos", new JobOutput().withDescription("qcd"), "pya", - new JobOutput().withDescription("rdtnagzl"))) - .withQueueSettings(new QueueSettings().withJobTier(JobTier.BASIC)); - model = BinaryData.fromObject(model).toObject(AutoMLJob.class); - Assertions.assertEquals("yblvtbdmvsbyi", model.description()); - Assertions.assertEquals("lqpvekmk", model.tags().get("jfb")); - Assertions.assertEquals("nhjrfdmfd", model.properties().get("bbaex")); - Assertions.assertEquals("qjjtsmuydqfttka", model.displayName()); - Assertions.assertEquals("ue", model.experimentName()); - Assertions.assertEquals("cdcpkshloj", model.services().get("lvqzrwtrdgscnv").jobServiceType()); - Assertions.assertEquals(1132917743, model.services().get("lvqzrwtrdgscnv").port()); - Assertions.assertEquals("zics", model.services().get("lvqzrwtrdgscnv").endpoint()); - Assertions.assertEquals("xqtejpiilhvt", model.services().get("lvqzrwtrdgscnv").properties().get("z")); - Assertions.assertEquals("jmbnvynf", model.computeId()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("c", model.componentId()); - Assertions.assertEquals("glskakddi", model.notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, - model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("fmnoiicsudy", model.notificationSetting().webhooks().get("brjjtalxrdsjr").eventType()); - Assertions.assertEquals(1650398695, model.resources().instanceCount()); - Assertions.assertEquals("othxuarigrjd", model.resources().instanceType()); - Assertions.assertEquals("dd", model.resources().shmSize()); - Assertions.assertEquals("qm", model.resources().dockerArgs()); - Assertions.assertEquals("cckwrtwle", model.environmentId()); - Assertions.assertEquals("eszr", model.environmentVariables().get("lhpdhwynctaczcnj")); - Assertions.assertEquals(LogVerbosity.ERROR, model.taskDetails().logVerbosity()); - Assertions.assertEquals("hyxwbgbud", model.taskDetails().trainingData().description()); - Assertions.assertEquals("ihqlcoqks", model.taskDetails().trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.taskDetails().trainingData().mode()); - Assertions.assertEquals("qdo", model.taskDetails().targetColumnName()); - Assertions.assertEquals("qcd", model.outputs().get("thojvlirknucos").description()); - Assertions.assertEquals(JobTier.BASIC, model.queueSettings().jobTier()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLVerticalTests.java deleted file mode 100644 index 3b895a713017..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLVerticalTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoMLVertical; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import org.junit.jupiter.api.Assertions; - -public final class AutoMLVerticalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoMLVertical model = BinaryData.fromString( - "{\"taskType\":\"AutoMLVertical\",\"logVerbosity\":\"Error\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"q\",\"mode\":\"ReadOnlyMount\",\"description\":\"xqwqueu\"},\"targetColumnName\":\"lztpziizevjykof\"}") - .toObject(AutoMLVertical.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("xqwqueu", model.trainingData().description()); - Assertions.assertEquals("q", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("lztpziizevjykof", model.targetColumnName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoMLVertical model = new AutoMLVertical().withLogVerbosity(LogVerbosity.ERROR) - .withTrainingData(new MLTableJobInput().withDescription("xqwqueu") - .withUri("q") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withTargetColumnName("lztpziizevjykof"); - model = BinaryData.fromObject(model).toObject(AutoMLVertical.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("xqwqueu", model.trainingData().description()); - Assertions.assertEquals("q", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("lztpziizevjykof", model.targetColumnName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoNCrossValidationsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoNCrossValidationsTests.java deleted file mode 100644 index f53af11b7c4b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoNCrossValidationsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoNCrossValidations; - -public final class AutoNCrossValidationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoNCrossValidations model - = BinaryData.fromString("{\"mode\":\"Auto\"}").toObject(AutoNCrossValidations.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoNCrossValidations model = new AutoNCrossValidations(); - model = BinaryData.fromObject(model).toObject(AutoNCrossValidations.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoPausePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoPausePropertiesTests.java deleted file mode 100644 index 41f4f6f7556f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoPausePropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoPauseProperties; -import org.junit.jupiter.api.Assertions; - -public final class AutoPausePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoPauseProperties model = BinaryData.fromString("{\"delayInMinutes\":1738803308,\"enabled\":true}") - .toObject(AutoPauseProperties.class); - Assertions.assertEquals(1738803308, model.delayInMinutes()); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoPauseProperties model = new AutoPauseProperties().withDelayInMinutes(1738803308).withEnabled(true); - model = BinaryData.fromObject(model).toObject(AutoPauseProperties.class); - Assertions.assertEquals(1738803308, model.delayInMinutes()); - Assertions.assertEquals(true, model.enabled()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoScalePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoScalePropertiesTests.java deleted file mode 100644 index b38744899efd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoScalePropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoScaleProperties; -import org.junit.jupiter.api.Assertions; - -public final class AutoScalePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoScaleProperties model - = BinaryData.fromString("{\"minNodeCount\":239147193,\"enabled\":true,\"maxNodeCount\":981129054}") - .toObject(AutoScaleProperties.class); - Assertions.assertEquals(239147193, model.minNodeCount()); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(981129054, model.maxNodeCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoScaleProperties model - = new AutoScaleProperties().withMinNodeCount(239147193).withEnabled(true).withMaxNodeCount(981129054); - model = BinaryData.fromObject(model).toObject(AutoScaleProperties.class); - Assertions.assertEquals(239147193, model.minNodeCount()); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(981129054, model.maxNodeCount()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoSeasonalityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoSeasonalityTests.java deleted file mode 100644 index e0e0e8665c43..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoSeasonalityTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoSeasonality; - -public final class AutoSeasonalityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoSeasonality model = BinaryData.fromString("{\"mode\":\"Auto\"}").toObject(AutoSeasonality.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoSeasonality model = new AutoSeasonality(); - model = BinaryData.fromObject(model).toObject(AutoSeasonality.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetLagsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetLagsTests.java deleted file mode 100644 index 127caf51febf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetLagsTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoTargetLags; - -public final class AutoTargetLagsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoTargetLags model = BinaryData.fromString("{\"mode\":\"Auto\"}").toObject(AutoTargetLags.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoTargetLags model = new AutoTargetLags(); - model = BinaryData.fromObject(model).toObject(AutoTargetLags.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetRollingWindowSizeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetRollingWindowSizeTests.java deleted file mode 100644 index 01498e0b18d2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetRollingWindowSizeTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoTargetRollingWindowSize; - -public final class AutoTargetRollingWindowSizeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoTargetRollingWindowSize model - = BinaryData.fromString("{\"mode\":\"Auto\"}").toObject(AutoTargetRollingWindowSize.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoTargetRollingWindowSize model = new AutoTargetRollingWindowSize(); - model = BinaryData.fromObject(model).toObject(AutoTargetRollingWindowSize.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDatastoreTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDatastoreTests.java deleted file mode 100644 index c3ab34e5349d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDatastoreTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AzureDatastore; -import org.junit.jupiter.api.Assertions; - -public final class AzureDatastoreTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureDatastore model - = BinaryData.fromString("{\"subscriptionId\":\"ssgwjfkain\",\"resourceGroup\":\"uymvecvzts\"}") - .toObject(AzureDatastore.class); - Assertions.assertEquals("ssgwjfkain", model.subscriptionId()); - Assertions.assertEquals("uymvecvzts", model.resourceGroup()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureDatastore model = new AzureDatastore().withSubscriptionId("ssgwjfkain").withResourceGroup("uymvecvzts"); - model = BinaryData.fromObject(model).toObject(AzureDatastore.class); - Assertions.assertEquals("ssgwjfkain", model.subscriptionId()); - Assertions.assertEquals("uymvecvzts", model.resourceGroup()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDevOpsWebhookTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDevOpsWebhookTests.java deleted file mode 100644 index 92616de4fa26..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDevOpsWebhookTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AzureDevOpsWebhook; -import org.junit.jupiter.api.Assertions; - -public final class AzureDevOpsWebhookTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureDevOpsWebhook model - = BinaryData.fromString("{\"webhookType\":\"AzureDevOps\",\"eventType\":\"cvasormrexzvdu\"}") - .toObject(AzureDevOpsWebhook.class); - Assertions.assertEquals("cvasormrexzvdu", model.eventType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureDevOpsWebhook model = new AzureDevOpsWebhook().withEventType("cvasormrexzvdu"); - model = BinaryData.fromObject(model).toObject(AzureDevOpsWebhook.class); - Assertions.assertEquals("cvasormrexzvdu", model.eventType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BanditPolicyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BanditPolicyTests.java deleted file mode 100644 index 6d5107068d57..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BanditPolicyTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BanditPolicy; -import org.junit.jupiter.api.Assertions; - -public final class BanditPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BanditPolicy model = BinaryData.fromString( - "{\"policyType\":\"Bandit\",\"slackFactor\":60.285545,\"slackAmount\":73.91734,\"evaluationInterval\":1123560800,\"delayEvaluation\":1370389329}") - .toObject(BanditPolicy.class); - Assertions.assertEquals(1123560800, model.evaluationInterval()); - Assertions.assertEquals(1370389329, model.delayEvaluation()); - Assertions.assertEquals(60.285545F, model.slackFactor()); - Assertions.assertEquals(73.91734F, model.slackAmount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BanditPolicy model = new BanditPolicy().withEvaluationInterval(1123560800) - .withDelayEvaluation(1370389329) - .withSlackFactor(60.285545F) - .withSlackAmount(73.91734F); - model = BinaryData.fromObject(model).toObject(BanditPolicy.class); - Assertions.assertEquals(1123560800, model.evaluationInterval()); - Assertions.assertEquals(1370389329, model.delayEvaluation()); - Assertions.assertEquals(60.285545F, model.slackFactor()); - Assertions.assertEquals(73.91734F, model.slackAmount()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentConfigurationTests.java deleted file mode 100644 index 4f6536cc925f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentConfigurationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentConfiguration; - -public final class BatchDeploymentConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BatchDeploymentConfiguration model - = BinaryData.fromString("{\"deploymentConfigurationType\":\"BatchDeploymentConfiguration\"}") - .toObject(BatchDeploymentConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchDeploymentConfiguration model = new BatchDeploymentConfiguration(); - model = BinaryData.fromObject(model).toObject(BatchDeploymentConfiguration.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteMockTests.java deleted file mode 100644 index 7d7c3e21175e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BatchDeploymentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.batchDeployments() - .delete("vi", "cwbqy", "clwbjgiynqryoisw", "ofvsxau", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointDefaultsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointDefaultsTests.java deleted file mode 100644 index a2712fe028ca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointDefaultsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointDefaults; -import org.junit.jupiter.api.Assertions; - -public final class BatchEndpointDefaultsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BatchEndpointDefaults model - = BinaryData.fromString("{\"deploymentName\":\"winhehfqpo\"}").toObject(BatchEndpointDefaults.class); - Assertions.assertEquals("winhehfqpo", model.deploymentName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchEndpointDefaults model = new BatchEndpointDefaults().withDeploymentName("winhehfqpo"); - model = BinaryData.fromObject(model).toObject(BatchEndpointDefaults.class); - Assertions.assertEquals("winhehfqpo", model.deploymentName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteMockTests.java deleted file mode 100644 index 2ece8ae2a253..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BatchEndpointsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.batchEndpoints().delete("fxcsqmzdozktkdpc", "eohpl", "gcnbvmhvqp", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchPipelineComponentDeploymentConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchPipelineComponentDeploymentConfigurationTests.java deleted file mode 100644 index 94bafbf74579..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchPipelineComponentDeploymentConfigurationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BatchPipelineComponentDeploymentConfiguration; -import com.azure.resourcemanager.machinelearning.models.IdAssetReference; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BatchPipelineComponentDeploymentConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BatchPipelineComponentDeploymentConfiguration model = BinaryData.fromString( - "{\"deploymentConfigurationType\":\"PipelineComponent\",\"componentId\":{\"referenceType\":\"Id\",\"assetId\":\"jgvhxcc\"},\"description\":\"kakmkookbputmgvm\",\"settings\":{\"ow\":\"kmlwkt\",\"ejtgzjxxl\":\"kroyrdurxflzqji\",\"lzuqloiwyayyzivr\":\"e\",\"jlei\":\"itcdqlhchwhrk\"},\"tags\":{\"nsmy\":\"fiplhx\"}}") - .toObject(BatchPipelineComponentDeploymentConfiguration.class); - Assertions.assertEquals("jgvhxcc", model.componentId().assetId()); - Assertions.assertEquals("kakmkookbputmgvm", model.description()); - Assertions.assertEquals("kmlwkt", model.settings().get("ow")); - Assertions.assertEquals("fiplhx", model.tags().get("nsmy")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchPipelineComponentDeploymentConfiguration model = new BatchPipelineComponentDeploymentConfiguration() - .withComponentId(new IdAssetReference().withAssetId("jgvhxcc")) - .withDescription("kakmkookbputmgvm") - .withSettings( - mapOf("ow", "kmlwkt", "ejtgzjxxl", "kroyrdurxflzqji", "lzuqloiwyayyzivr", "e", "jlei", "itcdqlhchwhrk")) - .withTags(mapOf("nsmy", "fiplhx")); - model = BinaryData.fromObject(model).toObject(BatchPipelineComponentDeploymentConfiguration.class); - Assertions.assertEquals("jgvhxcc", model.componentId().assetId()); - Assertions.assertEquals("kakmkookbputmgvm", model.description()); - Assertions.assertEquals("kmlwkt", model.settings().get("ow")); - Assertions.assertEquals("fiplhx", model.tags().get("nsmy")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchRetrySettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchRetrySettingsTests.java deleted file mode 100644 index 209f9e21bc4c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchRetrySettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BatchRetrySettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class BatchRetrySettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BatchRetrySettings model = BinaryData.fromString("{\"maxRetries\":1662564263,\"timeout\":\"PT208H49M32S\"}") - .toObject(BatchRetrySettings.class); - Assertions.assertEquals(1662564263, model.maxRetries()); - Assertions.assertEquals(Duration.parse("PT208H49M32S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchRetrySettings model - = new BatchRetrySettings().withMaxRetries(1662564263).withTimeout(Duration.parse("PT208H49M32S")); - model = BinaryData.fromObject(model).toObject(BatchRetrySettings.class); - Assertions.assertEquals(1662564263, model.maxRetries()); - Assertions.assertEquals(Duration.parse("PT208H49M32S"), model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BayesianSamplingAlgorithmTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BayesianSamplingAlgorithmTests.java deleted file mode 100644 index 96b3f9dcffaa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BayesianSamplingAlgorithmTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BayesianSamplingAlgorithm; - -public final class BayesianSamplingAlgorithmTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BayesianSamplingAlgorithm model = BinaryData.fromString("{\"samplingAlgorithmType\":\"Bayesian\"}") - .toObject(BayesianSamplingAlgorithm.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BayesianSamplingAlgorithm model = new BayesianSamplingAlgorithm(); - model = BinaryData.fromObject(model).toObject(BayesianSamplingAlgorithm.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BindOptionsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BindOptionsTests.java deleted file mode 100644 index a5f75e9ec467..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BindOptionsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BindOptions; -import org.junit.jupiter.api.Assertions; - -public final class BindOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BindOptions model - = BinaryData.fromString("{\"propagation\":\"arwp\",\"createHostPath\":true,\"selinux\":\"udoejtighsxjp\"}") - .toObject(BindOptions.class); - Assertions.assertEquals("arwp", model.propagation()); - Assertions.assertEquals(true, model.createHostPath()); - Assertions.assertEquals("udoejtighsxjp", model.selinux()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BindOptions model - = new BindOptions().withPropagation("arwp").withCreateHostPath(true).withSelinux("udoejtighsxjp"); - model = BinaryData.fromObject(model).toObject(BindOptions.class); - Assertions.assertEquals("arwp", model.propagation()); - Assertions.assertEquals(true, model.createHostPath()); - Assertions.assertEquals("udoejtighsxjp", model.selinux()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BuildContextTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BuildContextTests.java deleted file mode 100644 index 43b9ecc4b4f1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BuildContextTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import org.junit.jupiter.api.Assertions; - -public final class BuildContextTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuildContext model - = BinaryData.fromString("{\"contextUri\":\"zrcxfailcfxwmdbo\",\"dockerfilePath\":\"fgsftufqob\"}") - .toObject(BuildContext.class); - Assertions.assertEquals("zrcxfailcfxwmdbo", model.contextUri()); - Assertions.assertEquals("fgsftufqob", model.dockerfilePath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuildContext model = new BuildContext().withContextUri("zrcxfailcfxwmdbo").withDockerfilePath("fgsftufqob"); - model = BinaryData.fromObject(model).toObject(BuildContext.class); - Assertions.assertEquals("zrcxfailcfxwmdbo", model.contextUri()); - Assertions.assertEquals("fgsftufqob", model.dockerfilePath()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataDriftMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataDriftMetricThresholdTests.java deleted file mode 100644 index 42de010f2f32..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataDriftMetricThresholdTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CategoricalDataDriftMetric; -import com.azure.resourcemanager.machinelearning.models.CategoricalDataDriftMetricThreshold; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import org.junit.jupiter.api.Assertions; - -public final class CategoricalDataDriftMetricThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CategoricalDataDriftMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Categorical\",\"metric\":\"PearsonsChiSquaredTest\",\"threshold\":{\"value\":46.62967716667693}}") - .toObject(CategoricalDataDriftMetricThreshold.class); - Assertions.assertEquals(46.62967716667693D, model.threshold().value()); - Assertions.assertEquals(CategoricalDataDriftMetric.PEARSONS_CHI_SQUARED_TEST, model.metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CategoricalDataDriftMetricThreshold model = new CategoricalDataDriftMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(46.62967716667693D)) - .withMetric(CategoricalDataDriftMetric.PEARSONS_CHI_SQUARED_TEST); - model = BinaryData.fromObject(model).toObject(CategoricalDataDriftMetricThreshold.class); - Assertions.assertEquals(46.62967716667693D, model.threshold().value()); - Assertions.assertEquals(CategoricalDataDriftMetric.PEARSONS_CHI_SQUARED_TEST, model.metric()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataQualityMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataQualityMetricThresholdTests.java deleted file mode 100644 index 98eddd5d54f5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataQualityMetricThresholdTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CategoricalDataQualityMetric; -import com.azure.resourcemanager.machinelearning.models.CategoricalDataQualityMetricThreshold; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import org.junit.jupiter.api.Assertions; - -public final class CategoricalDataQualityMetricThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CategoricalDataQualityMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Categorical\",\"metric\":\"OutOfBoundsRate\",\"threshold\":{\"value\":24.67440172418167}}") - .toObject(CategoricalDataQualityMetricThreshold.class); - Assertions.assertEquals(24.67440172418167D, model.threshold().value()); - Assertions.assertEquals(CategoricalDataQualityMetric.OUT_OF_BOUNDS_RATE, model.metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CategoricalDataQualityMetricThreshold model = new CategoricalDataQualityMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(24.67440172418167D)) - .withMetric(CategoricalDataQualityMetric.OUT_OF_BOUNDS_RATE); - model = BinaryData.fromObject(model).toObject(CategoricalDataQualityMetricThreshold.class); - Assertions.assertEquals(24.67440172418167D, model.threshold().value()); - Assertions.assertEquals(CategoricalDataQualityMetric.OUT_OF_BOUNDS_RATE, model.metric()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalPredictionDriftMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalPredictionDriftMetricThresholdTests.java deleted file mode 100644 index d9da6bebfec5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalPredictionDriftMetricThresholdTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CategoricalPredictionDriftMetric; -import com.azure.resourcemanager.machinelearning.models.CategoricalPredictionDriftMetricThreshold; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import org.junit.jupiter.api.Assertions; - -public final class CategoricalPredictionDriftMetricThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CategoricalPredictionDriftMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Categorical\",\"metric\":\"PopulationStabilityIndex\",\"threshold\":{\"value\":29.225647005199463}}") - .toObject(CategoricalPredictionDriftMetricThreshold.class); - Assertions.assertEquals(29.225647005199463D, model.threshold().value()); - Assertions.assertEquals(CategoricalPredictionDriftMetric.POPULATION_STABILITY_INDEX, model.metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CategoricalPredictionDriftMetricThreshold model = new CategoricalPredictionDriftMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(29.225647005199463D)) - .withMetric(CategoricalPredictionDriftMetric.POPULATION_STABILITY_INDEX); - model = BinaryData.fromObject(model).toObject(CategoricalPredictionDriftMetricThreshold.class); - Assertions.assertEquals(29.225647005199463D, model.threshold().value()); - Assertions.assertEquals(CategoricalPredictionDriftMetric.POPULATION_STABILITY_INDEX, model.metric()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTests.java deleted file mode 100644 index cca76ae955bf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BlockedTransformers; -import com.azure.resourcemanager.machinelearning.models.Classification; -import com.azure.resourcemanager.machinelearning.models.ClassificationModels; -import com.azure.resourcemanager.machinelearning.models.ClassificationPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.ClassificationTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.ColumnTransformer; -import com.azure.resourcemanager.machinelearning.models.FeaturizationMode; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NCrossValidations; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings; -import java.time.Duration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClassificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Classification model = BinaryData.fromString( - "{\"taskType\":\"Classification\",\"primaryMetric\":\"NormMacroRecall\",\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"XGBoostClassifier\",\"RandomForest\",\"KNN\"],\"blockedTrainingAlgorithms\":[\"MultinomialNaiveBayes\",\"GradientBoosting\"],\"enableOnnxCompatibleModels\":false,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LinearRegression\",\"stackMetaLearnerTrainPercentage\":20.84074496097085,\"stackMetaLearnerKWargs\":\"dataczd\"},\"enableStackEnsemble\":false,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT27H37M10S\",\"enableModelExplainability\":true,\"enableDnnTraining\":false},\"positiveLabel\":\"sstciv\",\"limitSettings\":{\"maxTrials\":636720393,\"trialTimeout\":\"PT55H19M43S\",\"timeout\":\"PT42H27M16S\",\"maxConcurrentTrials\":1561472375,\"maxCoresPerTrial\":1179315377,\"exitScore\":20.777247401023292,\"enableEarlyTermination\":true},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"cvSplitColumnNames\":[\"xrkemjpequlrl\",\"audgjtfbclakkucd\",\"wnhczbutou\"],\"weightColumnName\":\"jtirjwayhicqq\",\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"v\",\"mode\":\"ReadOnlyMount\",\"description\":\"lvlize\"},\"testData\":{\"jobInputType\":\"mltable\",\"uri\":\"biabvnsrgekz\",\"mode\":\"EvalMount\",\"description\":\"dyfhb\"},\"validationDataSize\":71.86910773602595,\"testDataSize\":54.066554814118874,\"featurizationSettings\":{\"mode\":\"Auto\",\"blockedTransformers\":[\"LabelEncoder\",\"NaiveBayes\",\"WordEmbedding\",\"HashOneHotEncoder\"],\"columnNameAndTypes\":{\"jrz\":\"qjsgyzst\",\"iitt\":\"rknsfdrlduyeh\",\"csozjv\":\"gyuqwrldaxurfqa\"},\"transformerParams\":{\"ttoztj\":[{\"fields\":[\"gbnvt\",\"o\"],\"parameters\":\"dataalzyxwhoeamo\"},{\"fields\":[\"doey\",\"fpnimtwuuhaueg\"],\"parameters\":\"datawmnfeubtzjyrkwfu\"},{\"fields\":[\"hrrk\",\"umnqdurhzzfopu\"],\"parameters\":\"dataqusvwlujopwnib\"}],\"feapdrbzyvbsuadu\":[{\"fields\":[\"qvfmwcad\",\"tgctxe\"],\"parameters\":\"datavgwy\"},{\"fields\":[\"elfnzzryiz\"],\"parameters\":\"dataxgdebxl\"},{\"fields\":[\"no\",\"irhpfabenq\"],\"parameters\":\"datamwmgewayxfl\"},{\"fields\":[\"pjs\"],\"parameters\":\"datahemhcucsqsnxfbx\"}],\"aqufqizjvppwoo\":[{\"fields\":[\"kaxpfobkzhmh\",\"dqltdel\",\"qrojadhfztlray\",\"rkgzkyhudbkuw\"],\"parameters\":\"dataqxlcweakfecjvx\"}],\"cwlo\":[{\"fields\":[\"yjmjjxizxpxhnzls\",\"ekcttgzkjtyqpdwa\",\"egh\"],\"parameters\":\"dataldsvc\"},{\"fields\":[\"iahuqymjzucw\",\"mejjqhddwvmq\"],\"parameters\":\"datayookyfozkbnzxby\"},{\"fields\":[\"pgaixwrgrkkderf\",\"swqi\",\"wepwoggg\"],\"parameters\":\"datawnxhtf\"},{\"fields\":[\"bsudzpgchzpgfqu\",\"jdjxhzghgo\",\"kynrceqavf\",\"bdfmm\"],\"parameters\":\"datadnajuopjyyqmkwlh\"}]},\"enableDnnFeaturization\":false,\"datasetLanguage\":\"kluxxrwzobuzmsxg\"},\"logVerbosity\":\"NotSet\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"dtkwppth\",\"mode\":\"EvalDownload\",\"description\":\"rmimrljdpoqfxyem\"},\"targetColumnName\":\"ftb\"}") - .toObject(Classification.class); - Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); - Assertions.assertEquals("rmimrljdpoqfxyem", model.trainingData().description()); - Assertions.assertEquals("dtkwppth", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("ftb", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.NORM_MACRO_RECALL, model.primaryMetric()); - Assertions.assertEquals(false, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(20.84074496097085D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(true, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT27H37M10S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(false, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(ClassificationModels.XGBOOST_CLASSIFIER, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.MULTINOMIAL_NAIVE_BAYES, - model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("sstciv", model.positiveLabel()); - Assertions.assertEquals(636720393, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT55H19M43S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT42H27M16S"), model.limitSettings().timeout()); - Assertions.assertEquals(1561472375, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1179315377, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(20.777247401023292D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("xrkemjpequlrl", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("jtirjwayhicqq", model.weightColumnName()); - Assertions.assertEquals("lvlize", model.validationData().description()); - Assertions.assertEquals("v", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("dyfhb", model.testData().description()); - Assertions.assertEquals("biabvnsrgekz", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.testData().mode()); - Assertions.assertEquals(71.86910773602595D, model.validationDataSize()); - Assertions.assertEquals(54.066554814118874D, model.testDataSize()); - Assertions.assertEquals("kluxxrwzobuzmsxg", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.LABEL_ENCODER, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("qjsgyzst", model.featurizationSettings().columnNameAndTypes().get("jrz")); - Assertions.assertEquals("gbnvt", - model.featurizationSettings().transformerParams().get("ttoztj").get(0).fields().get(0)); - Assertions.assertEquals(false, model.featurizationSettings().enableDnnFeaturization()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Classification model = new Classification().withLogVerbosity(LogVerbosity.NOT_SET) - .withTrainingData(new MLTableJobInput().withDescription("rmimrljdpoqfxyem") - .withUri("dtkwppth") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withTargetColumnName("ftb") - .withPrimaryMetric(ClassificationPrimaryMetrics.NORM_MACRO_RECALL) - .withTrainingSettings(new ClassificationTrainingSettings().withEnableOnnxCompatibleModels(false) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LINEAR_REGRESSION) - .withStackMetaLearnerTrainPercentage(20.84074496097085D) - .withStackMetaLearnerKWargs("dataczd")) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(true) - .withEnsembleModelDownloadTimeout(Duration.parse("PT27H37M10S")) - .withEnableModelExplainability(true) - .withEnableDnnTraining(false) - .withAllowedTrainingAlgorithms(Arrays.asList(ClassificationModels.XGBOOST_CLASSIFIER, - ClassificationModels.RANDOM_FOREST, ClassificationModels.KNN)) - .withBlockedTrainingAlgorithms(Arrays.asList(ClassificationModels.MULTINOMIAL_NAIVE_BAYES, - ClassificationModels.GRADIENT_BOOSTING))) - .withPositiveLabel("sstciv") - .withLimitSettings(new TableVerticalLimitSettings().withMaxTrials(636720393) - .withTrialTimeout(Duration.parse("PT55H19M43S")) - .withTimeout(Duration.parse("PT42H27M16S")) - .withMaxConcurrentTrials(1561472375) - .withMaxCoresPerTrial(1179315377) - .withExitScore(20.777247401023292D) - .withEnableEarlyTermination(true)) - .withNCrossValidations(new NCrossValidations()) - .withCvSplitColumnNames(Arrays.asList("xrkemjpequlrl", "audgjtfbclakkucd", "wnhczbutou")) - .withWeightColumnName("jtirjwayhicqq") - .withValidationData(new MLTableJobInput().withDescription("lvlize") - .withUri("v") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withTestData(new MLTableJobInput().withDescription("dyfhb") - .withUri("biabvnsrgekz") - .withMode(InputDeliveryMode.EVAL_MOUNT)) - .withValidationDataSize(71.86910773602595D) - .withTestDataSize(54.066554814118874D) - .withFeaturizationSettings(new TableVerticalFeaturizationSettings().withDatasetLanguage("kluxxrwzobuzmsxg") - .withMode(FeaturizationMode.AUTO) - .withBlockedTransformers( - Arrays.asList(BlockedTransformers.LABEL_ENCODER, BlockedTransformers.NAIVE_BAYES, - BlockedTransformers.WORD_EMBEDDING, BlockedTransformers.HASH_ONE_HOT_ENCODER)) - .withColumnNameAndTypes(mapOf("jrz", "qjsgyzst", "iitt", "rknsfdrlduyeh", "csozjv", "gyuqwrldaxurfqa")) - .withTransformerParams(mapOf("ttoztj", Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("gbnvt", "o")).withParameters("dataalzyxwhoeamo"), - new ColumnTransformer().withFields(Arrays.asList("doey", "fpnimtwuuhaueg")) - .withParameters("datawmnfeubtzjyrkwfu"), - new ColumnTransformer().withFields(Arrays.asList("hrrk", "umnqdurhzzfopu")) - .withParameters("dataqusvwlujopwnib")), - "feapdrbzyvbsuadu", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("qvfmwcad", "tgctxe")) - .withParameters("datavgwy"), - new ColumnTransformer().withFields(Arrays.asList("elfnzzryiz")).withParameters("dataxgdebxl"), - new ColumnTransformer().withFields(Arrays.asList("no", "irhpfabenq")) - .withParameters("datamwmgewayxfl"), - new ColumnTransformer().withFields(Arrays.asList("pjs")).withParameters("datahemhcucsqsnxfbx")), - "aqufqizjvppwoo", - Arrays.asList(new ColumnTransformer() - .withFields(Arrays.asList("kaxpfobkzhmh", "dqltdel", "qrojadhfztlray", "rkgzkyhudbkuw")) - .withParameters("dataqxlcweakfecjvx")), - "cwlo", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("yjmjjxizxpxhnzls", "ekcttgzkjtyqpdwa", "egh")) - .withParameters("dataldsvc"), - new ColumnTransformer().withFields(Arrays.asList("iahuqymjzucw", "mejjqhddwvmq")) - .withParameters("datayookyfozkbnzxby"), - new ColumnTransformer().withFields(Arrays.asList("pgaixwrgrkkderf", "swqi", "wepwoggg")) - .withParameters("datawnxhtf"), - new ColumnTransformer() - .withFields(Arrays.asList("bsudzpgchzpgfqu", "jdjxhzghgo", "kynrceqavf", "bdfmm")) - .withParameters("datadnajuopjyyqmkwlh")))) - .withEnableDnnFeaturization(false)); - model = BinaryData.fromObject(model).toObject(Classification.class); - Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); - Assertions.assertEquals("rmimrljdpoqfxyem", model.trainingData().description()); - Assertions.assertEquals("dtkwppth", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("ftb", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.NORM_MACRO_RECALL, model.primaryMetric()); - Assertions.assertEquals(false, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(20.84074496097085D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(true, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT27H37M10S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(false, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(ClassificationModels.XGBOOST_CLASSIFIER, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.MULTINOMIAL_NAIVE_BAYES, - model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("sstciv", model.positiveLabel()); - Assertions.assertEquals(636720393, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT55H19M43S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT42H27M16S"), model.limitSettings().timeout()); - Assertions.assertEquals(1561472375, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1179315377, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(20.777247401023292D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("xrkemjpequlrl", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("jtirjwayhicqq", model.weightColumnName()); - Assertions.assertEquals("lvlize", model.validationData().description()); - Assertions.assertEquals("v", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("dyfhb", model.testData().description()); - Assertions.assertEquals("biabvnsrgekz", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.testData().mode()); - Assertions.assertEquals(71.86910773602595D, model.validationDataSize()); - Assertions.assertEquals(54.066554814118874D, model.testDataSize()); - Assertions.assertEquals("kluxxrwzobuzmsxg", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.LABEL_ENCODER, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("qjsgyzst", model.featurizationSettings().columnNameAndTypes().get("jrz")); - Assertions.assertEquals("gbnvt", - model.featurizationSettings().transformerParams().get("ttoztj").get(0).fields().get(0)); - Assertions.assertEquals(false, model.featurizationSettings().enableDnnFeaturization()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTrainingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTrainingSettingsTests.java deleted file mode 100644 index 1b6542b32fb9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTrainingSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ClassificationModels; -import com.azure.resourcemanager.machinelearning.models.ClassificationTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClassificationTrainingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClassificationTrainingSettings model = BinaryData.fromString( - "{\"allowedTrainingAlgorithms\":[\"ExtremeRandomTrees\",\"DecisionTree\",\"KNN\",\"SVM\"],\"blockedTrainingAlgorithms\":[\"SGD\",\"LogisticRegression\",\"XGBoostClassifier\",\"LinearSVM\"],\"enableOnnxCompatibleModels\":false,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LightGBMRegressor\",\"stackMetaLearnerTrainPercentage\":99.81987601096077,\"stackMetaLearnerKWargs\":\"dataqcnrrfijhggabqb\"},\"enableStackEnsemble\":false,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT110H9M4S\",\"enableModelExplainability\":true,\"enableDnnTraining\":false}") - .toObject(ClassificationTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(99.81987601096077D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT110H9M4S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(ClassificationModels.EXTREME_RANDOM_TREES, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.SGD, model.blockedTrainingAlgorithms().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClassificationTrainingSettings model - = new ClassificationTrainingSettings().withEnableOnnxCompatibleModels(false) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMREGRESSOR) - .withStackMetaLearnerTrainPercentage(99.81987601096077D) - .withStackMetaLearnerKWargs("dataqcnrrfijhggabqb")) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(true) - .withEnsembleModelDownloadTimeout(Duration.parse("PT110H9M4S")) - .withEnableModelExplainability(true) - .withEnableDnnTraining(false) - .withAllowedTrainingAlgorithms(Arrays.asList(ClassificationModels.EXTREME_RANDOM_TREES, - ClassificationModels.DECISION_TREE, ClassificationModels.KNN, ClassificationModels.SVM)) - .withBlockedTrainingAlgorithms( - Arrays.asList(ClassificationModels.SGD, ClassificationModels.LOGISTIC_REGRESSION, - ClassificationModels.XGBOOST_CLASSIFIER, ClassificationModels.LINEAR_SVM)); - model = BinaryData.fromObject(model).toObject(ClassificationTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(99.81987601096077D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT110H9M4S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(ClassificationModels.EXTREME_RANDOM_TREES, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.SGD, model.blockedTrainingAlgorithms().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdateParametersTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdateParametersTests.java deleted file mode 100644 index 46ffbae7342f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdateParametersTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ClusterUpdateParameters; -import com.azure.resourcemanager.machinelearning.models.ScaleSettings; -import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ClusterUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpdateParameters model = BinaryData.fromString( - "{\"properties\":{\"properties\":{\"scaleSettings\":{\"maxNodeCount\":932562427,\"minNodeCount\":2103137599,\"nodeIdleTimeBeforeScaleDown\":\"PT10H3M4S\"}}}}") - .toObject(ClusterUpdateParameters.class); - Assertions.assertEquals(932562427, model.properties().scaleSettings().maxNodeCount()); - Assertions.assertEquals(2103137599, model.properties().scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT10H3M4S"), - model.properties().scaleSettings().nodeIdleTimeBeforeScaleDown()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpdateParameters model = new ClusterUpdateParameters().withProperties( - new ScaleSettingsInformation().withScaleSettings(new ScaleSettings().withMaxNodeCount(932562427) - .withMinNodeCount(2103137599) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT10H3M4S")))); - model = BinaryData.fromObject(model).toObject(ClusterUpdateParameters.class); - Assertions.assertEquals(932562427, model.properties().scaleSettings().maxNodeCount()); - Assertions.assertEquals(2103137599, model.properties().scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT10H3M4S"), - model.properties().scaleSettings().nodeIdleTimeBeforeScaleDown()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdatePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdatePropertiesTests.java deleted file mode 100644 index 6b6e4484b286..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdatePropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ClusterUpdateProperties; -import com.azure.resourcemanager.machinelearning.models.ScaleSettings; -import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ClusterUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpdateProperties model = BinaryData.fromString( - "{\"properties\":{\"scaleSettings\":{\"maxNodeCount\":2125596553,\"minNodeCount\":236135695,\"nodeIdleTimeBeforeScaleDown\":\"PT176H56M43S\"}}}") - .toObject(ClusterUpdateProperties.class); - Assertions.assertEquals(2125596553, model.properties().scaleSettings().maxNodeCount()); - Assertions.assertEquals(236135695, model.properties().scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT176H56M43S"), - model.properties().scaleSettings().nodeIdleTimeBeforeScaleDown()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpdateProperties model = new ClusterUpdateProperties().withProperties( - new ScaleSettingsInformation().withScaleSettings(new ScaleSettings().withMaxNodeCount(2125596553) - .withMinNodeCount(236135695) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT176H56M43S")))); - model = BinaryData.fromObject(model).toObject(ClusterUpdateProperties.class); - Assertions.assertEquals(2125596553, model.properties().scaleSettings().maxNodeCount()); - Assertions.assertEquals(236135695, model.properties().scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT176H56M43S"), - model.properties().scaleSettings().nodeIdleTimeBeforeScaleDown()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerInnerTests.java deleted file mode 100644 index af80271d0e43..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CodeContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CodeContainerInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"isArchived\":true,\"latestVersion\":\"buruvd\",\"nextVersion\":\"vsmzlxwab\",\"description\":\"oefki\",\"tags\":{\"gkfbtndoaong\":\"tpuqujmq\",\"tcje\":\"jcntuj\",\"zfoqouicybxar\":\"ftwwaezkojvdc\"},\"properties\":{\"x\":\"zuf\",\"khazxkhnzbonlwn\":\"iqopidoamciod\",\"szzcmrvexztv\":\"oegokdwbwh\",\"gsfraoyzkoow\":\"t\"}},\"id\":\"mnguxawqaldsyu\",\"name\":\"ximerqfobwyznk\",\"type\":\"ykutwpf\"}") - .toObject(CodeContainerInner.class); - Assertions.assertEquals("oefki", model.properties().description()); - Assertions.assertEquals("tpuqujmq", model.properties().tags().get("gkfbtndoaong")); - Assertions.assertEquals("zuf", model.properties().properties().get("x")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CodeContainerInner model - = new CodeContainerInner().withProperties(new CodeContainerProperties().withDescription("oefki") - .withTags(mapOf("gkfbtndoaong", "tpuqujmq", "tcje", "jcntuj", "zfoqouicybxar", "ftwwaezkojvdc")) - .withProperties(mapOf("x", "zuf", "khazxkhnzbonlwn", "iqopidoamciod", "szzcmrvexztv", "oegokdwbwh", - "gsfraoyzkoow", "t")) - .withIsArchived(true)); - model = BinaryData.fromObject(model).toObject(CodeContainerInner.class); - Assertions.assertEquals("oefki", model.properties().description()); - Assertions.assertEquals("tpuqujmq", model.properties().tags().get("gkfbtndoaong")); - Assertions.assertEquals("zuf", model.properties().properties().get("x")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerPropertiesTests.java deleted file mode 100644 index 8a1bf482c65e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CodeContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CodeContainerProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Deleting\",\"isArchived\":false,\"latestVersion\":\"r\",\"nextVersion\":\"dsnfdsdoakgtdl\",\"description\":\"kzevdlhewpusds\",\"tags\":{\"kufgmj\":\"vogvbbejdcngqqmo\",\"grtwae\":\"rwr\",\"zkopb\":\"u\"},\"properties\":{\"hziuiefozbhdms\":\"rfdwoyu\",\"zqhof\":\"l\"}}") - .toObject(CodeContainerProperties.class); - Assertions.assertEquals("kzevdlhewpusds", model.description()); - Assertions.assertEquals("vogvbbejdcngqqmo", model.tags().get("kufgmj")); - Assertions.assertEquals("rfdwoyu", model.properties().get("hziuiefozbhdms")); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CodeContainerProperties model = new CodeContainerProperties().withDescription("kzevdlhewpusds") - .withTags(mapOf("kufgmj", "vogvbbejdcngqqmo", "grtwae", "rwr", "zkopb", "u")) - .withProperties(mapOf("hziuiefozbhdms", "rfdwoyu", "zqhof", "l")) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(CodeContainerProperties.class); - Assertions.assertEquals("kzevdlhewpusds", model.description()); - Assertions.assertEquals("vogvbbejdcngqqmo", model.tags().get("kufgmj")); - Assertions.assertEquals("rfdwoyu", model.properties().get("hziuiefozbhdms")); - Assertions.assertEquals(false, model.isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index 0465407bf61c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -import com.azure.resourcemanager.machinelearning.models.CodeContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CodeContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CodeContainerResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"mzqa\",\"nextVersion\":\"rmnjijpx\",\"description\":\"q\",\"tags\":{\"yxbaaabjyvayf\":\"fn\",\"exn\":\"imrzrtuzqog\",\"zsoibjudpfrxtr\":\"vfdnwnwmewzsyyce\",\"ytdw\":\"hzv\"},\"properties\":{\"vpdtiirqtdqoa\":\"rqubpaxhexiil\",\"eptra\":\"oruzfgsquyfxrxx\"}},\"id\":\"jezwlwnw\",\"name\":\"uqlcvydy\",\"type\":\"atdooaojkniod\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"nuj\",\"nextVersion\":\"mmsbvdkcrodtjin\",\"description\":\"jlfltkacjvefkdlf\",\"tags\":{\"qblylsyxkqj\":\"ggkfpagaowpul\",\"gxsds\":\"sjervti\"},\"properties\":{\"nqicvinvkjjxdxrb\":\"mpsbzkfzbeyv\"}},\"id\":\"kzclewyh\",\"name\":\"lw\",\"type\":\"aztz\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"kwyfzqwhxxbuyqax\",\"nextVersion\":\"eqz\",\"description\":\"priolx\",\"tags\":{\"ncwsob\":\"altol\",\"pfuvglsbjjca\":\"wcsdbnwdcfhucq\",\"t\":\"vxb\"},\"properties\":{\"lxqtvcofudfl\":\"utncorm\"}},\"id\":\"gj\",\"name\":\"bgdknnqv\",\"type\":\"aznqntoru\"}],\"nextLink\":\"gsahmkycgrauw\"}") - .toObject(CodeContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("q", model.value().get(0).properties().description()); - Assertions.assertEquals("fn", model.value().get(0).properties().tags().get("yxbaaabjyvayf")); - Assertions.assertEquals("rqubpaxhexiil", model.value().get(0).properties().properties().get("vpdtiirqtdqoa")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("gsahmkycgrauw", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CodeContainerResourceArmPaginatedResult model - = new CodeContainerResourceArmPaginatedResult().withValue(Arrays.asList( - new CodeContainerInner().withProperties(new CodeContainerProperties().withDescription("q") - .withTags(mapOf("yxbaaabjyvayf", "fn", "exn", "imrzrtuzqog", "zsoibjudpfrxtr", "vfdnwnwmewzsyyce", - "ytdw", "hzv")) - .withProperties(mapOf("vpdtiirqtdqoa", "rqubpaxhexiil", "eptra", "oruzfgsquyfxrxx")) - .withIsArchived(false)), - new CodeContainerInner() - .withProperties(new CodeContainerProperties().withDescription("jlfltkacjvefkdlf") - .withTags(mapOf("qblylsyxkqj", "ggkfpagaowpul", "gxsds", "sjervti")) - .withProperties(mapOf("nqicvinvkjjxdxrb", "mpsbzkfzbeyv")) - .withIsArchived(false)), - new CodeContainerInner().withProperties(new CodeContainerProperties().withDescription("priolx") - .withTags(mapOf("ncwsob", "altol", "pfuvglsbjjca", "wcsdbnwdcfhucq", "t", "vxb")) - .withProperties(mapOf("lxqtvcofudfl", "utncorm")) - .withIsArchived(true)))) - .withNextLink("gsahmkycgrauw"); - model = BinaryData.fromObject(model).toObject(CodeContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("q", model.value().get(0).properties().description()); - Assertions.assertEquals("fn", model.value().get(0).properties().tags().get("yxbaaabjyvayf")); - Assertions.assertEquals("rqubpaxhexiil", model.value().get(0).properties().properties().get("vpdtiirqtdqoa")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("gsahmkycgrauw", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 35f77adec0c6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -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 reactor.core.publisher.Mono; - -public final class CodeContainersCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":false,\"latestVersion\":\"mluyrlkpismmr\",\"nextVersion\":\"jpjthizsabcylzz\",\"description\":\"tumzenkrdruesxe\",\"tags\":{\"qqeetsqac\":\"xoibdctjwfeb\",\"yyraiaiidkewqwa\":\"czfro\",\"fngfpilloir\":\"ptldddorzljhnxfk\",\"bktuqnbcjk\":\"vx\"},\"properties\":{\"inlic\":\"mznwwtkuytwii\",\"yzqke\":\"moyoioxdwff\",\"uecokyduqzusc\":\"curr\",\"htekxnvkdvc\":\"lbqv\"}},\"id\":\"wrd\",\"name\":\"ddddwzdlbbcztam\",\"type\":\"yrkwsthpivocf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CodeContainer response = manager.codeContainers() - .define("uvqbeyxwrmupzpe") - .withExistingWorkspace("gynsixgzbbnug", "quarb") - .withProperties(new CodeContainerProperties().withDescription("gen") - .withTags(mapOf("ppgl", "ybepsihzqieoy", "zlycxlubrukhqb", "jsfgbyyts")) - .withProperties(mapOf("fjjfexuvsveam", "rbdkgqdmvvvj", "io", "eauuuvh", "mtyosdpxtsdy", - "glmufzuuyszhae", "wxiavwmixaqgfpu", "fgefvwgwp")) - .withIsArchived(true)) - .create(); - - Assertions.assertEquals("tumzenkrdruesxe", response.properties().description()); - Assertions.assertEquals("xoibdctjwfeb", response.properties().tags().get("qqeetsqac")); - Assertions.assertEquals("mznwwtkuytwii", response.properties().properties().get("inlic")); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteWithResponseMockTests.java deleted file mode 100644 index aa77dc1ed8e2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CodeContainersDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.codeContainers() - .deleteWithResponse("glafnfgazaghddc", "zwxuxorrutuhvem", "xlssolqypvw", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetWithResponseMockTests.java deleted file mode 100644 index ebe02e07238a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CodeContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"uod\",\"nextVersion\":\"gqu\",\"description\":\"nyxpmqd\",\"tags\":{\"sq\":\"iiontqikdipk\",\"tacvs\":\"uzabrsoihataj\",\"adohsj\":\"nssxylsui\",\"qqnzk\":\"iehkxgfu\"},\"properties\":{\"sxipdnlbyit\":\"q\"}},\"id\":\"pwwgzeylzp\",\"name\":\"imxacrkt\",\"type\":\"o\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CodeContainer response = manager.codeContainers() - .getWithResponse("lxo", "vrkqv", "vgdojcvzfcmxmjp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("nyxpmqd", response.properties().description()); - Assertions.assertEquals("iiontqikdipk", response.properties().tags().get("sq")); - Assertions.assertEquals("q", response.properties().properties().get("sxipdnlbyit")); - Assertions.assertEquals(true, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListMockTests.java deleted file mode 100644 index 59200a0c881b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CodeContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"kbzltnowpajfhx\",\"nextVersion\":\"ubbzadzglmuuzps\",\"description\":\"sypxmul\",\"tags\":{\"p\":\"rerk\",\"bdjkmnxsggnow\":\"fjxkbywsbuqfm\"},\"properties\":{\"hbtyc\":\"vdbrdvsv\",\"rcthypepxs\":\"lkusgiik\"}},\"id\":\"rdis\",\"name\":\"sdvkym\",\"type\":\"tcwmivoxgzeg\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.codeContainers().list("r", "tqnk", "qjftvltj", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("sypxmul", response.iterator().next().properties().description()); - Assertions.assertEquals("rerk", response.iterator().next().properties().tags().get("p")); - Assertions.assertEquals("vdbrdvsv", response.iterator().next().properties().properties().get("hbtyc")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteWithResponseMockTests.java deleted file mode 100644 index 3bb75c6fd365..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CodeVersionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.codeVersions() - .deleteWithResponse("wowqsnixxwdqz", "rvuk", "zkmxbh", "p", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishMockTests.java deleted file mode 100644 index aaa1a16623a0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CodeVersionsPublishMockTests { - @Test - public void testPublish() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.codeVersions() - .publish("mq", "vbksksmqm", "owrmhm", "fhfutjyxntmgtg", - new DestinationAsset().withRegistryName("aem") - .withDestinationName("gcaxjymdqrfvgicx") - .withDestinationVersion("llqgnsydksvj"), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CollectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CollectionTests.java deleted file mode 100644 index 297698e7bdbd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CollectionTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Collection; -import com.azure.resourcemanager.machinelearning.models.DataCollectionMode; -import org.junit.jupiter.api.Assertions; - -public final class CollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Collection model = BinaryData.fromString( - "{\"samplingRate\":14.031026456945018,\"dataCollectionMode\":\"Disabled\",\"dataId\":\"lmgnlqxsjx\",\"clientId\":\"lexhv\"}") - .toObject(Collection.class); - Assertions.assertEquals(14.031026456945018D, model.samplingRate()); - Assertions.assertEquals(DataCollectionMode.DISABLED, model.dataCollectionMode()); - Assertions.assertEquals("lmgnlqxsjx", model.dataId()); - Assertions.assertEquals("lexhv", model.clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Collection model = new Collection().withSamplingRate(14.031026456945018D) - .withDataCollectionMode(DataCollectionMode.DISABLED) - .withDataId("lmgnlqxsjx") - .withClientId("lexhv"); - model = BinaryData.fromObject(model).toObject(Collection.class); - Assertions.assertEquals(14.031026456945018D, model.samplingRate()); - Assertions.assertEquals(DataCollectionMode.DISABLED, model.dataCollectionMode()); - Assertions.assertEquals("lmgnlqxsjx", model.dataId()); - Assertions.assertEquals("lexhv", model.clientId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ColumnTransformerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ColumnTransformerTests.java deleted file mode 100644 index dc91a0dc1cc0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ColumnTransformerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ColumnTransformer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ColumnTransformerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ColumnTransformer model = BinaryData.fromString( - "{\"fields\":[\"psdudgco\",\"zomehxlantolam\",\"bijux\",\"qllczipvwdtgckz\"],\"parameters\":\"dataiqdlratrkw\"}") - .toObject(ColumnTransformer.class); - Assertions.assertEquals("psdudgco", model.fields().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ColumnTransformer model = new ColumnTransformer() - .withFields(Arrays.asList("psdudgco", "zomehxlantolam", "bijux", "qllczipvwdtgckz")) - .withParameters("dataiqdlratrkw"); - model = BinaryData.fromObject(model).toObject(ColumnTransformer.class); - Assertions.assertEquals("psdudgco", model.fields().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CommandJobLimitsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CommandJobLimitsTests.java deleted file mode 100644 index 0798a96a7c14..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CommandJobLimitsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CommandJobLimits; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class CommandJobLimitsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CommandJobLimits model = BinaryData.fromString("{\"jobLimitsType\":\"Command\",\"timeout\":\"PT211H51M18S\"}") - .toObject(CommandJobLimits.class); - Assertions.assertEquals(Duration.parse("PT211H51M18S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CommandJobLimits model = new CommandJobLimits().withTimeout(Duration.parse("PT211H51M18S")); - model = BinaryData.fromObject(model).toObject(CommandJobLimits.class); - Assertions.assertEquals(Duration.parse("PT211H51M18S"), model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerInnerTests.java deleted file mode 100644 index 8e73d1982e98..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentContainerInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":true,\"latestVersion\":\"phqamvdkfwynwcvt\",\"nextVersion\":\"kayh\",\"description\":\"nvyq\",\"tags\":{\"cjaesgvvs\":\"kzwpcnpw\",\"wygzlvdnkfxusem\":\"cyajguqf\",\"pfcqdp\":\"wzrmuh\"},\"properties\":{\"celve\":\"qvpsvuoymg\"}},\"id\":\"ypql\",\"name\":\"feo\",\"type\":\"erqwkyhkobopg\"}") - .toObject(ComponentContainerInner.class); - Assertions.assertEquals("nvyq", model.properties().description()); - Assertions.assertEquals("kzwpcnpw", model.properties().tags().get("cjaesgvvs")); - Assertions.assertEquals("qvpsvuoymg", model.properties().properties().get("celve")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentContainerInner model - = new ComponentContainerInner().withProperties(new ComponentContainerProperties().withDescription("nvyq") - .withTags(mapOf("cjaesgvvs", "kzwpcnpw", "wygzlvdnkfxusem", "cyajguqf", "pfcqdp", "wzrmuh")) - .withProperties(mapOf("celve", "qvpsvuoymg")) - .withIsArchived(true)); - model = BinaryData.fromObject(model).toObject(ComponentContainerInner.class); - Assertions.assertEquals("nvyq", model.properties().description()); - Assertions.assertEquals("kzwpcnpw", model.properties().tags().get("cjaesgvvs")); - Assertions.assertEquals("qvpsvuoymg", model.properties().properties().get("celve")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerPropertiesTests.java deleted file mode 100644 index 8e0af55f95c0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentContainerProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"epbqpcrfkbw\",\"nextVersion\":\"snjvcdwxlpqekftn\",\"description\":\"tjsyin\",\"tags\":{\"gikdgsz\":\"qatmtdhtmdvy\"},\"properties\":{\"kj\":\"birryuzhl\"}}") - .toObject(ComponentContainerProperties.class); - Assertions.assertEquals("tjsyin", model.description()); - Assertions.assertEquals("qatmtdhtmdvy", model.tags().get("gikdgsz")); - Assertions.assertEquals("birryuzhl", model.properties().get("kj")); - Assertions.assertEquals(true, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentContainerProperties model = new ComponentContainerProperties().withDescription("tjsyin") - .withTags(mapOf("gikdgsz", "qatmtdhtmdvy")) - .withProperties(mapOf("kj", "birryuzhl")) - .withIsArchived(true); - model = BinaryData.fromObject(model).toObject(ComponentContainerProperties.class); - Assertions.assertEquals("tjsyin", model.description()); - Assertions.assertEquals("qatmtdhtmdvy", model.tags().get("gikdgsz")); - Assertions.assertEquals("birryuzhl", model.properties().get("kj")); - Assertions.assertEquals(true, model.isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index 07d11a4d8a93..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentContainerResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"mwutwbdsre\",\"nextVersion\":\"drhneuyow\",\"description\":\"d\",\"tags\":{\"ib\":\"i\"},\"properties\":{\"lfzxiavrmbzonoki\":\"gpikpzimejza\",\"rgz\":\"rjqc\"}},\"id\":\"rlazszrnw\",\"name\":\"iin\",\"type\":\"fpwpjylwbt\"},{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"cdhszf\",\"nextVersion\":\"fbgofeljagrqmqh\",\"description\":\"vriiio\",\"tags\":{\"fk\":\"lg\"},\"properties\":{\"ueluqhhahhxvrhmz\":\"sexso\",\"ughftqsx\":\"wpjgwws\",\"grjguufzd\":\"qxujxukndxd\"}},\"id\":\"yqtfihwh\",\"name\":\"otzi\",\"type\":\"gamv\"}],\"nextLink\":\"ho\"}") - .toObject(ComponentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).properties().description()); - Assertions.assertEquals("i", model.value().get(0).properties().tags().get("ib")); - Assertions.assertEquals("gpikpzimejza", model.value().get(0).properties().properties().get("lfzxiavrmbzonoki")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("ho", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentContainerResourceArmPaginatedResult model - = new ComponentContainerResourceArmPaginatedResult().withValue(Arrays.asList( - new ComponentContainerInner().withProperties(new ComponentContainerProperties().withDescription("d") - .withTags(mapOf("ib", "i")) - .withProperties(mapOf("lfzxiavrmbzonoki", "gpikpzimejza", "rgz", "rjqc")) - .withIsArchived(false)), - new ComponentContainerInner() - .withProperties(new ComponentContainerProperties().withDescription("vriiio") - .withTags(mapOf("fk", "lg")) - .withProperties( - mapOf("ueluqhhahhxvrhmz", "sexso", "ughftqsx", "wpjgwws", "grjguufzd", "qxujxukndxd")) - .withIsArchived(false)))) - .withNextLink("ho"); - model = BinaryData.fromObject(model).toObject(ComponentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).properties().description()); - Assertions.assertEquals("i", model.value().get(0).properties().tags().get("ib")); - Assertions.assertEquals("gpikpzimejza", model.value().get(0).properties().properties().get("lfzxiavrmbzonoki")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("ho", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index f1dc2f7ce6ad..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -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 reactor.core.publisher.Mono; - -public final class ComponentContainersCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"snrgaxoyvg\",\"nextVersion\":\"pfyxhsppvjsduouo\",\"description\":\"enqsom\",\"tags\":{\"reuwv\":\"eqeapaseqcppyp\",\"tqgtllwyoxz\":\"hndyvtoiqofz\",\"mo\":\"hellitpqvpivrsgq\"},\"properties\":{\"acgihnalpc\":\"omebzvtvxxfsfo\",\"zikatywedb\":\"edybkbgdwbmi\"}},\"id\":\"rbzp\",\"name\":\"uzbbhxncs\",\"type\":\"dw\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComponentContainer response = manager.componentContainers() - .define("jpcroxpp") - .withExistingWorkspace("dfeemxiurpf", "vypmwdz") - .withProperties(new ComponentContainerProperties().withDescription("c") - .withTags(mapOf("nst", "vwlxd", "xklr", "eurd", "dpkihqhnfubev", "atsiznymwz", "evltfebq", "adxcez")) - .withProperties(mapOf("ak", "akl", "ftwrphmr", "stif")) - .withIsArchived(true)) - .create(); - - Assertions.assertEquals("enqsom", response.properties().description()); - Assertions.assertEquals("eqeapaseqcppyp", response.properties().tags().get("reuwv")); - Assertions.assertEquals("omebzvtvxxfsfo", response.properties().properties().get("acgihnalpc")); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteWithResponseMockTests.java deleted file mode 100644 index e881aea5968d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComponentContainersDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.componentContainers() - .deleteWithResponse("lirybytcaqp", "ohlcbnrv", "yyhhsis", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetWithResponseMockTests.java deleted file mode 100644 index 8bfb87dee85e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComponentContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Updating\",\"isArchived\":true,\"latestVersion\":\"imkjzcx\",\"nextVersion\":\"jdfxvksijrjgyin\",\"description\":\"xijovuyxuupzeadd\",\"tags\":{\"vj\":\"pdtphvj\",\"htnyz\":\"ykngqyiyjxzxb\"},\"properties\":{\"koabfcvefbw\":\"nrmd\"}},\"id\":\"mgyqshsasmryuyut\",\"name\":\"bxrgrztkyqgu\",\"type\":\"uuihkybgkyncyzj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComponentContainer response = manager.componentContainers() - .getWithResponse("tq", "rpa", "teqiwd", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("xijovuyxuupzeadd", response.properties().description()); - Assertions.assertEquals("pdtphvj", response.properties().tags().get("vj")); - Assertions.assertEquals("nrmd", response.properties().properties().get("koabfcvefbw")); - Assertions.assertEquals(true, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListMockTests.java deleted file mode 100644 index a9a1772c99cb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComponentContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":true,\"latestVersion\":\"rijebm\",\"nextVersion\":\"ongmndwohoeas\",\"description\":\"xfvbjimzwyns\",\"tags\":{\"jmjwqdslqreofz\":\"hvkyezwseyuo\",\"xsy\":\"krztpyaymhxlnmw\"},\"properties\":{\"vyotpcvpahhpk\":\"tvqmim\",\"dwtominru\":\"yqpvzxxz\"}},\"id\":\"qau\",\"name\":\"gasfmhbxv\",\"type\":\"wkqnatxvuzcc\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.componentContainers() - .list("p", "hz", "pqscu", ListViewType.ARCHIVED_ONLY, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xfvbjimzwyns", response.iterator().next().properties().description()); - Assertions.assertEquals("hvkyezwseyuo", response.iterator().next().properties().tags().get("jmjwqdslqreofz")); - Assertions.assertEquals("tvqmim", response.iterator().next().properties().properties().get("vyotpcvpahhpk")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionInnerTests.java deleted file mode 100644 index cdf01ef90baf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentVersionInner model = BinaryData.fromString( - "{\"properties\":{\"componentSpec\":\"datauaibrebqaaysj\",\"provisioningState\":\"Canceled\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"tezlwff\",\"tags\":{\"qqmtedltmmji\":\"kpj\",\"upkvipmdsc\":\"yeozphvwauyqncy\",\"totxhojujb\":\"xqupevzhf\",\"n\":\"pelmcuvhixbjxyf\"},\"properties\":{\"ujrywvtyl\":\"coolsttpkiwkkb\"}},\"id\":\"pncur\",\"name\":\"oiwiithtywub\",\"type\":\"cbihwqk\"}") - .toObject(ComponentVersionInner.class); - Assertions.assertEquals("tezlwff", model.properties().description()); - Assertions.assertEquals("kpj", model.properties().tags().get("qqmtedltmmji")); - Assertions.assertEquals("coolsttpkiwkkb", model.properties().properties().get("ujrywvtyl")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentVersionInner model - = new ComponentVersionInner().withProperties(new ComponentVersionProperties().withDescription("tezlwff") - .withTags(mapOf("qqmtedltmmji", "kpj", "upkvipmdsc", "yeozphvwauyqncy", "totxhojujb", "xqupevzhf", "n", - "pelmcuvhixbjxyf")) - .withProperties(mapOf("ujrywvtyl", "coolsttpkiwkkb")) - .withIsArchived(true) - .withIsAnonymous(true) - .withComponentSpec("datauaibrebqaaysj")); - model = BinaryData.fromObject(model).toObject(ComponentVersionInner.class); - Assertions.assertEquals("tezlwff", model.properties().description()); - Assertions.assertEquals("kpj", model.properties().tags().get("qqmtedltmmji")); - Assertions.assertEquals("coolsttpkiwkkb", model.properties().properties().get("ujrywvtyl")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionPropertiesTests.java deleted file mode 100644 index a8950803a80b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentVersionProperties model = BinaryData.fromString( - "{\"componentSpec\":\"datadntwjchrdgo\",\"provisioningState\":\"Deleting\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"ond\",\"tags\":{\"fdlwg\":\"uu\",\"gseinq\":\"ytsbwtovv\",\"nepttwqmsni\":\"iufxqknpir\",\"rxfrddhc\":\"fcdmqnrojlpijn\"},\"properties\":{\"hftwesgog\":\"izzronasxiftozqy\",\"sxkkg\":\"zhonnxkrlgnyhmo\",\"rghxjb\":\"h\"}}") - .toObject(ComponentVersionProperties.class); - Assertions.assertEquals("ond", model.description()); - Assertions.assertEquals("uu", model.tags().get("fdlwg")); - Assertions.assertEquals("izzronasxiftozqy", model.properties().get("hftwesgog")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentVersionProperties model = new ComponentVersionProperties().withDescription("ond") - .withTags( - mapOf("fdlwg", "uu", "gseinq", "ytsbwtovv", "nepttwqmsni", "iufxqknpir", "rxfrddhc", "fcdmqnrojlpijn")) - .withProperties(mapOf("hftwesgog", "izzronasxiftozqy", "sxkkg", "zhonnxkrlgnyhmo", "rghxjb", "h")) - .withIsArchived(true) - .withIsAnonymous(false) - .withComponentSpec("datadntwjchrdgo"); - model = BinaryData.fromObject(model).toObject(ComponentVersionProperties.class); - Assertions.assertEquals("ond", model.description()); - Assertions.assertEquals("uu", model.tags().get("fdlwg")); - Assertions.assertEquals("izzronasxiftozqy", model.properties().get("hftwesgog")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionResourceArmPaginatedResultTests.java deleted file mode 100644 index 0b000b2dc210..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentVersionResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentVersionResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"componentSpec\":\"dataqqaatjinrvgou\",\"provisioningState\":\"Updating\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"gjio\",\"tags\":{\"qwjygvja\":\"rwxkvtkkgl\",\"vkzuhbxvvyhgso\":\"vblm\"},\"properties\":{\"bnhlmc\":\"rqufegxuvwz\",\"dn\":\"l\",\"ijejvegrhbpn\":\"itvgbmhrixkwm\"}},\"id\":\"xexccbdreaxhcexd\",\"name\":\"rvqahqkghtpwi\",\"type\":\"nhyjsv\"},{\"properties\":{\"componentSpec\":\"datacxzbfvoowvr\",\"provisioningState\":\"Updating\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"y\",\"tags\":{\"sxkm\":\"ronzmyhgfip\",\"hjglikk\":\"waekrrjreafxtsgu\",\"uzlm\":\"wslolbqp\"},\"properties\":{\"noigbrnjwmwk\":\"lfktgplcrpwjxe\"}},\"id\":\"bsazejjoqka\",\"name\":\"fhsxttaugz\",\"type\":\"nfaazpxdtnkdmkq\"}],\"nextLink\":\"lwuenvrkp\"}") - .toObject(ComponentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("gjio", model.value().get(0).properties().description()); - Assertions.assertEquals("rwxkvtkkgl", model.value().get(0).properties().tags().get("qwjygvja")); - Assertions.assertEquals("rqufegxuvwz", model.value().get(0).properties().properties().get("bnhlmc")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("lwuenvrkp", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentVersionResourceArmPaginatedResult model - = new ComponentVersionResourceArmPaginatedResult() - .withValue( - Arrays - .asList( - new ComponentVersionInner() - .withProperties(new ComponentVersionProperties().withDescription("gjio") - .withTags(mapOf("qwjygvja", "rwxkvtkkgl", "vkzuhbxvvyhgso", "vblm")) - .withProperties( - mapOf("bnhlmc", "rqufegxuvwz", "dn", "l", "ijejvegrhbpn", "itvgbmhrixkwm")) - .withIsArchived(false) - .withIsAnonymous(true) - .withComponentSpec("dataqqaatjinrvgou")), - new ComponentVersionInner() - .withProperties(new ComponentVersionProperties().withDescription("y") - .withTags( - mapOf("sxkm", "ronzmyhgfip", "hjglikk", "waekrrjreafxtsgu", "uzlm", "wslolbqp")) - .withProperties(mapOf("noigbrnjwmwk", "lfktgplcrpwjxe")) - .withIsArchived(true) - .withIsAnonymous(true) - .withComponentSpec("datacxzbfvoowvr")))) - .withNextLink("lwuenvrkp"); - model = BinaryData.fromObject(model).toObject(ComponentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("gjio", model.value().get(0).properties().description()); - Assertions.assertEquals("rwxkvtkkgl", model.value().get(0).properties().tags().get("qwjygvja")); - Assertions.assertEquals("rqufegxuvwz", model.value().get(0).properties().properties().get("bnhlmc")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("lwuenvrkp", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 46cf07456d5e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -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 reactor.core.publisher.Mono; - -public final class ComponentVersionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"componentSpec\":\"datalzrmiukoth\",\"provisioningState\":\"Failed\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"hfrvsi\",\"tags\":{\"f\":\"gnpcjnia\",\"ogdkp\":\"cgjjioqwu\",\"uqjde\":\"mwr\"},\"properties\":{\"cnbgibklscwdko\":\"q\",\"vxmtsmgk\":\"zyvihevb\",\"rceulbyzzcxsyg\":\"etsn\"}},\"id\":\"y\",\"name\":\"yckd\",\"type\":\"z\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComponentVersion response = manager.componentVersions() - .define("oabthutctcabc") - .withExistingComponent("nclxhwkz", "ggsuzkvd", "ntpzuiwa") - .withProperties(new ComponentVersionProperties().withDescription("wegvuojuwgweccvu") - .withTags(mapOf("fsssmy", "vf", "gpqc", "emkrhbsdgktluifi", "erszsu", "enobqysbeespqbvv", "intz", - "zsautbricvvofe")) - .withProperties(mapOf("nowi", "yyqxckdlxjpisr", "xfiiytqxewjsyute", "cbesfvijnu", "k", "lghkvoxdpor")) - .withIsArchived(false) - .withIsAnonymous(true) - .withComponentSpec("dataabzfihsz")) - .create(); - - Assertions.assertEquals("hfrvsi", response.properties().description()); - Assertions.assertEquals("gnpcjnia", response.properties().tags().get("f")); - Assertions.assertEquals("q", response.properties().properties().get("cnbgibklscwdko")); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteWithResponseMockTests.java deleted file mode 100644 index 06b7e2dbc87e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComponentVersionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.componentVersions() - .deleteWithResponse("cbzvvxd", "phxmwwvxcaicb", "cbogsfovk", "amiyfgunrukcyyaa", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetWithResponseMockTests.java deleted file mode 100644 index d404827f765c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComponentVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"componentSpec\":\"datauwj\",\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"llavz\",\"tags\":{\"apqra\":\"gmrodb\",\"tniwfcu\":\"z\"},\"properties\":{\"ceg\":\"xmyibx\",\"xb\":\"ttgxkxt\"}},\"id\":\"beyqohvi\",\"name\":\"wpjfkra\",\"type\":\"er\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComponentVersion response = manager.componentVersions() - .getWithResponse("bkubzqazdlrkvi", "zkifqbxmnnid", "tmpumzuhoo", "ttqhpvaru", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("llavz", response.properties().description()); - Assertions.assertEquals("gmrodb", response.properties().tags().get("apqra")); - Assertions.assertEquals("xmyibx", response.properties().properties().get("ceg")); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListMockTests.java deleted file mode 100644 index 384a1043cc8c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComponentVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"componentSpec\":\"datadbobmolj\",\"provisioningState\":\"Creating\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"ih\",\"tags\":{\"pdj\":\"quajpo\",\"raxhntoiwfszkr\":\"yotg\",\"etsluqfgk\":\"kosjwr\",\"imioixviobuwbnge\":\"d\"},\"properties\":{\"ggnqxn\":\"dqngqamhb\"}},\"id\":\"qzaffzqodokst\",\"name\":\"vomdqxnoyzqipapi\",\"type\":\"ccydbjghunqnttrw\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.componentVersions() - .list("aveuxgmigs", "ebdltniui", "merf", "hgvcy", 275303341, "doeilhggaj", ListViewType.ARCHIVED_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ih", response.iterator().next().properties().description()); - Assertions.assertEquals("quajpo", response.iterator().next().properties().tags().get("pdj")); - Assertions.assertEquals("dqngqamhb", response.iterator().next().properties().properties().get("ggnqxn")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(false, response.iterator().next().properties().isAnonymous()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishMockTests.java deleted file mode 100644 index 32d63e978027..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComponentVersionsPublishMockTests { - @Test - public void testPublish() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.componentVersions() - .publish("lgbvtpxowgoww", "ocjasuame", "jkfiszhexumfav", "esloblit", - new DestinationAsset().withRegistryName("rsjscos") - .withDestinationName("js") - .withDestinationVersion("trztogujg"), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceApplicationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceApplicationTests.java deleted file mode 100644 index 88cd60af6f45..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceApplicationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceApplication; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceApplicationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceApplication model - = BinaryData.fromString("{\"displayName\":\"lfr\",\"endpointUri\":\"qownkiuajewnahw\"}") - .toObject(ComputeInstanceApplication.class); - Assertions.assertEquals("lfr", model.displayName()); - Assertions.assertEquals("qownkiuajewnahw", model.endpointUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceApplication model - = new ComputeInstanceApplication().withDisplayName("lfr").withEndpointUri("qownkiuajewnahw"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceApplication.class); - Assertions.assertEquals("lfr", model.displayName()); - Assertions.assertEquals("qownkiuajewnahw", model.endpointUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceConnectivityEndpointsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceConnectivityEndpointsTests.java deleted file mode 100644 index 6fecaec00c4f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceConnectivityEndpointsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceConnectivityEndpoints; - -public final class ComputeInstanceConnectivityEndpointsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceConnectivityEndpoints model - = BinaryData.fromString("{\"publicIpAddress\":\"ffbbcngkegxcypxb\",\"privateIpAddress\":\"etwilyrzoxpd\"}") - .toObject(ComputeInstanceConnectivityEndpoints.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceConnectivityEndpoints model = new ComputeInstanceConnectivityEndpoints(); - model = BinaryData.fromObject(model).toObject(ComputeInstanceConnectivityEndpoints.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceContainerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceContainerTests.java deleted file mode 100644 index e9f6249c2122..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceContainerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Autosave; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceContainer; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceEnvironmentInfo; -import com.azure.resourcemanager.machinelearning.models.Network; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceContainerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceContainer model = BinaryData.fromString( - "{\"name\":\"fxlapjajodmkrrw\",\"autosave\":\"Remote\",\"gpu\":\"vqokql\",\"network\":\"Bridge\",\"environment\":{\"name\":\"rabwlyvxc\",\"version\":\"qvctsfa\"},\"services\":[\"datawwsknstvzu\",\"datahasupmlppdpgzvz\"]}") - .toObject(ComputeInstanceContainer.class); - Assertions.assertEquals("fxlapjajodmkrrw", model.name()); - Assertions.assertEquals(Autosave.REMOTE, model.autosave()); - Assertions.assertEquals("vqokql", model.gpu()); - Assertions.assertEquals(Network.BRIDGE, model.network()); - Assertions.assertEquals("rabwlyvxc", model.environment().name()); - Assertions.assertEquals("qvctsfa", model.environment().version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceContainer model = new ComputeInstanceContainer().withName("fxlapjajodmkrrw") - .withAutosave(Autosave.REMOTE) - .withGpu("vqokql") - .withNetwork(Network.BRIDGE) - .withEnvironment(new ComputeInstanceEnvironmentInfo().withName("rabwlyvxc").withVersion("qvctsfa")); - model = BinaryData.fromObject(model).toObject(ComputeInstanceContainer.class); - Assertions.assertEquals("fxlapjajodmkrrw", model.name()); - Assertions.assertEquals(Autosave.REMOTE, model.autosave()); - Assertions.assertEquals("vqokql", model.gpu()); - Assertions.assertEquals(Network.BRIDGE, model.network()); - Assertions.assertEquals("rabwlyvxc", model.environment().name()); - Assertions.assertEquals("qvctsfa", model.environment().version()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceCreatedByTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceCreatedByTests.java deleted file mode 100644 index 34b3ab67cdef..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceCreatedByTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceCreatedBy; - -public final class ComputeInstanceCreatedByTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceCreatedBy model = BinaryData - .fromString("{\"userName\":\"jjmztnlmsoodtmv\",\"userOrgId\":\"dhdyswcrptveaj\",\"userId\":\"xvl\"}") - .toObject(ComputeInstanceCreatedBy.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceCreatedBy model = new ComputeInstanceCreatedBy(); - model = BinaryData.fromObject(model).toObject(ComputeInstanceCreatedBy.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataDiskTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataDiskTests.java deleted file mode 100644 index da87b2d1e824..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataDiskTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Caching; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataDisk; -import com.azure.resourcemanager.machinelearning.models.StorageAccountType; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceDataDiskTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceDataDisk model = BinaryData.fromString( - "{\"caching\":\"ReadOnly\",\"diskSizeGB\":1600644874,\"lun\":1444787709,\"storageAccountType\":\"Premium_LRS\"}") - .toObject(ComputeInstanceDataDisk.class); - Assertions.assertEquals(Caching.READ_ONLY, model.caching()); - Assertions.assertEquals(1600644874, model.diskSizeGB()); - Assertions.assertEquals(1444787709, model.lun()); - Assertions.assertEquals(StorageAccountType.PREMIUM_LRS, model.storageAccountType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceDataDisk model = new ComputeInstanceDataDisk().withCaching(Caching.READ_ONLY) - .withDiskSizeGB(1600644874) - .withLun(1444787709) - .withStorageAccountType(StorageAccountType.PREMIUM_LRS); - model = BinaryData.fromObject(model).toObject(ComputeInstanceDataDisk.class); - Assertions.assertEquals(Caching.READ_ONLY, model.caching()); - Assertions.assertEquals(1600644874, model.diskSizeGB()); - Assertions.assertEquals(1444787709, model.lun()); - Assertions.assertEquals(StorageAccountType.PREMIUM_LRS, model.storageAccountType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataMountTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataMountTests.java deleted file mode 100644 index 300dbdc5f622..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataMountTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount; -import com.azure.resourcemanager.machinelearning.models.MountAction; -import com.azure.resourcemanager.machinelearning.models.MountState; -import com.azure.resourcemanager.machinelearning.models.SourceType; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceDataMountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceDataMount model = BinaryData.fromString( - "{\"source\":\"y\",\"sourceType\":\"Datastore\",\"mountName\":\"enigbe\",\"mountAction\":\"Unmount\",\"createdBy\":\"ba\",\"mountPath\":\"jdeayscse\",\"mountState\":\"Unmounted\",\"mountedOn\":\"2021-06-04T19:11:23Z\",\"error\":\"exmnv\"}") - .toObject(ComputeInstanceDataMount.class); - Assertions.assertEquals("y", model.source()); - Assertions.assertEquals(SourceType.DATASTORE, model.sourceType()); - Assertions.assertEquals("enigbe", model.mountName()); - Assertions.assertEquals(MountAction.UNMOUNT, model.mountAction()); - Assertions.assertEquals("ba", model.createdBy()); - Assertions.assertEquals("jdeayscse", model.mountPath()); - Assertions.assertEquals(MountState.UNMOUNTED, model.mountState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-04T19:11:23Z"), model.mountedOn()); - Assertions.assertEquals("exmnv", model.error()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceDataMount model = new ComputeInstanceDataMount().withSource("y") - .withSourceType(SourceType.DATASTORE) - .withMountName("enigbe") - .withMountAction(MountAction.UNMOUNT) - .withCreatedBy("ba") - .withMountPath("jdeayscse") - .withMountState(MountState.UNMOUNTED) - .withMountedOn(OffsetDateTime.parse("2021-06-04T19:11:23Z")) - .withError("exmnv"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceDataMount.class); - Assertions.assertEquals("y", model.source()); - Assertions.assertEquals(SourceType.DATASTORE, model.sourceType()); - Assertions.assertEquals("enigbe", model.mountName()); - Assertions.assertEquals(MountAction.UNMOUNT, model.mountAction()); - Assertions.assertEquals("ba", model.createdBy()); - Assertions.assertEquals("jdeayscse", model.mountPath()); - Assertions.assertEquals(MountState.UNMOUNTED, model.mountState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-04T19:11:23Z"), model.mountedOn()); - Assertions.assertEquals("exmnv", model.error()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceEnvironmentInfoTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceEnvironmentInfoTests.java deleted file mode 100644 index afbd83807f60..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceEnvironmentInfoTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceEnvironmentInfo; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceEnvironmentInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceEnvironmentInfo model = BinaryData.fromString("{\"name\":\"z\",\"version\":\"karkptg\"}") - .toObject(ComputeInstanceEnvironmentInfo.class); - Assertions.assertEquals("z", model.name()); - Assertions.assertEquals("karkptg", model.version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceEnvironmentInfo model - = new ComputeInstanceEnvironmentInfo().withName("z").withVersion("karkptg"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceEnvironmentInfo.class); - Assertions.assertEquals("z", model.name()); - Assertions.assertEquals("karkptg", model.version()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceLastOperationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceLastOperationTests.java deleted file mode 100644 index 93264639a73e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceLastOperationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceLastOperation; -import com.azure.resourcemanager.machinelearning.models.OperationName; -import com.azure.resourcemanager.machinelearning.models.OperationStatus; -import com.azure.resourcemanager.machinelearning.models.OperationTrigger; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceLastOperationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceLastOperation model = BinaryData.fromString( - "{\"operationName\":\"Restart\",\"operationTime\":\"2021-12-02T04:09:17Z\",\"operationStatus\":\"StartFailed\",\"operationTrigger\":\"IdleShutdown\"}") - .toObject(ComputeInstanceLastOperation.class); - Assertions.assertEquals(OperationName.RESTART, model.operationName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-02T04:09:17Z"), model.operationTime()); - Assertions.assertEquals(OperationStatus.START_FAILED, model.operationStatus()); - Assertions.assertEquals(OperationTrigger.IDLE_SHUTDOWN, model.operationTrigger()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceLastOperation model = new ComputeInstanceLastOperation().withOperationName(OperationName.RESTART) - .withOperationTime(OffsetDateTime.parse("2021-12-02T04:09:17Z")) - .withOperationStatus(OperationStatus.START_FAILED) - .withOperationTrigger(OperationTrigger.IDLE_SHUTDOWN); - model = BinaryData.fromObject(model).toObject(ComputeInstanceLastOperation.class); - Assertions.assertEquals(OperationName.RESTART, model.operationName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-02T04:09:17Z"), model.operationTime()); - Assertions.assertEquals(OperationStatus.START_FAILED, model.operationStatus()); - Assertions.assertEquals(OperationTrigger.IDLE_SHUTDOWN, model.operationTrigger()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceVersionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceVersionTests.java deleted file mode 100644 index d5ca3c74d4d7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceVersionTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceVersion; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceVersionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceVersion model - = BinaryData.fromString("{\"runtime\":\"muwrx\"}").toObject(ComputeInstanceVersion.class); - Assertions.assertEquals("muwrx", model.runtime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceVersion model = new ComputeInstanceVersion().withRuntime("muwrx"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceVersion.class); - Assertions.assertEquals("muwrx", model.runtime()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRecurrenceScheduleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRecurrenceScheduleTests.java deleted file mode 100644 index 152c29212161..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRecurrenceScheduleTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.ComputeWeekDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ComputeRecurrenceScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeRecurrenceSchedule model = BinaryData.fromString( - "{\"hours\":[753616806,1022299740,1887588693],\"minutes\":[746933234,1500436017,185352211],\"monthDays\":[469087656,551431025,1504133018],\"weekDays\":[\"Thursday\",\"Wednesday\",\"Tuesday\",\"Sunday\"]}") - .toObject(ComputeRecurrenceSchedule.class); - Assertions.assertEquals(753616806, model.hours().get(0)); - Assertions.assertEquals(746933234, model.minutes().get(0)); - Assertions.assertEquals(469087656, model.monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.THURSDAY, model.weekDays().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeRecurrenceSchedule model - = new ComputeRecurrenceSchedule().withHours(Arrays.asList(753616806, 1022299740, 1887588693)) - .withMinutes(Arrays.asList(746933234, 1500436017, 185352211)) - .withMonthDays(Arrays.asList(469087656, 551431025, 1504133018)) - .withWeekDays(Arrays.asList(ComputeWeekDay.THURSDAY, ComputeWeekDay.WEDNESDAY, ComputeWeekDay.TUESDAY, - ComputeWeekDay.SUNDAY)); - model = BinaryData.fromObject(model).toObject(ComputeRecurrenceSchedule.class); - Assertions.assertEquals(753616806, model.hours().get(0)); - Assertions.assertEquals(746933234, model.minutes().get(0)); - Assertions.assertEquals(469087656, model.monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.THURSDAY, model.weekDays().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRuntimeDtoTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRuntimeDtoTests.java deleted file mode 100644 index e59180a70319..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRuntimeDtoTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeRuntimeDto; -import org.junit.jupiter.api.Assertions; - -public final class ComputeRuntimeDtoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeRuntimeDto model - = BinaryData.fromString("{\"sparkRuntimeVersion\":\"mglougpbkw\"}").toObject(ComputeRuntimeDto.class); - Assertions.assertEquals("mglougpbkw", model.sparkRuntimeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeRuntimeDto model = new ComputeRuntimeDto().withSparkRuntimeVersion("mglougpbkw"); - model = BinaryData.fromObject(model).toObject(ComputeRuntimeDto.class); - Assertions.assertEquals("mglougpbkw", model.sparkRuntimeVersion()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSchedulesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSchedulesTests.java deleted file mode 100644 index a29d67f4bc1b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSchedulesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputePowerAction; -import com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.ComputeSchedules; -import com.azure.resourcemanager.machinelearning.models.ComputeStartStopSchedule; -import com.azure.resourcemanager.machinelearning.models.ComputeTriggerType; -import com.azure.resourcemanager.machinelearning.models.ComputeWeekDay; -import com.azure.resourcemanager.machinelearning.models.Cron; -import com.azure.resourcemanager.machinelearning.models.Recurrence; -import com.azure.resourcemanager.machinelearning.models.ScheduleBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningState; -import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ComputeSchedulesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeSchedules model = BinaryData.fromString( - "{\"computeStartStop\":[{\"id\":\"g\",\"provisioningStatus\":\"Failed\",\"status\":\"Enabled\",\"action\":\"Stop\",\"triggerType\":\"Cron\",\"recurrence\":{\"frequency\":\"Month\",\"interval\":49803923,\"startTime\":\"bjmlreesrfwssz\",\"timeZone\":\"cwlisolntfxxcrqm\",\"schedule\":{\"hours\":[351599598,690611810,1156649488,1996694399],\"minutes\":[1847045848,246360701,778853988],\"monthDays\":[1390318472],\"weekDays\":[\"Tuesday\",\"Saturday\"]}},\"cron\":{\"startTime\":\"abuln\",\"timeZone\":\"skjto\",\"expression\":\"dzjs\"},\"schedule\":{\"id\":\"vhxqqmqipaydhfnz\",\"provisioningStatus\":\"Failed\",\"status\":\"Disabled\"}},{\"id\":\"shksny\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Disabled\",\"action\":\"Stop\",\"triggerType\":\"Recurrence\",\"recurrence\":{\"frequency\":\"Minute\",\"interval\":976329767,\"startTime\":\"cefiqdkt\",\"timeZone\":\"kvi\",\"schedule\":{\"hours\":[1629072439,2029515706],\"minutes\":[1835241061,776692976],\"monthDays\":[1239574934,1328728868,2058931853],\"weekDays\":[\"Friday\",\"Tuesday\"]}},\"cron\":{\"startTime\":\"dpcmhjh\",\"timeZone\":\"sybkekymffzt\",\"expression\":\"lscvqsyeiihf\"},\"schedule\":{\"id\":\"ouihy\",\"provisioningStatus\":\"Completed\",\"status\":\"Enabled\"}}]}") - .toObject(ComputeSchedules.class); - Assertions.assertEquals(ScheduleStatus.ENABLED, model.computeStartStop().get(0).status()); - Assertions.assertEquals(ComputePowerAction.STOP, model.computeStartStop().get(0).action()); - Assertions.assertEquals(ComputeTriggerType.CRON, model.computeStartStop().get(0).triggerType()); - Assertions.assertEquals(ComputeRecurrenceFrequency.MONTH, - model.computeStartStop().get(0).recurrence().frequency()); - Assertions.assertEquals(49803923, model.computeStartStop().get(0).recurrence().interval()); - Assertions.assertEquals("bjmlreesrfwssz", model.computeStartStop().get(0).recurrence().startTime()); - Assertions.assertEquals("cwlisolntfxxcrqm", model.computeStartStop().get(0).recurrence().timeZone()); - Assertions.assertEquals(351599598, model.computeStartStop().get(0).recurrence().schedule().hours().get(0)); - Assertions.assertEquals(1847045848, model.computeStartStop().get(0).recurrence().schedule().minutes().get(0)); - Assertions.assertEquals(1390318472, model.computeStartStop().get(0).recurrence().schedule().monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.TUESDAY, - model.computeStartStop().get(0).recurrence().schedule().weekDays().get(0)); - Assertions.assertEquals("abuln", model.computeStartStop().get(0).cron().startTime()); - Assertions.assertEquals("skjto", model.computeStartStop().get(0).cron().timeZone()); - Assertions.assertEquals("dzjs", model.computeStartStop().get(0).cron().expression()); - Assertions.assertEquals("vhxqqmqipaydhfnz", model.computeStartStop().get(0).schedule().id()); - Assertions.assertEquals(ScheduleProvisioningState.FAILED, - model.computeStartStop().get(0).schedule().provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.computeStartStop().get(0).schedule().status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeSchedules model = new ComputeSchedules().withComputeStartStop(Arrays.asList( - new ComputeStartStopSchedule().withStatus(ScheduleStatus.ENABLED) - .withAction(ComputePowerAction.STOP) - .withTriggerType(ComputeTriggerType.CRON) - .withRecurrence(new Recurrence().withFrequency(ComputeRecurrenceFrequency.MONTH) - .withInterval(49803923) - .withStartTime("bjmlreesrfwssz") - .withTimeZone("cwlisolntfxxcrqm") - .withSchedule(new ComputeRecurrenceSchedule() - .withHours(Arrays.asList(351599598, 690611810, 1156649488, 1996694399)) - .withMinutes(Arrays.asList(1847045848, 246360701, 778853988)) - .withMonthDays(Arrays.asList(1390318472)) - .withWeekDays(Arrays.asList(ComputeWeekDay.TUESDAY, ComputeWeekDay.SATURDAY)))) - .withCron(new Cron().withStartTime("abuln").withTimeZone("skjto").withExpression("dzjs")) - .withSchedule(new ScheduleBase().withId("vhxqqmqipaydhfnz") - .withProvisioningStatus(ScheduleProvisioningState.FAILED) - .withStatus(ScheduleStatus.DISABLED)), - new ComputeStartStopSchedule().withStatus(ScheduleStatus.DISABLED) - .withAction(ComputePowerAction.STOP) - .withTriggerType(ComputeTriggerType.RECURRENCE) - .withRecurrence(new Recurrence().withFrequency(ComputeRecurrenceFrequency.MINUTE) - .withInterval(976329767) - .withStartTime("cefiqdkt") - .withTimeZone("kvi") - .withSchedule(new ComputeRecurrenceSchedule().withHours(Arrays.asList(1629072439, 2029515706)) - .withMinutes(Arrays.asList(1835241061, 776692976)) - .withMonthDays(Arrays.asList(1239574934, 1328728868, 2058931853)) - .withWeekDays(Arrays.asList(ComputeWeekDay.FRIDAY, ComputeWeekDay.TUESDAY)))) - .withCron( - new Cron().withStartTime("dpcmhjh").withTimeZone("sybkekymffzt").withExpression("lscvqsyeiihf")) - .withSchedule(new ScheduleBase().withId("ouihy") - .withProvisioningStatus(ScheduleProvisioningState.COMPLETED) - .withStatus(ScheduleStatus.ENABLED)))); - model = BinaryData.fromObject(model).toObject(ComputeSchedules.class); - Assertions.assertEquals(ScheduleStatus.ENABLED, model.computeStartStop().get(0).status()); - Assertions.assertEquals(ComputePowerAction.STOP, model.computeStartStop().get(0).action()); - Assertions.assertEquals(ComputeTriggerType.CRON, model.computeStartStop().get(0).triggerType()); - Assertions.assertEquals(ComputeRecurrenceFrequency.MONTH, - model.computeStartStop().get(0).recurrence().frequency()); - Assertions.assertEquals(49803923, model.computeStartStop().get(0).recurrence().interval()); - Assertions.assertEquals("bjmlreesrfwssz", model.computeStartStop().get(0).recurrence().startTime()); - Assertions.assertEquals("cwlisolntfxxcrqm", model.computeStartStop().get(0).recurrence().timeZone()); - Assertions.assertEquals(351599598, model.computeStartStop().get(0).recurrence().schedule().hours().get(0)); - Assertions.assertEquals(1847045848, model.computeStartStop().get(0).recurrence().schedule().minutes().get(0)); - Assertions.assertEquals(1390318472, model.computeStartStop().get(0).recurrence().schedule().monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.TUESDAY, - model.computeStartStop().get(0).recurrence().schedule().weekDays().get(0)); - Assertions.assertEquals("abuln", model.computeStartStop().get(0).cron().startTime()); - Assertions.assertEquals("skjto", model.computeStartStop().get(0).cron().timeZone()); - Assertions.assertEquals("dzjs", model.computeStartStop().get(0).cron().expression()); - Assertions.assertEquals("vhxqqmqipaydhfnz", model.computeStartStop().get(0).schedule().id()); - Assertions.assertEquals(ScheduleProvisioningState.FAILED, - model.computeStartStop().get(0).schedule().provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.computeStartStop().get(0).schedule().status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSecretsInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSecretsInnerTests.java deleted file mode 100644 index d832eb8be01f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSecretsInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; - -public final class ComputeSecretsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeSecretsInner model - = BinaryData.fromString("{\"computeType\":\"ComputeSecrets\"}").toObject(ComputeSecretsInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeSecretsInner model = new ComputeSecretsInner(); - model = BinaryData.fromObject(model).toObject(ComputeSecretsInner.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartStopScheduleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartStopScheduleTests.java deleted file mode 100644 index 3b54e09c0493..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartStopScheduleTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputePowerAction; -import com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.ComputeStartStopSchedule; -import com.azure.resourcemanager.machinelearning.models.ComputeTriggerType; -import com.azure.resourcemanager.machinelearning.models.ComputeWeekDay; -import com.azure.resourcemanager.machinelearning.models.Cron; -import com.azure.resourcemanager.machinelearning.models.Recurrence; -import com.azure.resourcemanager.machinelearning.models.ScheduleBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningState; -import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ComputeStartStopScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeStartStopSchedule model = BinaryData.fromString( - "{\"id\":\"cigzhogsmgbv\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Disabled\",\"action\":\"Start\",\"triggerType\":\"Recurrence\",\"recurrence\":{\"frequency\":\"Month\",\"interval\":2023900183,\"startTime\":\"labt\",\"timeZone\":\"biwznhtfgficudy\",\"schedule\":{\"hours\":[1642375695,1415375083],\"minutes\":[1908555069,674933767],\"monthDays\":[1444212135,2050942222,1385585116,1561771824],\"weekDays\":[\"Thursday\",\"Saturday\"]}},\"cron\":{\"startTime\":\"oitwhrjsdmmazdnc\",\"timeZone\":\"dbjp\",\"expression\":\"hzqpxzbawkikcdgf\"},\"schedule\":{\"id\":\"sd\",\"provisioningStatus\":\"Completed\",\"status\":\"Enabled\"}}") - .toObject(ComputeStartStopSchedule.class); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.status()); - Assertions.assertEquals(ComputePowerAction.START, model.action()); - Assertions.assertEquals(ComputeTriggerType.RECURRENCE, model.triggerType()); - Assertions.assertEquals(ComputeRecurrenceFrequency.MONTH, model.recurrence().frequency()); - Assertions.assertEquals(2023900183, model.recurrence().interval()); - Assertions.assertEquals("labt", model.recurrence().startTime()); - Assertions.assertEquals("biwznhtfgficudy", model.recurrence().timeZone()); - Assertions.assertEquals(1642375695, model.recurrence().schedule().hours().get(0)); - Assertions.assertEquals(1908555069, model.recurrence().schedule().minutes().get(0)); - Assertions.assertEquals(1444212135, model.recurrence().schedule().monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.THURSDAY, model.recurrence().schedule().weekDays().get(0)); - Assertions.assertEquals("oitwhrjsdmmazdnc", model.cron().startTime()); - Assertions.assertEquals("dbjp", model.cron().timeZone()); - Assertions.assertEquals("hzqpxzbawkikcdgf", model.cron().expression()); - Assertions.assertEquals("sd", model.schedule().id()); - Assertions.assertEquals(ScheduleProvisioningState.COMPLETED, model.schedule().provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.ENABLED, model.schedule().status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeStartStopSchedule model = new ComputeStartStopSchedule().withStatus(ScheduleStatus.DISABLED) - .withAction(ComputePowerAction.START) - .withTriggerType(ComputeTriggerType.RECURRENCE) - .withRecurrence(new Recurrence().withFrequency(ComputeRecurrenceFrequency.MONTH) - .withInterval(2023900183) - .withStartTime("labt") - .withTimeZone("biwznhtfgficudy") - .withSchedule(new ComputeRecurrenceSchedule().withHours(Arrays.asList(1642375695, 1415375083)) - .withMinutes(Arrays.asList(1908555069, 674933767)) - .withMonthDays(Arrays.asList(1444212135, 2050942222, 1385585116, 1561771824)) - .withWeekDays(Arrays.asList(ComputeWeekDay.THURSDAY, ComputeWeekDay.SATURDAY)))) - .withCron( - new Cron().withStartTime("oitwhrjsdmmazdnc").withTimeZone("dbjp").withExpression("hzqpxzbawkikcdgf")) - .withSchedule(new ScheduleBase().withId("sd") - .withProvisioningStatus(ScheduleProvisioningState.COMPLETED) - .withStatus(ScheduleStatus.ENABLED)); - model = BinaryData.fromObject(model).toObject(ComputeStartStopSchedule.class); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.status()); - Assertions.assertEquals(ComputePowerAction.START, model.action()); - Assertions.assertEquals(ComputeTriggerType.RECURRENCE, model.triggerType()); - Assertions.assertEquals(ComputeRecurrenceFrequency.MONTH, model.recurrence().frequency()); - Assertions.assertEquals(2023900183, model.recurrence().interval()); - Assertions.assertEquals("labt", model.recurrence().startTime()); - Assertions.assertEquals("biwznhtfgficudy", model.recurrence().timeZone()); - Assertions.assertEquals(1642375695, model.recurrence().schedule().hours().get(0)); - Assertions.assertEquals(1908555069, model.recurrence().schedule().minutes().get(0)); - Assertions.assertEquals(1444212135, model.recurrence().schedule().monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.THURSDAY, model.recurrence().schedule().weekDays().get(0)); - Assertions.assertEquals("oitwhrjsdmmazdnc", model.cron().startTime()); - Assertions.assertEquals("dbjp", model.cron().timeZone()); - Assertions.assertEquals("hzqpxzbawkikcdgf", model.cron().expression()); - Assertions.assertEquals("sd", model.schedule().id()); - Assertions.assertEquals(ScheduleProvisioningState.COMPLETED, model.schedule().provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.ENABLED, model.schedule().status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesDeleteMockTests.java deleted file mode 100644 index 7581562d2202..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComputesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.computes() - .delete("fdfupktwp", "pse", "ivytabvbbkflewg", UnderlyingResourceAction.DETACH, - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListKeysWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListKeysWithResponseMockTests.java deleted file mode 100644 index 149a42d60265..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListKeysWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComputeSecrets; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComputesListKeysWithResponseMockTests { - @Test - public void testListKeysWithResponse() throws Exception { - String responseStr = "{\"computeType\":\"ComputeSecrets\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComputeSecrets response = manager.computes() - .listKeysWithResponse("aqlmihnmtrdlpxi", "wgecpvfpnrzikvo", "loeohy", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListNodesMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListNodesMockTests.java deleted file mode 100644 index 629c9a659078..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListNodesMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComputesListNodesMockTests { - @Test - public void testListNodes() throws Exception { - String responseStr - = "{\"nodes\":[{\"nodeId\":\"ekkbnj\",\"privateIpAddress\":\"vmptedeue\",\"publicIpAddress\":\"hshnfiygpg\",\"port\":316442953,\"nodeState\":\"unusable\",\"runId\":\"ng\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.computes().listNodes("tutbuvedwuu", "bmenxcqs", "wclykcr", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceRequirementsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceRequirementsTests.java deleted file mode 100644 index 418bbed71361..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceRequirementsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ContainerResourceRequirements; -import com.azure.resourcemanager.machinelearning.models.ContainerResourceSettings; -import org.junit.jupiter.api.Assertions; - -public final class ContainerResourceRequirementsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerResourceRequirements model = BinaryData.fromString( - "{\"containerResourceRequests\":{\"cpu\":\"cnxtpzdlysei\",\"memory\":\"oa\",\"gpu\":\"t\"},\"containerResourceLimits\":{\"cpu\":\"tgrhz\",\"memory\":\"fdpfawrptvcsht\",\"gpu\":\"tzc\"}}") - .toObject(ContainerResourceRequirements.class); - Assertions.assertEquals("cnxtpzdlysei", model.containerResourceRequests().cpu()); - Assertions.assertEquals("oa", model.containerResourceRequests().memory()); - Assertions.assertEquals("t", model.containerResourceRequests().gpu()); - Assertions.assertEquals("tgrhz", model.containerResourceLimits().cpu()); - Assertions.assertEquals("fdpfawrptvcsht", model.containerResourceLimits().memory()); - Assertions.assertEquals("tzc", model.containerResourceLimits().gpu()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerResourceRequirements model = new ContainerResourceRequirements() - .withContainerResourceRequests( - new ContainerResourceSettings().withCpu("cnxtpzdlysei").withMemory("oa").withGpu("t")) - .withContainerResourceLimits( - new ContainerResourceSettings().withCpu("tgrhz").withMemory("fdpfawrptvcsht").withGpu("tzc")); - model = BinaryData.fromObject(model).toObject(ContainerResourceRequirements.class); - Assertions.assertEquals("cnxtpzdlysei", model.containerResourceRequests().cpu()); - Assertions.assertEquals("oa", model.containerResourceRequests().memory()); - Assertions.assertEquals("t", model.containerResourceRequests().gpu()); - Assertions.assertEquals("tgrhz", model.containerResourceLimits().cpu()); - Assertions.assertEquals("fdpfawrptvcsht", model.containerResourceLimits().memory()); - Assertions.assertEquals("tzc", model.containerResourceLimits().gpu()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceSettingsTests.java deleted file mode 100644 index cba58d928766..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ContainerResourceSettings; -import org.junit.jupiter.api.Assertions; - -public final class ContainerResourceSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerResourceSettings model - = BinaryData.fromString("{\"cpu\":\"bqgdird\",\"memory\":\"m\",\"gpu\":\"jgcf\"}") - .toObject(ContainerResourceSettings.class); - Assertions.assertEquals("bqgdird", model.cpu()); - Assertions.assertEquals("m", model.memory()); - Assertions.assertEquals("jgcf", model.gpu()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerResourceSettings model - = new ContainerResourceSettings().withCpu("bqgdird").withMemory("m").withGpu("jgcf"); - model = BinaryData.fromObject(model).toObject(ContainerResourceSettings.class); - Assertions.assertEquals("bqgdird", model.cpu()); - Assertions.assertEquals("m", model.memory()); - Assertions.assertEquals("jgcf", model.gpu()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyTests.java deleted file mode 100644 index 568c289a2b81..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ContentSafety; -import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; -import org.junit.jupiter.api.Assertions; - -public final class ContentSafetyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContentSafety model - = BinaryData.fromString("{\"contentSafetyStatus\":\"Enabled\"}").toObject(ContentSafety.class); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.contentSafetyStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContentSafety model = new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED); - model = BinaryData.fromObject(model).toObject(ContentSafety.class); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.contentSafetyStatus()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CosmosDbSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CosmosDbSettingsTests.java deleted file mode 100644 index 4e62864f0203..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CosmosDbSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CosmosDbSettings; -import org.junit.jupiter.api.Assertions; - -public final class CosmosDbSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CosmosDbSettings model - = BinaryData.fromString("{\"collectionsThroughput\":1838469652}").toObject(CosmosDbSettings.class); - Assertions.assertEquals(1838469652, model.collectionsThroughput()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CosmosDbSettings model = new CosmosDbSettings().withCollectionsThroughput(1838469652); - model = BinaryData.fromObject(model).toObject(CosmosDbSettings.class); - Assertions.assertEquals(1838469652, model.collectionsThroughput()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CreateMonitorActionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CreateMonitorActionTests.java deleted file mode 100644 index 8c804e523b6f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CreateMonitorActionTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CreateMonitorAction; -import com.azure.resourcemanager.machinelearning.models.ModelTaskType; -import com.azure.resourcemanager.machinelearning.models.MonitorComputeConfigurationBase; -import com.azure.resourcemanager.machinelearning.models.MonitorDefinition; -import com.azure.resourcemanager.machinelearning.models.MonitorEmailNotificationSettings; -import com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType; -import com.azure.resourcemanager.machinelearning.models.MonitoringSignalBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringTarget; -import com.azure.resourcemanager.machinelearning.models.MonitorNotificationSettings; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CreateMonitorActionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateMonitorAction model = BinaryData.fromString( - "{\"actionType\":\"CreateMonitor\",\"monitorDefinition\":{\"monitoringTarget\":{\"modelId\":\"tbwjjirmuydgftt\",\"deploymentId\":\"ofgeoagf\",\"taskType\":\"Regression\"},\"signals\":{\"gsevmdm\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"g\":\"dajwi\"}},\"ssgpgvo\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"ljdncidtjvamy\":\"gfc\",\"to\":\"znmrgcdogcvucg\",\"szp\":\"uwhttnzqsaqmeb\",\"z\":\"usdekpd\"}},\"dofuckclb\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"wztlvvwsnmrkky\":\"qzsquny\",\"wfkcauxuvavcpf\":\"trepw\"}},\"xydgtokvqbvwg\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"fsqebuuxjxhfxf\":\"zwilfngo\",\"wgzzxljb\":\"wpdkktpmbmxbmb\",\"jf\":\"hxsdplaumydmhwe\"}}},\"computeConfiguration\":{\"computeType\":\"MonitorComputeConfigurationBase\"},\"alertNotificationSettings\":{\"emailNotificationSettings\":{\"emails\":[\"vxakglh\",\"ses\",\"fga\",\"qiy\"]}}}}") - .toObject(CreateMonitorAction.class); - Assertions.assertEquals("tbwjjirmuydgftt", model.monitorDefinition().monitoringTarget().modelId()); - Assertions.assertEquals("ofgeoagf", model.monitorDefinition().monitoringTarget().deploymentId()); - Assertions.assertEquals(ModelTaskType.REGRESSION, model.monitorDefinition().monitoringTarget().taskType()); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, - model.monitorDefinition().signals().get("gsevmdm").notificationTypes().get(0)); - Assertions.assertEquals("dajwi", model.monitorDefinition().signals().get("gsevmdm").properties().get("g")); - Assertions.assertEquals("vxakglh", - model.monitorDefinition().alertNotificationSettings().emailNotificationSettings().emails().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateMonitorAction model = new CreateMonitorAction().withMonitorDefinition(new MonitorDefinition() - .withMonitoringTarget(new MonitoringTarget().withModelId("tbwjjirmuydgftt") - .withDeploymentId("ofgeoagf") - .withTaskType(ModelTaskType.REGRESSION)) - .withSignals(mapOf("gsevmdm", - new MonitoringSignalBase() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("g", "dajwi")), - "ssgpgvo", - new MonitoringSignalBase() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties( - mapOf("ljdncidtjvamy", "gfc", "to", "znmrgcdogcvucg", "szp", "uwhttnzqsaqmeb", "z", "usdekpd")), - "dofuckclb", - new MonitoringSignalBase() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("wztlvvwsnmrkky", "qzsquny", "wfkcauxuvavcpf", "trepw")), - "xydgtokvqbvwg", - new MonitoringSignalBase() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties( - mapOf("fsqebuuxjxhfxf", "zwilfngo", "wgzzxljb", "wpdkktpmbmxbmb", "jf", "hxsdplaumydmhwe")))) - .withComputeConfiguration(new MonitorComputeConfigurationBase()) - .withAlertNotificationSettings(new MonitorNotificationSettings().withEmailNotificationSettings( - new MonitorEmailNotificationSettings().withEmails(Arrays.asList("vxakglh", "ses", "fga", "qiy"))))); - model = BinaryData.fromObject(model).toObject(CreateMonitorAction.class); - Assertions.assertEquals("tbwjjirmuydgftt", model.monitorDefinition().monitoringTarget().modelId()); - Assertions.assertEquals("ofgeoagf", model.monitorDefinition().monitoringTarget().deploymentId()); - Assertions.assertEquals(ModelTaskType.REGRESSION, model.monitorDefinition().monitoringTarget().taskType()); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, - model.monitorDefinition().signals().get("gsevmdm").notificationTypes().get(0)); - Assertions.assertEquals("dajwi", model.monitorDefinition().signals().get("gsevmdm").properties().get("g")); - Assertions.assertEquals("vxakglh", - model.monitorDefinition().alertNotificationSettings().emailNotificationSettings().emails().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTests.java deleted file mode 100644 index c01aa7c48568..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Cron; -import org.junit.jupiter.api.Assertions; - -public final class CronTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Cron model - = BinaryData.fromString("{\"startTime\":\"ivj\",\"timeZone\":\"erdqqigd\",\"expression\":\"kghpcv\"}") - .toObject(Cron.class); - Assertions.assertEquals("ivj", model.startTime()); - Assertions.assertEquals("erdqqigd", model.timeZone()); - Assertions.assertEquals("kghpcv", model.expression()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Cron model = new Cron().withStartTime("ivj").withTimeZone("erdqqigd").withExpression("kghpcv"); - model = BinaryData.fromObject(model).toObject(Cron.class); - Assertions.assertEquals("ivj", model.startTime()); - Assertions.assertEquals("erdqqigd", model.timeZone()); - Assertions.assertEquals("kghpcv", model.expression()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTriggerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTriggerTests.java deleted file mode 100644 index be36491f565a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTriggerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CronTrigger; -import org.junit.jupiter.api.Assertions; - -public final class CronTriggerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CronTrigger model = BinaryData.fromString( - "{\"triggerType\":\"Cron\",\"expression\":\"rbgpxeb\",\"endTime\":\"udcaytujrax\",\"startTime\":\"pryj\",\"timeZone\":\"tnsewou\"}") - .toObject(CronTrigger.class); - Assertions.assertEquals("udcaytujrax", model.endTime()); - Assertions.assertEquals("pryj", model.startTime()); - Assertions.assertEquals("tnsewou", model.timeZone()); - Assertions.assertEquals("rbgpxeb", model.expression()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CronTrigger model = new CronTrigger().withEndTime("udcaytujrax") - .withStartTime("pryj") - .withTimeZone("tnsewou") - .withExpression("rbgpxeb"); - model = BinaryData.fromObject(model).toObject(CronTrigger.class); - Assertions.assertEquals("udcaytujrax", model.endTime()); - Assertions.assertEquals("pryj", model.startTime()); - Assertions.assertEquals("tnsewou", model.timeZone()); - Assertions.assertEquals("rbgpxeb", model.expression()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomForecastHorizonTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomForecastHorizonTests.java deleted file mode 100644 index 7db7f737739c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomForecastHorizonTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomForecastHorizon; -import org.junit.jupiter.api.Assertions; - -public final class CustomForecastHorizonTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomForecastHorizon model - = BinaryData.fromString("{\"mode\":\"Custom\",\"value\":521751095}").toObject(CustomForecastHorizon.class); - Assertions.assertEquals(521751095, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomForecastHorizon model = new CustomForecastHorizon().withValue(521751095); - model = BinaryData.fromObject(model).toObject(CustomForecastHorizon.class); - Assertions.assertEquals(521751095, model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMetricThresholdTests.java deleted file mode 100644 index 57cd72ae0c0e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMetricThresholdTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomMetricThreshold; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import org.junit.jupiter.api.Assertions; - -public final class CustomMetricThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomMetricThreshold model - = BinaryData.fromString("{\"threshold\":{\"value\":1.9267227965499623},\"metric\":\"vyljurkeposehqq\"}") - .toObject(CustomMetricThreshold.class); - Assertions.assertEquals(1.9267227965499623D, model.threshold().value()); - Assertions.assertEquals("vyljurkeposehqq", model.metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomMetricThreshold model - = new CustomMetricThreshold().withThreshold(new MonitoringThreshold().withValue(1.9267227965499623D)) - .withMetric("vyljurkeposehqq"); - model = BinaryData.fromObject(model).toObject(CustomMetricThreshold.class); - Assertions.assertEquals(1.9267227965499623D, model.threshold().value()); - Assertions.assertEquals("vyljurkeposehqq", model.metric()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobInputTests.java deleted file mode 100644 index f2ee303b4167..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobInputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomModelJobInput; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class CustomModelJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomModelJobInput model = BinaryData.fromString( - "{\"jobInputType\":\"custom_model\",\"uri\":\"lmpctwj\",\"mode\":\"ReadWriteMount\",\"description\":\"lzmkxerxxxotee\"}") - .toObject(CustomModelJobInput.class); - Assertions.assertEquals("lzmkxerxxxotee", model.description()); - Assertions.assertEquals("lmpctwj", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomModelJobInput model = new CustomModelJobInput().withDescription("lzmkxerxxxotee") - .withUri("lmpctwj") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(CustomModelJobInput.class); - Assertions.assertEquals("lzmkxerxxxotee", model.description()); - Assertions.assertEquals("lmpctwj", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobOutputTests.java deleted file mode 100644 index 5caf5b63090b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobOutputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomModelJobOutput; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class CustomModelJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomModelJobOutput model = BinaryData.fromString( - "{\"jobOutputType\":\"custom_model\",\"uri\":\"howgomvvhxo\",\"mode\":\"ReadWriteMount\",\"description\":\"apnpxraqawbmp\"}") - .toObject(CustomModelJobOutput.class); - Assertions.assertEquals("apnpxraqawbmp", model.description()); - Assertions.assertEquals("howgomvvhxo", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomModelJobOutput model = new CustomModelJobOutput().withDescription("apnpxraqawbmp") - .withUri("howgomvvhxo") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(CustomModelJobOutput.class); - Assertions.assertEquals("apnpxraqawbmp", model.description()); - Assertions.assertEquals("howgomvvhxo", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMonitoringSignalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMonitoringSignalTests.java deleted file mode 100644 index 8dc6ab11bac1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMonitoringSignalTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomMetricThreshold; -import com.azure.resourcemanager.machinelearning.models.CustomMonitoringSignal; -import com.azure.resourcemanager.machinelearning.models.JobInput; -import com.azure.resourcemanager.machinelearning.models.JobInputType; -import com.azure.resourcemanager.machinelearning.models.MonitoringInputDataBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CustomMonitoringSignalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomMonitoringSignal model = BinaryData.fromString( - "{\"signalType\":\"Custom\",\"inputAssets\":{\"or\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"ylqlocvvujexaygl\",\"jobInputType\":\"triton_model\",\"uri\":\"kgjn\",\"columns\":{\"iuofpieidz\":\"aslavxj\",\"vikmfngpmillxgj\":\"vssqywjopackyhy\",\"bijeiydy\":\"cizwgsori\",\"opdweoft\":\"uynhbokayrgwybr\"}}},\"inputs\":{\"octqkmvjanxvzf\":{\"jobInputType\":\"JobInput\",\"description\":\"s\"},\"xx\":{\"jobInputType\":\"JobInput\",\"description\":\"htjnwosstfjxtv\"},\"mxeezwyh\":{\"jobInputType\":\"JobInput\",\"description\":\"fcwrri\"}},\"componentId\":\"mbjiqeg\",\"metricThresholds\":[{\"threshold\":{\"value\":75.0769890262459},\"metric\":\"hc\"},{\"threshold\":{\"value\":63.09814916267899},\"metric\":\"dkgd\"}],\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"nensmuffi\":\"nzbjekwuycky\",\"otdxpo\":\"jbctvbpzujqj\",\"cktybhjuxid\":\"cslhwuusi\",\"ugxwjwilmqrslaat\":\"hxomilddxjx\"}}") - .toObject(CustomMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("nzbjekwuycky", model.properties().get("nensmuffi")); - Assertions.assertEquals("ylqlocvvujexaygl", model.inputAssets().get("or").dataContext()); - Assertions.assertEquals(JobInputType.TRITON_MODEL, model.inputAssets().get("or").jobInputType()); - Assertions.assertEquals("kgjn", model.inputAssets().get("or").uri()); - Assertions.assertEquals("aslavxj", model.inputAssets().get("or").columns().get("iuofpieidz")); - Assertions.assertEquals("s", model.inputs().get("octqkmvjanxvzf").description()); - Assertions.assertEquals("mbjiqeg", model.componentId()); - Assertions.assertEquals(75.0769890262459D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("hc", model.metricThresholds().get(0).metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomMonitoringSignal model = new CustomMonitoringSignal() - .withNotificationTypes( - Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("nensmuffi", "nzbjekwuycky", "otdxpo", "jbctvbpzujqj", "cktybhjuxid", "cslhwuusi", - "ugxwjwilmqrslaat", "hxomilddxjx")) - .withInputAssets(mapOf("or", - new MonitoringInputDataBase().withDataContext("ylqlocvvujexaygl") - .withJobInputType(JobInputType.TRITON_MODEL) - .withUri("kgjn") - .withColumns(mapOf("iuofpieidz", "aslavxj", "vikmfngpmillxgj", "vssqywjopackyhy", "bijeiydy", - "cizwgsori", "opdweoft", "uynhbokayrgwybr")))) - .withInputs(mapOf("octqkmvjanxvzf", new JobInput().withDescription("s"), "xx", - new JobInput().withDescription("htjnwosstfjxtv"), "mxeezwyh", new JobInput().withDescription("fcwrri"))) - .withComponentId("mbjiqeg") - .withMetricThresholds(Arrays.asList( - new CustomMetricThreshold().withThreshold(new MonitoringThreshold().withValue(75.0769890262459D)) - .withMetric("hc"), - new CustomMetricThreshold().withThreshold(new MonitoringThreshold().withValue(63.09814916267899D)) - .withMetric("dkgd"))); - model = BinaryData.fromObject(model).toObject(CustomMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("nzbjekwuycky", model.properties().get("nensmuffi")); - Assertions.assertEquals("ylqlocvvujexaygl", model.inputAssets().get("or").dataContext()); - Assertions.assertEquals(JobInputType.TRITON_MODEL, model.inputAssets().get("or").jobInputType()); - Assertions.assertEquals("kgjn", model.inputAssets().get("or").uri()); - Assertions.assertEquals("aslavxj", model.inputAssets().get("or").columns().get("iuofpieidz")); - Assertions.assertEquals("s", model.inputs().get("octqkmvjanxvzf").description()); - Assertions.assertEquals("mbjiqeg", model.componentId()); - Assertions.assertEquals(75.0769890262459D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("hc", model.metricThresholds().get(0).metric()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomNCrossValidationsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomNCrossValidationsTests.java deleted file mode 100644 index dfce843881b2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomNCrossValidationsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomNCrossValidations; -import org.junit.jupiter.api.Assertions; - -public final class CustomNCrossValidationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomNCrossValidations model = BinaryData.fromString("{\"mode\":\"Custom\",\"value\":1824520711}") - .toObject(CustomNCrossValidations.class); - Assertions.assertEquals(1824520711, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomNCrossValidations model = new CustomNCrossValidations().withValue(1824520711); - model = BinaryData.fromObject(model).toObject(CustomNCrossValidations.class); - Assertions.assertEquals(1824520711, model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomSeasonalityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomSeasonalityTests.java deleted file mode 100644 index 6be6cd94ae8e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomSeasonalityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomSeasonality; -import org.junit.jupiter.api.Assertions; - -public final class CustomSeasonalityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomSeasonality model - = BinaryData.fromString("{\"mode\":\"Custom\",\"value\":523197972}").toObject(CustomSeasonality.class); - Assertions.assertEquals(523197972, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomSeasonality model = new CustomSeasonality().withValue(523197972); - model = BinaryData.fromObject(model).toObject(CustomSeasonality.class); - Assertions.assertEquals(523197972, model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomServiceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomServiceTests.java deleted file mode 100644 index ef9ea8a1d75f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomServiceTests.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BindOptions; -import com.azure.resourcemanager.machinelearning.models.CustomService; -import com.azure.resourcemanager.machinelearning.models.Docker; -import com.azure.resourcemanager.machinelearning.models.Endpoint; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVariable; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType; -import com.azure.resourcemanager.machinelearning.models.Image; -import com.azure.resourcemanager.machinelearning.models.ImageType; -import com.azure.resourcemanager.machinelearning.models.Protocol; -import com.azure.resourcemanager.machinelearning.models.TmpfsOptions; -import com.azure.resourcemanager.machinelearning.models.VolumeDefinition; -import com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType; -import com.azure.resourcemanager.machinelearning.models.VolumeOptions; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CustomServiceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomService model = BinaryData.fromString( - "{\"name\":\"gj\",\"image\":{\"type\":\"docker\",\"reference\":\"pn\",\"\":{\"qqw\":\"datafcb\",\"uxejgwecywnfyszz\":\"datatqsmoxsa\",\"nqbdnddbboz\":\"dataczs\"}},\"environmentVariables\":{\"jpewpyjlfx\":{\"type\":\"local\",\"value\":\"jmyitrchwudl\",\"\":{\"msibzo\":\"dataihtpmnoejhql\",\"mypgfqvmty\":\"datarfgxkyd\",\"kxp\":\"datahl\"}},\"tnqsktx\":{\"type\":\"local\",\"value\":\"crzge\",\"\":{\"iatwfaujegqdtadr\":\"datab\",\"hjkrukizyhgs\":\"datakgd\"}},\"bwjtrdx\":{\"type\":\"local\",\"value\":\"bqggw\",\"\":{\"hdmncgbfz\":\"dataw\",\"bkl\":\"datascstunmlhxd\",\"f\":\"dataiichgjsysmvxodgw\",\"ec\":\"datazsifcuvbdujgcwx\"}},\"vydjufbnk\":{\"type\":\"local\",\"value\":\"gbbgiarksykp\",\"\":{\"dosqkptjqg\":\"dataxwabzrwiqrxhacl\",\"d\":\"dataifmmainwh\",\"qwuntob\":\"datakp\",\"lw\":\"dataizazz\"}}},\"docker\":{\"privileged\":false,\"\":{\"ytlbtlqhopxouvm\":\"dataegjwdabalfdxaglz\"}},\"endpoints\":[{\"protocol\":\"tcp\",\"name\":\"kyypzkgxfxfmy\",\"target\":1057393281,\"published\":1264769175,\"hostIp\":\"oksz\"},{\"protocol\":\"udp\",\"name\":\"wgpterdiuw\",\"target\":1339527688,\"published\":778791021,\"hostIp\":\"wzt\"},{\"protocol\":\"tcp\",\"name\":\"jygowifcqpolz\",\"target\":2140246849,\"published\":1155749309,\"hostIp\":\"zyybzo\"},{\"protocol\":\"udp\",\"name\":\"cptvdxxheig\",\"target\":1706348146,\"published\":1899017507,\"hostIp\":\"ghjhjvmabzzbwa\"}],\"volumes\":[{\"type\":\"bind\",\"readOnly\":false,\"source\":\"gymqtnapreoj\",\"target\":\"jnbscon\",\"consistency\":\"vi\",\"bind\":{\"propagation\":\"yc\",\"createHostPath\":false,\"selinux\":\"zqfsgnwdxzed\"},\"volume\":{\"nocopy\":false},\"tmpfs\":{\"size\":1629298194}},{\"type\":\"bind\",\"readOnly\":false,\"source\":\"lnfyzav\",\"target\":\"bypicdbkpdj\",\"consistency\":\"qh\",\"bind\":{\"propagation\":\"azpdg\",\"createHostPath\":false,\"selinux\":\"xsht\"},\"volume\":{\"nocopy\":true},\"tmpfs\":{\"size\":1082014127}},{\"type\":\"volume\",\"readOnly\":false,\"source\":\"bvcpxtzhi\",\"target\":\"qbtimpk\",\"consistency\":\"lornsihqh\",\"bind\":{\"propagation\":\"musuaawja\",\"createHostPath\":false,\"selinux\":\"nfczmnniixyxvq\"},\"volume\":{\"nocopy\":false},\"tmpfs\":{\"size\":1609830110}},{\"type\":\"bind\",\"readOnly\":false,\"source\":\"gmgmdd\",\"target\":\"gm\",\"consistency\":\"ltwmpftmf\",\"bind\":{\"propagation\":\"jogsyx\",\"createHostPath\":true,\"selinux\":\"mfd\"},\"volume\":{\"nocopy\":true},\"tmpfs\":{\"size\":64531850}}],\"\":{\"drmuhka\":\"datahnrecchd\",\"vkhhwm\":\"datamjedbiu\",\"rihufoihppiybxv\":\"datapjbweunxcq\"}}") - .toObject(CustomService.class); - Assertions.assertEquals("gj", model.name()); - Assertions.assertEquals(ImageType.DOCKER, model.image().type()); - Assertions.assertEquals("pn", model.image().reference()); - Assertions.assertEquals(EnvironmentVariableType.LOCAL, model.environmentVariables().get("jpewpyjlfx").type()); - Assertions.assertEquals("jmyitrchwudl", model.environmentVariables().get("jpewpyjlfx").value()); - Assertions.assertEquals(false, model.docker().privileged()); - Assertions.assertEquals(Protocol.TCP, model.endpoints().get(0).protocol()); - Assertions.assertEquals("kyypzkgxfxfmy", model.endpoints().get(0).name()); - Assertions.assertEquals(1057393281, model.endpoints().get(0).target()); - Assertions.assertEquals(1264769175, model.endpoints().get(0).published()); - Assertions.assertEquals("oksz", model.endpoints().get(0).hostIp()); - Assertions.assertEquals(VolumeDefinitionType.BIND, model.volumes().get(0).type()); - Assertions.assertEquals(false, model.volumes().get(0).readOnly()); - Assertions.assertEquals("gymqtnapreoj", model.volumes().get(0).source()); - Assertions.assertEquals("jnbscon", model.volumes().get(0).target()); - Assertions.assertEquals("vi", model.volumes().get(0).consistency()); - Assertions.assertEquals("yc", model.volumes().get(0).bind().propagation()); - Assertions.assertEquals(false, model.volumes().get(0).bind().createHostPath()); - Assertions.assertEquals("zqfsgnwdxzed", model.volumes().get(0).bind().selinux()); - Assertions.assertEquals(false, model.volumes().get(0).volume().nocopy()); - Assertions.assertEquals(1629298194, model.volumes().get(0).tmpfs().size()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomService model = new CustomService().withName("gj") - .withImage(new Image().withType(ImageType.DOCKER).withReference("pn").withAdditionalProperties(mapOf())) - .withEnvironmentVariables(mapOf("jpewpyjlfx", - new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("jmyitrchwudl") - .withAdditionalProperties(mapOf()), - "tnqsktx", - new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("crzge") - .withAdditionalProperties(mapOf()), - "bwjtrdx", - new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("bqggw") - .withAdditionalProperties(mapOf()), - "vydjufbnk", - new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("gbbgiarksykp") - .withAdditionalProperties(mapOf()))) - .withDocker(new Docker().withPrivileged(false).withAdditionalProperties(mapOf())) - .withEndpoints(Arrays.asList( - new Endpoint().withProtocol(Protocol.TCP) - .withName("kyypzkgxfxfmy") - .withTarget(1057393281) - .withPublished(1264769175) - .withHostIp("oksz"), - new Endpoint().withProtocol(Protocol.UDP) - .withName("wgpterdiuw") - .withTarget(1339527688) - .withPublished(778791021) - .withHostIp("wzt"), - new Endpoint().withProtocol(Protocol.TCP) - .withName("jygowifcqpolz") - .withTarget(2140246849) - .withPublished(1155749309) - .withHostIp("zyybzo"), - new Endpoint().withProtocol(Protocol.UDP) - .withName("cptvdxxheig") - .withTarget(1706348146) - .withPublished(1899017507) - .withHostIp("ghjhjvmabzzbwa"))) - .withVolumes(Arrays.asList( - new VolumeDefinition().withType(VolumeDefinitionType.BIND) - .withReadOnly(false) - .withSource("gymqtnapreoj") - .withTarget("jnbscon") - .withConsistency("vi") - .withBind( - new BindOptions().withPropagation("yc").withCreateHostPath(false).withSelinux("zqfsgnwdxzed")) - .withVolume(new VolumeOptions().withNocopy(false)) - .withTmpfs(new TmpfsOptions().withSize(1629298194)), - new VolumeDefinition().withType(VolumeDefinitionType.BIND) - .withReadOnly(false) - .withSource("lnfyzav") - .withTarget("bypicdbkpdj") - .withConsistency("qh") - .withBind(new BindOptions().withPropagation("azpdg").withCreateHostPath(false).withSelinux("xsht")) - .withVolume(new VolumeOptions().withNocopy(true)) - .withTmpfs(new TmpfsOptions().withSize(1082014127)), - new VolumeDefinition().withType(VolumeDefinitionType.VOLUME) - .withReadOnly(false) - .withSource("bvcpxtzhi") - .withTarget("qbtimpk") - .withConsistency("lornsihqh") - .withBind(new BindOptions().withPropagation("musuaawja") - .withCreateHostPath(false) - .withSelinux("nfczmnniixyxvq")) - .withVolume(new VolumeOptions().withNocopy(false)) - .withTmpfs(new TmpfsOptions().withSize(1609830110)), - new VolumeDefinition().withType(VolumeDefinitionType.BIND) - .withReadOnly(false) - .withSource("gmgmdd") - .withTarget("gm") - .withConsistency("ltwmpftmf") - .withBind(new BindOptions().withPropagation("jogsyx").withCreateHostPath(true).withSelinux("mfd")) - .withVolume(new VolumeOptions().withNocopy(true)) - .withTmpfs(new TmpfsOptions().withSize(64531850)))) - .withAdditionalProperties(mapOf()); - model = BinaryData.fromObject(model).toObject(CustomService.class); - Assertions.assertEquals("gj", model.name()); - Assertions.assertEquals(ImageType.DOCKER, model.image().type()); - Assertions.assertEquals("pn", model.image().reference()); - Assertions.assertEquals(EnvironmentVariableType.LOCAL, model.environmentVariables().get("jpewpyjlfx").type()); - Assertions.assertEquals("jmyitrchwudl", model.environmentVariables().get("jpewpyjlfx").value()); - Assertions.assertEquals(false, model.docker().privileged()); - Assertions.assertEquals(Protocol.TCP, model.endpoints().get(0).protocol()); - Assertions.assertEquals("kyypzkgxfxfmy", model.endpoints().get(0).name()); - Assertions.assertEquals(1057393281, model.endpoints().get(0).target()); - Assertions.assertEquals(1264769175, model.endpoints().get(0).published()); - Assertions.assertEquals("oksz", model.endpoints().get(0).hostIp()); - Assertions.assertEquals(VolumeDefinitionType.BIND, model.volumes().get(0).type()); - Assertions.assertEquals(false, model.volumes().get(0).readOnly()); - Assertions.assertEquals("gymqtnapreoj", model.volumes().get(0).source()); - Assertions.assertEquals("jnbscon", model.volumes().get(0).target()); - Assertions.assertEquals("vi", model.volumes().get(0).consistency()); - Assertions.assertEquals("yc", model.volumes().get(0).bind().propagation()); - Assertions.assertEquals(false, model.volumes().get(0).bind().createHostPath()); - Assertions.assertEquals("zqfsgnwdxzed", model.volumes().get(0).bind().selinux()); - Assertions.assertEquals(false, model.volumes().get(0).volume().nocopy()); - Assertions.assertEquals(1629298194, model.volumes().get(0).tmpfs().size()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetLagsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetLagsTests.java deleted file mode 100644 index 75c36c362edb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetLagsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomTargetLags; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CustomTargetLagsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomTargetLags model = BinaryData.fromString("{\"mode\":\"Custom\",\"values\":[798032974,467459839]}") - .toObject(CustomTargetLags.class); - Assertions.assertEquals(798032974, model.values().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomTargetLags model = new CustomTargetLags().withValues(Arrays.asList(798032974, 467459839)); - model = BinaryData.fromObject(model).toObject(CustomTargetLags.class); - Assertions.assertEquals(798032974, model.values().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetRollingWindowSizeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetRollingWindowSizeTests.java deleted file mode 100644 index fb1a2b55405e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetRollingWindowSizeTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomTargetRollingWindowSize; -import org.junit.jupiter.api.Assertions; - -public final class CustomTargetRollingWindowSizeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomTargetRollingWindowSize model = BinaryData.fromString("{\"mode\":\"Custom\",\"value\":725690227}") - .toObject(CustomTargetRollingWindowSize.class); - Assertions.assertEquals(725690227, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomTargetRollingWindowSize model = new CustomTargetRollingWindowSize().withValue(725690227); - model = BinaryData.fromObject(model).toObject(CustomTargetRollingWindowSize.class); - Assertions.assertEquals(725690227, model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataCollectorTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataCollectorTests.java deleted file mode 100644 index 6755ee6177b9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataCollectorTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Collection; -import com.azure.resourcemanager.machinelearning.models.DataCollectionMode; -import com.azure.resourcemanager.machinelearning.models.DataCollector; -import com.azure.resourcemanager.machinelearning.models.RequestLogging; -import com.azure.resourcemanager.machinelearning.models.RollingRateType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataCollectorTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataCollector model = BinaryData.fromString( - "{\"collections\":{\"jsvkskmqozzkivy\":{\"samplingRate\":40.92657360869598,\"dataCollectionMode\":\"Disabled\",\"dataId\":\"ulgm\",\"clientId\":\"jevdyznf\"}},\"rollingRate\":\"Year\",\"requestLogging\":{\"captureHeaders\":[\"zji\",\"lqfhefkwabs\"]}}") - .toObject(DataCollector.class); - Assertions.assertEquals(40.92657360869598D, model.collections().get("jsvkskmqozzkivy").samplingRate()); - Assertions.assertEquals(DataCollectionMode.DISABLED, - model.collections().get("jsvkskmqozzkivy").dataCollectionMode()); - Assertions.assertEquals("ulgm", model.collections().get("jsvkskmqozzkivy").dataId()); - Assertions.assertEquals("jevdyznf", model.collections().get("jsvkskmqozzkivy").clientId()); - Assertions.assertEquals(RollingRateType.YEAR, model.rollingRate()); - Assertions.assertEquals("zji", model.requestLogging().captureHeaders().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataCollector model = new DataCollector() - .withCollections(mapOf("jsvkskmqozzkivy", - new Collection().withSamplingRate(40.92657360869598D) - .withDataCollectionMode(DataCollectionMode.DISABLED) - .withDataId("ulgm") - .withClientId("jevdyznf"))) - .withRollingRate(RollingRateType.YEAR) - .withRequestLogging(new RequestLogging().withCaptureHeaders(Arrays.asList("zji", "lqfhefkwabs"))); - model = BinaryData.fromObject(model).toObject(DataCollector.class); - Assertions.assertEquals(40.92657360869598D, model.collections().get("jsvkskmqozzkivy").samplingRate()); - Assertions.assertEquals(DataCollectionMode.DISABLED, - model.collections().get("jsvkskmqozzkivy").dataCollectionMode()); - Assertions.assertEquals("ulgm", model.collections().get("jsvkskmqozzkivy").dataId()); - Assertions.assertEquals("jevdyznf", model.collections().get("jsvkskmqozzkivy").clientId()); - Assertions.assertEquals(RollingRateType.YEAR, model.rollingRate()); - Assertions.assertEquals("zji", model.requestLogging().captureHeaders().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerInnerTests.java deleted file mode 100644 index adc69060b589..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataContainerInner model = BinaryData.fromString( - "{\"properties\":{\"dataType\":\"uri_folder\",\"isArchived\":false,\"latestVersion\":\"fa\",\"nextVersion\":\"vnqqybaryeua\",\"description\":\"kq\",\"tags\":{\"w\":\"gzslesjcbhernnti\",\"uwrbehwagoh\":\"jcvb\"},\"properties\":{\"emvvhm\":\"fkmr\"}},\"id\":\"drjf\",\"name\":\"tac\",\"type\":\"ebjvewzcjzn\"}") - .toObject(DataContainerInner.class); - Assertions.assertEquals("kq", model.properties().description()); - Assertions.assertEquals("gzslesjcbhernnti", model.properties().tags().get("w")); - Assertions.assertEquals("fkmr", model.properties().properties().get("emvvhm")); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals(DataType.URI_FOLDER, model.properties().dataType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataContainerInner model - = new DataContainerInner().withProperties(new DataContainerProperties().withDescription("kq") - .withTags(mapOf("w", "gzslesjcbhernnti", "uwrbehwagoh", "jcvb")) - .withProperties(mapOf("emvvhm", "fkmr")) - .withIsArchived(false) - .withDataType(DataType.URI_FOLDER)); - model = BinaryData.fromObject(model).toObject(DataContainerInner.class); - Assertions.assertEquals("kq", model.properties().description()); - Assertions.assertEquals("gzslesjcbhernnti", model.properties().tags().get("w")); - Assertions.assertEquals("fkmr", model.properties().properties().get("emvvhm")); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals(DataType.URI_FOLDER, model.properties().dataType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerPropertiesTests.java deleted file mode 100644 index 8f7d90085c1f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataContainerProperties model = BinaryData.fromString( - "{\"dataType\":\"uri_folder\",\"isArchived\":true,\"latestVersion\":\"guaadraufactkahz\",\"nextVersion\":\"ajjziuxxpshne\",\"description\":\"ulfgslqu\",\"tags\":{\"o\":\"dlenrdsutujbazpj\",\"uvwpklvxwmyg\":\"minyflnorwm\",\"hiszepnnbjcrxgib\":\"xpgpq\"},\"properties\":{\"kokwbqplhlvnu\":\"xconfozauors\",\"phwzsoldweyuqdu\":\"epzl\",\"biorktal\":\"vmnnrw\"}}") - .toObject(DataContainerProperties.class); - Assertions.assertEquals("ulfgslqu", model.description()); - Assertions.assertEquals("dlenrdsutujbazpj", model.tags().get("o")); - Assertions.assertEquals("xconfozauors", model.properties().get("kokwbqplhlvnu")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(DataType.URI_FOLDER, model.dataType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataContainerProperties model = new DataContainerProperties().withDescription("ulfgslqu") - .withTags(mapOf("o", "dlenrdsutujbazpj", "uvwpklvxwmyg", "minyflnorwm", "hiszepnnbjcrxgib", "xpgpq")) - .withProperties(mapOf("kokwbqplhlvnu", "xconfozauors", "phwzsoldweyuqdu", "epzl", "biorktal", "vmnnrw")) - .withIsArchived(true) - .withDataType(DataType.URI_FOLDER); - model = BinaryData.fromObject(model).toObject(DataContainerProperties.class); - Assertions.assertEquals("ulfgslqu", model.description()); - Assertions.assertEquals("dlenrdsutujbazpj", model.tags().get("o")); - Assertions.assertEquals("xconfozauors", model.properties().get("kokwbqplhlvnu")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(DataType.URI_FOLDER, model.dataType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index 4fa216576179..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataContainerResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataContainerResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"gf\",\"nextVersion\":\"dsofbshrns\",\"description\":\"uswdv\",\"tags\":{\"wnopqgikyzirtx\":\"bycnunvjsrtkf\",\"ilqu\":\"yuxzejntpsewgi\",\"eoxorggufhyao\":\"rydxtqm\"},\"properties\":{\"jzhpjbibgjmfx\":\"ghhavgrvkffo\",\"cluyovwxnbkf\":\"mv\",\"zbomvzzbtdcqvpni\":\"zzxscyhwzdgiruj\"}},\"id\":\"jviylwdshfs\",\"name\":\"n\",\"type\":\"bgye\"},{\"properties\":{\"dataType\":\"mltable\",\"isArchived\":false,\"latestVersion\":\"gaojf\",\"nextVersion\":\"nc\",\"description\":\"mrfhirctymox\",\"tags\":{\"qjlihhyuspska\":\"pipiwyczuhxac\",\"cvpa\":\"dvlmfwdgzxul\",\"zvxurisjnhny\":\"rsre\"},\"properties\":{\"zgxmr\":\"fq\",\"upauut\":\"ublwpcesutrg\"}},\"id\":\"oqh\",\"name\":\"hej\",\"type\":\"g\"},{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"qntcypsxjvfoimwk\",\"nextVersion\":\"ircizjxvy\",\"description\":\"ceacvlhvygdy\",\"tags\":{\"jslb\":\"mrtwna\",\"aeqphchqnr\":\"wkojgcyztsfmzn\",\"wrykqgai\":\"rpxeh\"},\"properties\":{\"jdz\":\"iklbydvkhb\",\"srhnjivo\":\"xcv\"}},\"id\":\"tnovqfzgemjdftul\",\"name\":\"ltducea\",\"type\":\"tmczuomejwcwwqi\"},{\"properties\":{\"dataType\":\"uri_folder\",\"isArchived\":false,\"latestVersion\":\"xmojmsvpkjp\",\"nextVersion\":\"kwcf\",\"description\":\"ljyxgtczhe\",\"tags\":{\"xu\":\"sdshmkxmaehvb\",\"n\":\"iplt\",\"xywr\":\"tbaxk\",\"uodpv\":\"kpyklyhp\"},\"properties\":{\"tvdxeclzedqb\":\"dlgzibthostgkt\",\"lhpl\":\"vh\",\"lkxt\":\"dqkdlwwqfbu\",\"fwsrtawcoezbrhu\":\"qjfsmlmbtxhw\"}},\"id\":\"kh\",\"name\":\"dyg\",\"type\":\"ookk\"}],\"nextLink\":\"qjbvleorfmlu\"}") - .toObject(DataContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("uswdv", model.value().get(0).properties().description()); - Assertions.assertEquals("bycnunvjsrtkf", model.value().get(0).properties().tags().get("wnopqgikyzirtx")); - Assertions.assertEquals("ghhavgrvkffo", model.value().get(0).properties().properties().get("jzhpjbibgjmfx")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, model.value().get(0).properties().dataType()); - Assertions.assertEquals("qjbvleorfmlu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataContainerResourceArmPaginatedResult model - = new DataContainerResourceArmPaginatedResult() - .withValue(Arrays.asList( - new DataContainerInner().withProperties(new DataContainerProperties() - .withDescription("uswdv") - .withTags(mapOf("wnopqgikyzirtx", "bycnunvjsrtkf", "ilqu", "yuxzejntpsewgi", "eoxorggufhyao", - "rydxtqm")) - .withProperties(mapOf("jzhpjbibgjmfx", "ghhavgrvkffo", "cluyovwxnbkf", "mv", "zbomvzzbtdcqvpni", - "zzxscyhwzdgiruj")) - .withIsArchived(false) - .withDataType(DataType.URI_FILE)), - new DataContainerInner() - .withProperties(new DataContainerProperties().withDescription("mrfhirctymox") - .withTags( - mapOf("qjlihhyuspska", "pipiwyczuhxac", "cvpa", "dvlmfwdgzxul", "zvxurisjnhny", "rsre")) - .withProperties(mapOf("zgxmr", "fq", "upauut", "ublwpcesutrg")) - .withIsArchived(false) - .withDataType(DataType.MLTABLE)), - new DataContainerInner() - .withProperties(new DataContainerProperties().withDescription("ceacvlhvygdy") - .withTags(mapOf("jslb", "mrtwna", "aeqphchqnr", "wkojgcyztsfmzn", "wrykqgai", "rpxeh")) - .withProperties(mapOf("jdz", "iklbydvkhb", "srhnjivo", "xcv")) - .withIsArchived(false) - .withDataType(DataType.URI_FILE)), - new DataContainerInner().withProperties(new DataContainerProperties().withDescription("ljyxgtczhe") - .withTags(mapOf("xu", "sdshmkxmaehvb", "n", "iplt", "xywr", "tbaxk", "uodpv", "kpyklyhp")) - .withProperties(mapOf("tvdxeclzedqb", "dlgzibthostgkt", "lhpl", "vh", "lkxt", "dqkdlwwqfbu", - "fwsrtawcoezbrhu", "qjfsmlmbtxhw")) - .withIsArchived(false) - .withDataType(DataType.URI_FOLDER)))) - .withNextLink("qjbvleorfmlu"); - model = BinaryData.fromObject(model).toObject(DataContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("uswdv", model.value().get(0).properties().description()); - Assertions.assertEquals("bycnunvjsrtkf", model.value().get(0).properties().tags().get("wnopqgikyzirtx")); - Assertions.assertEquals("ghhavgrvkffo", model.value().get(0).properties().properties().get("jzhpjbibgjmfx")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, model.value().get(0).properties().dataType()); - Assertions.assertEquals("qjbvleorfmlu", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index f42a4ba0fcef..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataType; -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 reactor.core.publisher.Mono; - -public final class DataContainersCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"dataType\":\"mltable\",\"isArchived\":false,\"latestVersion\":\"cukboc\",\"nextVersion\":\"t\",\"description\":\"hvsgzpwqieyxjkc\",\"tags\":{\"qepeftmub\":\"sttam\"},\"properties\":{\"zeq\":\"oepeqlhbtysy\",\"gyzwfyfdbvoo\":\"ctpqnofkw\",\"iyqmlmw\":\"lmikdsqqykgjjsmv\",\"cvemmriyz\":\"wsmnwbm\"}},\"id\":\"quesxplcsinbulo\",\"name\":\"xxhcynnmvaiz\",\"type\":\"kwqqpwcids\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataContainer response = manager.dataContainers() - .define("qon") - .withExistingWorkspace("sxblmnxrxkuly", "ivvi") - .withProperties(new DataContainerProperties().withDescription("pnkzimqaxt") - .withTags(mapOf("paxjdqvv", "ycv", "mrdvhbgtuhwhx", "jehyvnfjngo")) - .withProperties(mapOf("nuzgzrxxduseb", "enbphy")) - .withIsArchived(false) - .withDataType(DataType.URI_FILE)) - .create(); - - Assertions.assertEquals("hvsgzpwqieyxjkc", response.properties().description()); - Assertions.assertEquals("sttam", response.properties().tags().get("qepeftmub")); - Assertions.assertEquals("oepeqlhbtysy", response.properties().properties().get("zeq")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(DataType.MLTABLE, response.properties().dataType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteWithResponseMockTests.java deleted file mode 100644 index 79e8c07d00cd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DataContainersDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.dataContainers() - .deleteWithResponse("zxqomzdfaupqvei", "zwnkbjqpz", "odwh", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetWithResponseMockTests.java deleted file mode 100644 index bcd114a54701..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DataContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"dcaqimodnbjmjx\",\"nextVersion\":\"bucmzkqt\",\"description\":\"jacktav\",\"tags\":{\"secedsoqwexi\":\"godjfyplavb\",\"ikf\":\"bnzot\",\"etqj\":\"jqdfadgywyla\",\"gylyzolrvwsgseqj\":\"ohystdgjtpbtkogf\"},\"properties\":{\"gisw\":\"axir\",\"pvsobamt\":\"jy\"}},\"id\":\"irdzdgv\",\"name\":\"oflzuk\",\"type\":\"gougxpypbmz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataContainer response = manager.dataContainers() - .getWithResponse("uxsochtuxapewzwq", "bx", "ynslcvynavwtttsm", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("jacktav", response.properties().description()); - Assertions.assertEquals("godjfyplavb", response.properties().tags().get("secedsoqwexi")); - Assertions.assertEquals("axir", response.properties().properties().get("gisw")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, response.properties().dataType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListMockTests.java deleted file mode 100644 index eace8b48b6ff..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataType; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DataContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":true,\"latestVersion\":\"qcsotwqtkpdc\",\"nextVersion\":\"fqoermgmgn\",\"description\":\"axaogskhc\",\"tags\":{\"yyb\":\"bipyse\",\"bpgdiwdy\":\"bfjcvmk\",\"wqwvcwcehzrtrg\":\"hdtiemb\"},\"properties\":{\"ktuzrltpe\":\"btbxhyfwjf\",\"njpbhjlugcupcyfr\":\"sdkbqfzbvttqjntv\"}},\"id\":\"oyvmvuxyeeafd\",\"name\":\"suwl\",\"type\":\"nxzhgbspdxbhjqux\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.dataContainers() - .list("rxbmljrjyfjleux", "xkpsjldgnim", "oacf", ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("axaogskhc", response.iterator().next().properties().description()); - Assertions.assertEquals("bipyse", response.iterator().next().properties().tags().get("yyb")); - Assertions.assertEquals("btbxhyfwjf", response.iterator().next().properties().properties().get("ktuzrltpe")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, response.iterator().next().properties().dataType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMetricThresholdBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMetricThresholdBaseTests.java deleted file mode 100644 index 2f4e36b0a02a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMetricThresholdBaseTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataDriftMetricThresholdBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import org.junit.jupiter.api.Assertions; - -public final class DataDriftMetricThresholdBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataDriftMetricThresholdBase model = BinaryData - .fromString("{\"dataType\":\"DataDriftMetricThresholdBase\",\"threshold\":{\"value\":16.657561950971566}}") - .toObject(DataDriftMetricThresholdBase.class); - Assertions.assertEquals(16.657561950971566D, model.threshold().value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataDriftMetricThresholdBase model = new DataDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(16.657561950971566D)); - model = BinaryData.fromObject(model).toObject(DataDriftMetricThresholdBase.class); - Assertions.assertEquals(16.657561950971566D, model.threshold().value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMonitoringSignalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMonitoringSignalTests.java deleted file mode 100644 index eeef451e5497..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMonitoringSignalTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataDriftMetricThresholdBase; -import com.azure.resourcemanager.machinelearning.models.DataDriftMonitoringSignal; -import com.azure.resourcemanager.machinelearning.models.FeatureImportanceMode; -import com.azure.resourcemanager.machinelearning.models.FeatureImportanceSettings; -import com.azure.resourcemanager.machinelearning.models.JobInputType; -import com.azure.resourcemanager.machinelearning.models.MonitoringFeatureDataType; -import com.azure.resourcemanager.machinelearning.models.MonitoringFeatureFilterBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringInputDataBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataDriftMonitoringSignalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataDriftMonitoringSignal model = BinaryData.fromString( - "{\"signalType\":\"DataDrift\",\"features\":{\"filterType\":\"MonitoringFeatureFilterBase\"},\"featureImportanceSettings\":{\"mode\":\"Disabled\",\"targetColumn\":\"gbjbhrp\"},\"metricThresholds\":[{\"dataType\":\"DataDriftMetricThresholdBase\",\"threshold\":{\"value\":44.85113411986268}},{\"dataType\":\"DataDriftMetricThresholdBase\",\"threshold\":{\"value\":50.380142949889816}}],\"productionData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"mmaixpqji\",\"jobInputType\":\"mlflow_model\",\"uri\":\"f\",\"columns\":{\"tohqclna\":\"sld\",\"gsiqikvllr\":\"h\",\"wrqkza\":\"tpmglxkoikmtr\",\"paklw\":\"bun\"}},\"referenceData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"wee\",\"jobInputType\":\"uri_folder\",\"uri\":\"nejzltkaszfjsxs\",\"columns\":{\"lnwsbvvdlsf\":\"uxapgrcqebmvrdjo\"}},\"featureDataTypeOverride\":{\"esdfedsb\":\"Numerical\"},\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"i\":\"phymc\",\"e\":\"kltvdhqnufbx\",\"ntojovfnybydhuih\":\"i\"}}") - .toObject(DataDriftMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("phymc", model.properties().get("i")); - Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("gbjbhrp", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals(44.85113411986268D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("mmaixpqji", model.productionData().dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.productionData().jobInputType()); - Assertions.assertEquals("f", model.productionData().uri()); - Assertions.assertEquals("sld", model.productionData().columns().get("tohqclna")); - Assertions.assertEquals("wee", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.URI_FOLDER, model.referenceData().jobInputType()); - Assertions.assertEquals("nejzltkaszfjsxs", model.referenceData().uri()); - Assertions.assertEquals("uxapgrcqebmvrdjo", model.referenceData().columns().get("lnwsbvvdlsf")); - Assertions.assertEquals(MonitoringFeatureDataType.NUMERICAL, model.featureDataTypeOverride().get("esdfedsb")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataDriftMonitoringSignal model = new DataDriftMonitoringSignal() - .withNotificationTypes( - Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("i", "phymc", "e", "kltvdhqnufbx", "ntojovfnybydhuih", "i")) - .withFeatures(new MonitoringFeatureFilterBase()) - .withFeatureImportanceSettings( - new FeatureImportanceSettings().withMode(FeatureImportanceMode.DISABLED).withTargetColumn("gbjbhrp")) - .withMetricThresholds(Arrays.asList( - new DataDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(44.85113411986268D)), - new DataDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(50.380142949889816D)))) - .withProductionData(new MonitoringInputDataBase().withDataContext("mmaixpqji") - .withJobInputType(JobInputType.MLFLOW_MODEL) - .withUri("f") - .withColumns(mapOf("tohqclna", "sld", "gsiqikvllr", "h", "wrqkza", "tpmglxkoikmtr", "paklw", "bun"))) - .withReferenceData(new MonitoringInputDataBase().withDataContext("wee") - .withJobInputType(JobInputType.URI_FOLDER) - .withUri("nejzltkaszfjsxs") - .withColumns(mapOf("lnwsbvvdlsf", "uxapgrcqebmvrdjo"))) - .withFeatureDataTypeOverride(mapOf("esdfedsb", MonitoringFeatureDataType.NUMERICAL)); - model = BinaryData.fromObject(model).toObject(DataDriftMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("phymc", model.properties().get("i")); - Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("gbjbhrp", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals(44.85113411986268D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("mmaixpqji", model.productionData().dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.productionData().jobInputType()); - Assertions.assertEquals("f", model.productionData().uri()); - Assertions.assertEquals("sld", model.productionData().columns().get("tohqclna")); - Assertions.assertEquals("wee", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.URI_FOLDER, model.referenceData().jobInputType()); - Assertions.assertEquals("nejzltkaszfjsxs", model.referenceData().uri()); - Assertions.assertEquals("uxapgrcqebmvrdjo", model.referenceData().columns().get("lnwsbvvdlsf")); - Assertions.assertEquals(MonitoringFeatureDataType.NUMERICAL, model.featureDataTypeOverride().get("esdfedsb")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaPropertiesTests.java deleted file mode 100644 index 363e5037b410..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchemaProperties; -import org.junit.jupiter.api.Assertions; - -public final class DataLakeAnalyticsSchemaPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataLakeAnalyticsSchemaProperties model = BinaryData.fromString("{\"dataLakeStoreAccountName\":\"wtxzuisam\"}") - .toObject(DataLakeAnalyticsSchemaProperties.class); - Assertions.assertEquals("wtxzuisam", model.dataLakeStoreAccountName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataLakeAnalyticsSchemaProperties model - = new DataLakeAnalyticsSchemaProperties().withDataLakeStoreAccountName("wtxzuisam"); - model = BinaryData.fromObject(model).toObject(DataLakeAnalyticsSchemaProperties.class); - Assertions.assertEquals("wtxzuisam", model.dataLakeStoreAccountName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaTests.java deleted file mode 100644 index a0304a36f071..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchema; -import com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchemaProperties; -import org.junit.jupiter.api.Assertions; - -public final class DataLakeAnalyticsSchemaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataLakeAnalyticsSchema model - = BinaryData.fromString("{\"properties\":{\"dataLakeStoreAccountName\":\"dbmp\"}}") - .toObject(DataLakeAnalyticsSchema.class); - Assertions.assertEquals("dbmp", model.properties().dataLakeStoreAccountName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataLakeAnalyticsSchema model = new DataLakeAnalyticsSchema() - .withProperties(new DataLakeAnalyticsSchemaProperties().withDataLakeStoreAccountName("dbmp")); - model = BinaryData.fromObject(model).toObject(DataLakeAnalyticsSchema.class); - Assertions.assertEquals("dbmp", model.properties().dataLakeStoreAccountName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataPathAssetReferenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataPathAssetReferenceTests.java deleted file mode 100644 index b0de8cbf43c8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataPathAssetReferenceTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataPathAssetReference; -import org.junit.jupiter.api.Assertions; - -public final class DataPathAssetReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataPathAssetReference model = BinaryData - .fromString( - "{\"referenceType\":\"DataPath\",\"path\":\"wvumosqircamqprl\",\"datastoreId\":\"rugejcvjkjy\"}") - .toObject(DataPathAssetReference.class); - Assertions.assertEquals("wvumosqircamqprl", model.path()); - Assertions.assertEquals("rugejcvjkjy", model.datastoreId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataPathAssetReference model - = new DataPathAssetReference().withPath("wvumosqircamqprl").withDatastoreId("rugejcvjkjy"); - model = BinaryData.fromObject(model).toObject(DataPathAssetReference.class); - Assertions.assertEquals("wvumosqircamqprl", model.path()); - Assertions.assertEquals("rugejcvjkjy", model.datastoreId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMetricThresholdBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMetricThresholdBaseTests.java deleted file mode 100644 index bc62a16c55b1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMetricThresholdBaseTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataQualityMetricThresholdBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import org.junit.jupiter.api.Assertions; - -public final class DataQualityMetricThresholdBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataQualityMetricThresholdBase model = BinaryData - .fromString("{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":1.952782612587045}}") - .toObject(DataQualityMetricThresholdBase.class); - Assertions.assertEquals(1.952782612587045D, model.threshold().value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataQualityMetricThresholdBase model = new DataQualityMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(1.952782612587045D)); - model = BinaryData.fromObject(model).toObject(DataQualityMetricThresholdBase.class); - Assertions.assertEquals(1.952782612587045D, model.threshold().value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMonitoringSignalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMonitoringSignalTests.java deleted file mode 100644 index edbee6f80163..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMonitoringSignalTests.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataQualityMetricThresholdBase; -import com.azure.resourcemanager.machinelearning.models.DataQualityMonitoringSignal; -import com.azure.resourcemanager.machinelearning.models.FeatureImportanceMode; -import com.azure.resourcemanager.machinelearning.models.FeatureImportanceSettings; -import com.azure.resourcemanager.machinelearning.models.JobInputType; -import com.azure.resourcemanager.machinelearning.models.MonitoringFeatureDataType; -import com.azure.resourcemanager.machinelearning.models.MonitoringFeatureFilterBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringInputDataBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataQualityMonitoringSignalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataQualityMonitoringSignal model = BinaryData.fromString( - "{\"signalType\":\"DataQuality\",\"features\":{\"filterType\":\"MonitoringFeatureFilterBase\"},\"featureImportanceSettings\":{\"mode\":\"Disabled\",\"targetColumn\":\"gelajdyolje\"},\"metricThresholds\":[{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":72.15525185747076}},{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":73.54011054612096}},{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":63.244267432137526}},{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":6.228835392523502}}],\"productionData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"jymgqbgcxhn\",\"jobInputType\":\"literal\",\"uri\":\"gzxlermkmerghski\",\"columns\":{\"jqnvtsdyd\":\"pupkcbkfukd\",\"yuf\":\"hkpafyaloowwzizz\",\"ti\":\"qz\"}},\"referenceData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"uf\",\"jobInputType\":\"mltable\",\"uri\":\"fdk\",\"columns\":{\"qh\":\"vndjokgwesym\",\"ujqbbgsimwejl\":\"qpfzlpejtznxlue\",\"bcpr\":\"bkbpjzobd\",\"ydtnaczkfwfatgaw\":\"swku\"}},\"featureDataTypeOverride\":{\"kivdwgtqcume\":\"Categorical\",\"aaqgoqbdiuycs\":\"Numerical\",\"kowkrbhzhr\":\"Categorical\"},\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"gucyhfaimqvdruo\":\"wiuasfg\",\"kk\":\"kgyfpeoehgfmqm\",\"vzjyielb\":\"xvlzjxplhpevasyn\"}}") - .toObject(DataQualityMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("wiuasfg", model.properties().get("gucyhfaimqvdruo")); - Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("gelajdyolje", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals(72.15525185747076D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("jymgqbgcxhn", model.productionData().dataContext()); - Assertions.assertEquals(JobInputType.LITERAL, model.productionData().jobInputType()); - Assertions.assertEquals("gzxlermkmerghski", model.productionData().uri()); - Assertions.assertEquals("pupkcbkfukd", model.productionData().columns().get("jqnvtsdyd")); - Assertions.assertEquals("uf", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.MLTABLE, model.referenceData().jobInputType()); - Assertions.assertEquals("fdk", model.referenceData().uri()); - Assertions.assertEquals("vndjokgwesym", model.referenceData().columns().get("qh")); - Assertions.assertEquals(MonitoringFeatureDataType.CATEGORICAL, - model.featureDataTypeOverride().get("kivdwgtqcume")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataQualityMonitoringSignal model = new DataQualityMonitoringSignal() - .withNotificationTypes( - Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("gucyhfaimqvdruo", "wiuasfg", "kk", "kgyfpeoehgfmqm", "vzjyielb", "xvlzjxplhpevasyn")) - .withFeatures(new MonitoringFeatureFilterBase()) - .withFeatureImportanceSettings(new FeatureImportanceSettings().withMode(FeatureImportanceMode.DISABLED) - .withTargetColumn("gelajdyolje")) - .withMetricThresholds(Arrays.asList( - new DataQualityMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(72.15525185747076D)), - new DataQualityMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(73.54011054612096D)), - new DataQualityMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(63.244267432137526D)), - new DataQualityMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(6.228835392523502D)))) - .withProductionData(new MonitoringInputDataBase().withDataContext("jymgqbgcxhn") - .withJobInputType(JobInputType.LITERAL) - .withUri("gzxlermkmerghski") - .withColumns(mapOf("jqnvtsdyd", "pupkcbkfukd", "yuf", "hkpafyaloowwzizz", "ti", "qz"))) - .withReferenceData(new MonitoringInputDataBase().withDataContext("uf") - .withJobInputType(JobInputType.MLTABLE) - .withUri("fdk") - .withColumns(mapOf("qh", "vndjokgwesym", "ujqbbgsimwejl", "qpfzlpejtznxlue", "bcpr", "bkbpjzobd", - "ydtnaczkfwfatgaw", "swku"))) - .withFeatureDataTypeOverride(mapOf("kivdwgtqcume", MonitoringFeatureDataType.CATEGORICAL, "aaqgoqbdiuycs", - MonitoringFeatureDataType.NUMERICAL, "kowkrbhzhr", MonitoringFeatureDataType.CATEGORICAL)); - model = BinaryData.fromObject(model).toObject(DataQualityMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("wiuasfg", model.properties().get("gucyhfaimqvdruo")); - Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("gelajdyolje", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals(72.15525185747076D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("jymgqbgcxhn", model.productionData().dataContext()); - Assertions.assertEquals(JobInputType.LITERAL, model.productionData().jobInputType()); - Assertions.assertEquals("gzxlermkmerghski", model.productionData().uri()); - Assertions.assertEquals("pupkcbkfukd", model.productionData().columns().get("jqnvtsdyd")); - Assertions.assertEquals("uf", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.MLTABLE, model.referenceData().jobInputType()); - Assertions.assertEquals("fdk", model.referenceData().uri()); - Assertions.assertEquals("vndjokgwesym", model.referenceData().columns().get("qh")); - Assertions.assertEquals(MonitoringFeatureDataType.CATEGORICAL, - model.featureDataTypeOverride().get("kivdwgtqcume")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseInnerTests.java deleted file mode 100644 index dac5e4fa54a7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataVersionBaseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataVersionBaseInner model = BinaryData.fromString( - "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"widf\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"unnoxyhk\",\"tags\":{\"oqcaaewdaomdj\":\"ddrihpf\",\"jxxkzbrmsgei\":\"l\",\"ggcula\":\"siykzkdncjdxonbz\",\"y\":\"z\"},\"properties\":{\"ajlyjtlvofqzhv\":\"ogtqxepnylbf\",\"fmo\":\"cib\",\"dwxf\":\"uxrkjp\",\"rkambt\":\"wiivwzjbhyzsx\"}},\"id\":\"egv\",\"name\":\"nvuqeqvldspa\",\"type\":\"tjb\"}") - .toObject(DataVersionBaseInner.class); - Assertions.assertEquals("unnoxyhk", model.properties().description()); - Assertions.assertEquals("ddrihpf", model.properties().tags().get("oqcaaewdaomdj")); - Assertions.assertEquals("ogtqxepnylbf", model.properties().properties().get("ajlyjtlvofqzhv")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals("widf", model.properties().dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataVersionBaseInner model = new DataVersionBaseInner().withProperties(new DataVersionBaseProperties() - .withDescription("unnoxyhk") - .withTags(mapOf("oqcaaewdaomdj", "ddrihpf", "jxxkzbrmsgei", "l", "ggcula", "siykzkdncjdxonbz", "y", "z")) - .withProperties( - mapOf("ajlyjtlvofqzhv", "ogtqxepnylbf", "fmo", "cib", "dwxf", "uxrkjp", "rkambt", "wiivwzjbhyzsx")) - .withIsArchived(true) - .withIsAnonymous(true) - .withDataUri("widf")); - model = BinaryData.fromObject(model).toObject(DataVersionBaseInner.class); - Assertions.assertEquals("unnoxyhk", model.properties().description()); - Assertions.assertEquals("ddrihpf", model.properties().tags().get("oqcaaewdaomdj")); - Assertions.assertEquals("ogtqxepnylbf", model.properties().properties().get("ajlyjtlvofqzhv")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals("widf", model.properties().dataUri()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBasePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBasePropertiesTests.java deleted file mode 100644 index 3a7e34d14cb7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBasePropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataVersionBasePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataVersionBaseProperties model = BinaryData.fromString( - "{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"kdmflvestmjlx\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"apeewchpxlkt\",\"tags\":{\"yhjtqedcgzu\":\"ziycslevufuztck\",\"zrrjvpgly\":\"wmmrq\"},\"properties\":{\"ev\":\"krvq\",\"t\":\"oepry\",\"fvaawzqa\":\"wytpzdmovz\"}}") - .toObject(DataVersionBaseProperties.class); - Assertions.assertEquals("apeewchpxlkt", model.description()); - Assertions.assertEquals("ziycslevufuztck", model.tags().get("yhjtqedcgzu")); - Assertions.assertEquals("krvq", model.properties().get("ev")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("kdmflvestmjlx", model.dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataVersionBaseProperties model = new DataVersionBaseProperties().withDescription("apeewchpxlkt") - .withTags(mapOf("yhjtqedcgzu", "ziycslevufuztck", "zrrjvpgly", "wmmrq")) - .withProperties(mapOf("ev", "krvq", "t", "oepry", "fvaawzqa", "wytpzdmovz")) - .withIsArchived(true) - .withIsAnonymous(false) - .withDataUri("kdmflvestmjlx"); - model = BinaryData.fromObject(model).toObject(DataVersionBaseProperties.class); - Assertions.assertEquals("apeewchpxlkt", model.description()); - Assertions.assertEquals("ziycslevufuztck", model.tags().get("yhjtqedcgzu")); - Assertions.assertEquals("krvq", model.properties().get("ev")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("kdmflvestmjlx", model.dataUri()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseResourceArmPaginatedResultTests.java deleted file mode 100644 index 789ff4ea9ee2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataVersionBaseResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataVersionBaseResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"hhg\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"ivfomiloxgg\",\"tags\":{\"hvcyyysfg\":\"iqndieuzaofj\"},\"properties\":{\"qonmacj\":\"cubiipuipw\",\"izsh\":\"k\",\"gmblrri\":\"vcimpev\",\"rwfscjfnynszquj\":\"bywdxsmicc\"}},\"id\":\"dvoqyt\",\"name\":\"byowbblgyavutp\",\"type\":\"hjoxo\"},{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"smsks\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"oljxkcgx\",\"tags\":{\"l\":\"sffgcvizqzd\",\"youpfgfbkj\":\"w\",\"ttsttktlahbqact\":\"bdyhgkfminsgowz\"},\"properties\":{\"x\":\"zukxitmmqtgqq\",\"isavok\":\"rnxrxcpj\",\"azivjlfrqttbajl\":\"dzf\"}},\"id\":\"tnwxy\",\"name\":\"opidkqqfkuv\",\"type\":\"cxkdmligovi\"},{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"rxkpmloazuruoc\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"te\",\"tags\":{\"ordilmywwtkgkxny\":\"fhjxakvvjgs\",\"vudtjuewbcihx\":\"dabg\",\"ayakkudzpx\":\"uwhcjyxccybv\",\"stcyohpfkyrkdbd\":\"wjplma\"},\"properties\":{\"mnwqj\":\"gsj\",\"n\":\"obaiyhddviaceg\",\"dwvvba\":\"ntfpmvmemfnc\"}},\"id\":\"lllchpodb\",\"name\":\"evwrdnhfuk\",\"type\":\"vsjcswsmystuluqy\"}],\"nextLink\":\"cvlerchpqbmfpjba\"}") - .toObject(DataVersionBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("ivfomiloxgg", model.value().get(0).properties().description()); - Assertions.assertEquals("iqndieuzaofj", model.value().get(0).properties().tags().get("hvcyyysfg")); - Assertions.assertEquals("cubiipuipw", model.value().get(0).properties().properties().get("qonmacj")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("hhg", model.value().get(0).properties().dataUri()); - Assertions.assertEquals("cvlerchpqbmfpjba", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataVersionBaseResourceArmPaginatedResult model - = new DataVersionBaseResourceArmPaginatedResult().withValue(Arrays.asList( - new DataVersionBaseInner().withProperties(new DataVersionBaseProperties().withDescription("ivfomiloxgg") - .withTags(mapOf("hvcyyysfg", "iqndieuzaofj")) - .withProperties(mapOf("qonmacj", "cubiipuipw", "izsh", "k", "gmblrri", "vcimpev", "rwfscjfnynszquj", - "bywdxsmicc")) - .withIsArchived(false) - .withIsAnonymous(false) - .withDataUri("hhg")), - new DataVersionBaseInner().withProperties(new DataVersionBaseProperties().withDescription("oljxkcgx") - .withTags(mapOf("l", "sffgcvizqzd", "youpfgfbkj", "w", "ttsttktlahbqact", "bdyhgkfminsgowz")) - .withProperties(mapOf("x", "zukxitmmqtgqq", "isavok", "rnxrxcpj", "azivjlfrqttbajl", "dzf")) - .withIsArchived(false) - .withIsAnonymous(false) - .withDataUri("smsks")), - new DataVersionBaseInner().withProperties(new DataVersionBaseProperties().withDescription("te") - .withTags(mapOf("ordilmywwtkgkxny", "fhjxakvvjgs", "vudtjuewbcihx", "dabg", "ayakkudzpx", - "uwhcjyxccybv", "stcyohpfkyrkdbd", "wjplma")) - .withProperties(mapOf("mnwqj", "gsj", "n", "obaiyhddviaceg", "dwvvba", "ntfpmvmemfnc")) - .withIsArchived(false) - .withIsAnonymous(false) - .withDataUri("rxkpmloazuruoc")))) - .withNextLink("cvlerchpqbmfpjba"); - model = BinaryData.fromObject(model).toObject(DataVersionBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("ivfomiloxgg", model.value().get(0).properties().description()); - Assertions.assertEquals("iqndieuzaofj", model.value().get(0).properties().tags().get("hvcyyysfg")); - Assertions.assertEquals("cubiipuipw", model.value().get(0).properties().properties().get("qonmacj")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("hhg", model.value().get(0).properties().dataUri()); - Assertions.assertEquals("cvlerchpqbmfpjba", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index b8ab3cf6f434..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -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 reactor.core.publisher.Mono; - -public final class DataVersionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"znqqkqxkdglse\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"yakr\",\"tags\":{\"nnvxouhdcf\":\"nwgokrllbec\",\"g\":\"ptfcjapmfwxmcxhw\",\"mgadhmqyufpfo\":\"hifoyo\"},\"properties\":{\"qcypm\":\"ylszrtng\",\"cigcbmayhdtjfrp\":\"nfcorcnhf\"}},\"id\":\"ajzdj\",\"name\":\"zbrwrfrmhouf\",\"type\":\"krbgvojcks\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataVersionBase response = manager.dataVersions() - .define("rru") - .withExistingData("rucwzc", "judhgw", "qeglym") - .withProperties(new DataVersionBaseProperties().withDescription("lfi") - .withTags(mapOf("e", "nnyxwdpm")) - .withProperties(mapOf("mmvdpavc", "vzxgbamqrbbsnp", "wdtunpcskdlrfo", "kbyjuwhizcbqjxm")) - .withIsArchived(false) - .withIsAnonymous(true) - .withDataUri("sqpiyxkmqm")) - .create(); - - Assertions.assertEquals("yakr", response.properties().description()); - Assertions.assertEquals("nwgokrllbec", response.properties().tags().get("nnvxouhdcf")); - Assertions.assertEquals("ylszrtng", response.properties().properties().get("qcypm")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("znqqkqxkdglse", response.properties().dataUri()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteWithResponseMockTests.java deleted file mode 100644 index 7f7676139156..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DataVersionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.dataVersions() - .deleteWithResponse("nm", "niqw", "qxyxfknjqss", "nwvravntv", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetWithResponseMockTests.java deleted file mode 100644 index c9eaabcf88c1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DataVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"regykjmpad\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"hcz\",\"tags\":{\"af\":\"itydljgrpq\",\"sihumwafapctglj\":\"gjqqbactffxdb\",\"qdd\":\"pizqqihvbkufq\",\"ajlfpsvrljlhe\":\"ynpgomzmkj\"},\"properties\":{\"bnwitafjjevp\":\"cp\",\"vkparskplqft\":\"vitghzq\"}},\"id\":\"xqmbsu\",\"name\":\"cykgulellfwrmsux\",\"type\":\"qbmqo\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataVersionBase response = manager.dataVersions() - .getWithResponse("lkwqisnlpaymket", "tkt", "mewwlkryz", "pgqqdhtctx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hcz", response.properties().description()); - Assertions.assertEquals("itydljgrpq", response.properties().tags().get("af")); - Assertions.assertEquals("cp", response.properties().properties().get("bnwitafjjevp")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("regykjmpad", response.properties().dataUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListMockTests.java deleted file mode 100644 index 5ad27d199a95..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DataVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"rwpekiprjb\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"airpwj\",\"tags\":{\"jtvqopugrsergiuz\":\"iwsywp\",\"mcbcen\":\"qefzypult\"},\"properties\":{\"kiynbf\":\"huepikwcxoasgukq\",\"irgyutexnzh\":\"kiwmqnwmytcc\",\"ybfarkhkoqcudn\":\"mcgvjb\"}},\"id\":\"oyh\",\"name\":\"pjj\",\"type\":\"qnzcbjfpxoy\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.dataVersions() - .list("qcqyzmrtfdl", "pryyjlikalbcyu", "ahwzagvai", "zcephnhnu", 213380066, "y", "zkhi", ListViewType.ALL, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("airpwj", response.iterator().next().properties().description()); - Assertions.assertEquals("iwsywp", response.iterator().next().properties().tags().get("jtvqopugrsergiuz")); - Assertions.assertEquals("huepikwcxoasgukq", response.iterator().next().properties().properties().get("kiynbf")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(false, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("rwpekiprjb", response.iterator().next().properties().dataUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishMockTests.java deleted file mode 100644 index 6f8faf3bda78..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DataVersionsPublishMockTests { - @Test - public void testPublish() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.dataVersions() - .publish("bxlpkdsnbqoy", "sdlraduhgwaxz", "rppoy", "ijribeskkopbksri", - new DestinationAsset().withRegistryName("btmorikczerq") - .withDestinationName("qxgwsfr") - .withDestinationVersion("vzlljydgmdoq"), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteWithResponseMockTests.java deleted file mode 100644 index d5b7636b4f1d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DatastoresDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.datastores() - .deleteWithResponse("ecmgukywdpuowl", "ex", "rpitqzqnbseujc", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DefaultScaleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DefaultScaleSettingsTests.java deleted file mode 100644 index a69cbaa8189d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DefaultScaleSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DefaultScaleSettings; - -public final class DefaultScaleSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DefaultScaleSettings model - = BinaryData.fromString("{\"scaleType\":\"Default\"}").toObject(DefaultScaleSettings.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultScaleSettings model = new DefaultScaleSettings(); - model = BinaryData.fromObject(model).toObject(DefaultScaleSettings.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsInnerTests.java deleted file mode 100644 index 8359ffb10cb9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner; -import org.junit.jupiter.api.Assertions; - -public final class DeploymentLogsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeploymentLogsInner model = BinaryData.fromString("{\"content\":\"jqu\"}").toObject(DeploymentLogsInner.class); - Assertions.assertEquals("jqu", model.content()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentLogsInner model = new DeploymentLogsInner().withContent("jqu"); - model = BinaryData.fromObject(model).toObject(DeploymentLogsInner.class); - Assertions.assertEquals("jqu", model.content()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsRequestTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsRequestTests.java deleted file mode 100644 index c1d1f13e5173..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsRequestTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ContainerType; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -import org.junit.jupiter.api.Assertions; - -public final class DeploymentLogsRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeploymentLogsRequest model - = BinaryData.fromString("{\"containerType\":\"InferenceServer\",\"tail\":1245703985}") - .toObject(DeploymentLogsRequest.class); - Assertions.assertEquals(ContainerType.INFERENCE_SERVER, model.containerType()); - Assertions.assertEquals(1245703985, model.tail()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentLogsRequest model - = new DeploymentLogsRequest().withContainerType(ContainerType.INFERENCE_SERVER).withTail(1245703985); - model = BinaryData.fromObject(model).toObject(DeploymentLogsRequest.class); - Assertions.assertEquals(ContainerType.INFERENCE_SERVER, model.containerType()); - Assertions.assertEquals(1245703985, model.tail()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentResourceConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentResourceConfigurationTests.java deleted file mode 100644 index 73911b21f725..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentResourceConfigurationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DeploymentResourceConfiguration; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DeploymentResourceConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeploymentResourceConfiguration model = BinaryData.fromString( - "{\"instanceCount\":1387875327,\"instanceType\":\"qaclnapxbiy\",\"properties\":{\"smfcttuxuuyilfl\":\"datagjkn\",\"jztczytqj\":\"dataoiquvrehmrnjhvs\"}}") - .toObject(DeploymentResourceConfiguration.class); - Assertions.assertEquals(1387875327, model.instanceCount()); - Assertions.assertEquals("qaclnapxbiy", model.instanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentResourceConfiguration model = new DeploymentResourceConfiguration().withInstanceCount(1387875327) - .withInstanceType("qaclnapxbiy") - .withProperties(mapOf("smfcttuxuuyilfl", "datagjkn", "jztczytqj", "dataoiquvrehmrnjhvs")); - model = BinaryData.fromObject(model).toObject(DeploymentResourceConfiguration.class); - Assertions.assertEquals(1387875327, model.instanceCount()); - Assertions.assertEquals("qaclnapxbiy", model.instanceType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DestinationAssetTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DestinationAssetTests.java deleted file mode 100644 index 82e343493aac..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DestinationAssetTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import org.junit.jupiter.api.Assertions; - -public final class DestinationAssetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DestinationAsset model = BinaryData - .fromString("{\"registryName\":\"yp\",\"destinationName\":\"ubcpzgpxti\",\"destinationVersion\":\"j\"}") - .toObject(DestinationAsset.class); - Assertions.assertEquals("yp", model.registryName()); - Assertions.assertEquals("ubcpzgpxti", model.destinationName()); - Assertions.assertEquals("j", model.destinationVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DestinationAsset model = new DestinationAsset().withRegistryName("yp") - .withDestinationName("ubcpzgpxti") - .withDestinationVersion("j"); - model = BinaryData.fromObject(model).toObject(DestinationAsset.class); - Assertions.assertEquals("yp", model.registryName()); - Assertions.assertEquals("ubcpzgpxti", model.destinationName()); - Assertions.assertEquals("j", model.destinationVersion()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistributionConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistributionConfigurationTests.java deleted file mode 100644 index c442a9b66836..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistributionConfigurationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DistributionConfiguration; - -public final class DistributionConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DistributionConfiguration model = BinaryData.fromString("{\"distributionType\":\"DistributionConfiguration\"}") - .toObject(DistributionConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DistributionConfiguration model = new DistributionConfiguration(); - model = BinaryData.fromObject(model).toObject(DistributionConfiguration.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DockerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DockerTests.java deleted file mode 100644 index 6019b7dcfc0f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DockerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Docker; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DockerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Docker model = BinaryData.fromString( - "{\"privileged\":true,\"\":{\"vzadbwenn\":\"datadrwjcljbrhlh\",\"vztiucwviqllukh\":\"datanafhxrzfr\",\"po\":\"datarcqxgcbvzarmqc\",\"vjyhdrxbrdvc\":\"datastsinvag\"}}") - .toObject(Docker.class); - Assertions.assertEquals(true, model.privileged()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Docker model = new Docker().withPrivileged(true).withAdditionalProperties(mapOf()); - model = BinaryData.fromObject(model).toObject(Docker.class); - Assertions.assertEquals(true, model.privileged()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EarlyTerminationPolicyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EarlyTerminationPolicyTests.java deleted file mode 100644 index 577e22528c92..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EarlyTerminationPolicyTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import org.junit.jupiter.api.Assertions; - -public final class EarlyTerminationPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EarlyTerminationPolicy model = BinaryData.fromString( - "{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":1134110366,\"delayEvaluation\":1352080232}") - .toObject(EarlyTerminationPolicy.class); - Assertions.assertEquals(1134110366, model.evaluationInterval()); - Assertions.assertEquals(1352080232, model.delayEvaluation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EarlyTerminationPolicy model - = new EarlyTerminationPolicy().withEvaluationInterval(1134110366).withDelayEvaluation(1352080232); - model = BinaryData.fromObject(model).toObject(EarlyTerminationPolicy.class); - Assertions.assertEquals(1134110366, model.evaluationInterval()); - Assertions.assertEquals(1352080232, model.delayEvaluation()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointScheduleActionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointScheduleActionTests.java deleted file mode 100644 index 1f528f275e97..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointScheduleActionTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EndpointScheduleAction; - -public final class EndpointScheduleActionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EndpointScheduleAction model = BinaryData - .fromString( - "{\"actionType\":\"InvokeBatchEndpoint\",\"endpointInvocationDefinition\":\"datarvvbqvknmpecqxg\"}") - .toObject(EndpointScheduleAction.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EndpointScheduleAction model - = new EndpointScheduleAction().withEndpointInvocationDefinition("datarvvbqvknmpecqxg"); - model = BinaryData.fromObject(model).toObject(EndpointScheduleAction.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointTests.java deleted file mode 100644 index a321709e936d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Endpoint; -import com.azure.resourcemanager.machinelearning.models.Protocol; -import org.junit.jupiter.api.Assertions; - -public final class EndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Endpoint model = BinaryData.fromString( - "{\"protocol\":\"udp\",\"name\":\"hitxnm\",\"target\":2115255313,\"published\":1374259249,\"hostIp\":\"zbuwvorbalkjnbk\"}") - .toObject(Endpoint.class); - Assertions.assertEquals(Protocol.UDP, model.protocol()); - Assertions.assertEquals("hitxnm", model.name()); - Assertions.assertEquals(2115255313, model.target()); - Assertions.assertEquals(1374259249, model.published()); - Assertions.assertEquals("zbuwvorbalkjnbk", model.hostIp()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Endpoint model = new Endpoint().withProtocol(Protocol.UDP) - .withName("hitxnm") - .withTarget(2115255313) - .withPublished(1374259249) - .withHostIp("zbuwvorbalkjnbk"); - model = BinaryData.fromObject(model).toObject(Endpoint.class); - Assertions.assertEquals(Protocol.UDP, model.protocol()); - Assertions.assertEquals("hitxnm", model.name()); - Assertions.assertEquals(2115255313, model.target()); - Assertions.assertEquals(1374259249, model.published()); - Assertions.assertEquals("zbuwvorbalkjnbk", model.hostIp()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerInnerTests.java deleted file mode 100644 index 934b9efddeee..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentContainerInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"isArchived\":false,\"latestVersion\":\"ieypef\",\"nextVersion\":\"yqdhcuplcplcw\",\"description\":\"ihih\",\"tags\":{\"gmvecactxmw\":\"dsqtzbsrgnowcjh\",\"ovekqvgqouwi\":\"teyowclu\",\"ikf\":\"zmpjwyiv\",\"uagrttikteusqc\":\"cvhrfsp\"},\"properties\":{\"qcuubgqibrta\":\"yklxubyjaffmmfbl\",\"lqxihhrmooiz\":\"metttwgd\"}},\"id\":\"eypxiutcxapzhyr\",\"name\":\"etoge\",\"type\":\"joxslhvnhla\"}") - .toObject(EnvironmentContainerInner.class); - Assertions.assertEquals("ihih", model.properties().description()); - Assertions.assertEquals("dsqtzbsrgnowcjh", model.properties().tags().get("gmvecactxmw")); - Assertions.assertEquals("yklxubyjaffmmfbl", model.properties().properties().get("qcuubgqibrta")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentContainerInner model = new EnvironmentContainerInner() - .withProperties(new EnvironmentContainerProperties().withDescription("ihih") - .withTags(mapOf("gmvecactxmw", "dsqtzbsrgnowcjh", "ovekqvgqouwi", "teyowclu", "ikf", "zmpjwyiv", - "uagrttikteusqc", "cvhrfsp")) - .withProperties(mapOf("qcuubgqibrta", "yklxubyjaffmmfbl", "lqxihhrmooiz", "metttwgd")) - .withIsArchived(false)); - model = BinaryData.fromObject(model).toObject(EnvironmentContainerInner.class); - Assertions.assertEquals("ihih", model.properties().description()); - Assertions.assertEquals("dsqtzbsrgnowcjh", model.properties().tags().get("gmvecactxmw")); - Assertions.assertEquals("yklxubyjaffmmfbl", model.properties().properties().get("qcuubgqibrta")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerPropertiesTests.java deleted file mode 100644 index a9fb13e515dd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentContainerProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"zjcjbtr\",\"nextVersion\":\"ehvvib\",\"description\":\"jj\",\"tags\":{\"lftidgfcwqmpim\":\"qbeitpkxztmoob\",\"yhohujswtwkozzwc\":\"qxzhem\",\"wpfaj\":\"lkb\"},\"properties\":{\"vkcdmxzr\":\"ltlwtjjguktalhs\",\"aaomylweazu\":\"oaimlnw\",\"hwwn\":\"cse\",\"ousnfepgfewe\":\"jhlfzswpchwahf\"}}") - .toObject(EnvironmentContainerProperties.class); - Assertions.assertEquals("jj", model.description()); - Assertions.assertEquals("qbeitpkxztmoob", model.tags().get("lftidgfcwqmpim")); - Assertions.assertEquals("ltlwtjjguktalhs", model.properties().get("vkcdmxzr")); - Assertions.assertEquals(true, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentContainerProperties model = new EnvironmentContainerProperties().withDescription("jj") - .withTags(mapOf("lftidgfcwqmpim", "qbeitpkxztmoob", "yhohujswtwkozzwc", "qxzhem", "wpfaj", "lkb")) - .withProperties(mapOf("vkcdmxzr", "ltlwtjjguktalhs", "aaomylweazu", "oaimlnw", "hwwn", "cse", - "ousnfepgfewe", "jhlfzswpchwahf")) - .withIsArchived(true); - model = BinaryData.fromObject(model).toObject(EnvironmentContainerProperties.class); - Assertions.assertEquals("jj", model.description()); - Assertions.assertEquals("qbeitpkxztmoob", model.tags().get("lftidgfcwqmpim")); - Assertions.assertEquals("ltlwtjjguktalhs", model.properties().get("vkcdmxzr")); - Assertions.assertEquals(true, model.isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index 07f37acf4096..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentContainerResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"qvkjlmxho\",\"nextVersion\":\"ynhdwdigum\",\"description\":\"raauzzpt\",\"tags\":{\"wva\":\"ysdzhez\",\"hqyikvy\":\"qyuvvfonkp\"},\"properties\":{\"jfybvpoekrsgsgb\":\"yavluwmncstt\"}},\"id\":\"uzqgnjdgkynsc\",\"name\":\"i\",\"type\":\"hzvhxnkomtkubo\"},{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":true,\"latestVersion\":\"xz\",\"nextVersion\":\"ihfrbbcevqa\",\"description\":\"ltd\",\"tags\":{\"py\":\"kqo\",\"ymbrnysuxmpraf\":\"vgtrdcnifmzzs\"},\"properties\":{\"roud\":\"khocxvdfffwaf\"}},\"id\":\"pavehhr\",\"name\":\"kbunzoz\",\"type\":\"dhcxgkmoy\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"bhmfdnbz\",\"nextVersion\":\"vfvfcj\",\"description\":\"eoisrvhmgor\",\"tags\":{\"faxvxil\":\"kiscvwmzhwpl\",\"nzeyqxtjj\":\"btgn\",\"vodggxdbee\":\"zqlqhyc\"},\"properties\":{\"iaa\":\"eknlra\",\"agt\":\"iuagydwqfbylyrfg\"}},\"id\":\"jocqwogfnzjvusf\",\"name\":\"ld\",\"type\":\"ozuxylfsbtkadpys\"}],\"nextLink\":\"nbtgkbugrjqctoj\"}") - .toObject(EnvironmentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("raauzzpt", model.value().get(0).properties().description()); - Assertions.assertEquals("ysdzhez", model.value().get(0).properties().tags().get("wva")); - Assertions.assertEquals("yavluwmncstt", model.value().get(0).properties().properties().get("jfybvpoekrsgsgb")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("nbtgkbugrjqctoj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentContainerResourceArmPaginatedResult model - = new EnvironmentContainerResourceArmPaginatedResult().withValue(Arrays.asList( - new EnvironmentContainerInner() - .withProperties(new EnvironmentContainerProperties().withDescription("raauzzpt") - .withTags(mapOf("wva", "ysdzhez", "hqyikvy", "qyuvvfonkp")) - .withProperties(mapOf("jfybvpoekrsgsgb", "yavluwmncstt")) - .withIsArchived(true)), - new EnvironmentContainerInner() - .withProperties(new EnvironmentContainerProperties().withDescription("ltd") - .withTags(mapOf("py", "kqo", "ymbrnysuxmpraf", "vgtrdcnifmzzs")) - .withProperties(mapOf("roud", "khocxvdfffwaf")) - .withIsArchived(true)), - new EnvironmentContainerInner() - .withProperties(new EnvironmentContainerProperties().withDescription("eoisrvhmgor") - .withTags(mapOf("faxvxil", "kiscvwmzhwpl", "nzeyqxtjj", "btgn", "vodggxdbee", "zqlqhyc")) - .withProperties(mapOf("iaa", "eknlra", "agt", "iuagydwqfbylyrfg")) - .withIsArchived(true)))) - .withNextLink("nbtgkbugrjqctoj"); - model = BinaryData.fromObject(model).toObject(EnvironmentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("raauzzpt", model.value().get(0).properties().description()); - Assertions.assertEquals("ysdzhez", model.value().get(0).properties().tags().get("wva")); - Assertions.assertEquals("yavluwmncstt", model.value().get(0).properties().properties().get("jfybvpoekrsgsgb")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("nbtgkbugrjqctoj", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 90da11514061..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -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 reactor.core.publisher.Mono; - -public final class EnvironmentContainersCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"ydemccqdssbmge\",\"nextVersion\":\"dudh\",\"description\":\"smnfgzmxtxfuhxy\",\"tags\":{\"e\":\"y\",\"sffrpjfxsyx\":\"cknglffnozzf\",\"ufrspreyilqcskxk\":\"dosyhhw\"},\"properties\":{\"dimnacklyrbv\":\"ykqrqtxqogr\"}},\"id\":\"dgexpnphtqwfpjp\",\"name\":\"b\",\"type\":\"x\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentContainer response = manager.environmentContainers() - .define("emqcbnkiv") - .withExistingWorkspace("nqlwogq", "bjuaiu") - .withProperties(new EnvironmentContainerProperties().withDescription("dmxokbutb") - .withTags(mapOf("ayvcsejdh", "x", "oppybseckgaxmhas", "odyiitreddjt", "st", "jiet")) - .withProperties(mapOf("wrjtkrei", "dvzcnlk", "swmgrbkobmg", "ojh", "widteb", "avzmqpaa", "r", "ed")) - .withIsArchived(true)) - .create(); - - Assertions.assertEquals("smnfgzmxtxfuhxy", response.properties().description()); - Assertions.assertEquals("y", response.properties().tags().get("e")); - Assertions.assertEquals("ykqrqtxqogr", response.properties().properties().get("dimnacklyrbv")); - Assertions.assertEquals(true, response.properties().isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteWithResponseMockTests.java deleted file mode 100644 index bc3e7538876e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EnvironmentContainersDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.environmentContainers() - .deleteWithResponse("bwlbqn", "dderrxyiwuzpsvcm", "sfstyyy", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetWithResponseMockTests.java deleted file mode 100644 index 4f6fe4157fb6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EnvironmentContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"kzqbvhvdulymkg\",\"nextVersion\":\"ryhxf\",\"description\":\"a\",\"tags\":{\"ghps\":\"ftkgmbmvxbiub\",\"rbusnaq\":\"tbame\",\"erlurgipvnbxle\":\"vruuhyncppmmwh\",\"gpxd\":\"smc\"},\"properties\":{\"iihrfcowlase\":\"qmguvdk\",\"vf\":\"ifywxjjylaqhx\"}},\"id\":\"rvjhwgkynxlwrj\",\"name\":\"otdtmcktkal\",\"type\":\"piybfnkylzri\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentContainer response = manager.environmentContainers() - .getWithResponse("qnwnlc", "zfjd", "kfthsydphdb", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("a", response.properties().description()); - Assertions.assertEquals("ftkgmbmvxbiub", response.properties().tags().get("ghps")); - Assertions.assertEquals("qmguvdk", response.properties().properties().get("iihrfcowlase")); - Assertions.assertEquals(true, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListMockTests.java deleted file mode 100644 index 70fd11b82ea7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EnvironmentContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"ucqehyrnzmj\",\"nextVersion\":\"fbmpszwk\",\"description\":\"stzu\",\"tags\":{\"smaxdwxr\":\"a\",\"akxy\":\"qtbvwsd\",\"u\":\"lkgjhomywlypghhu\",\"b\":\"yfvgpqwgiqmbrisk\"},\"properties\":{\"vyqmmczuguvlieeg\":\"tq\",\"jscgqcr\":\"nqwhfjoxse\",\"uhffjjqvjyqmpmsk\":\"aucftotedhjxdl\",\"udpypboqlefxf\":\"axrhljwqu\"}},\"id\":\"majvwfi\",\"name\":\"f\",\"type\":\"jjrvsvhmsmrihdd\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.environmentContainers() - .list("nvpdvctqdapy", "sfp", "pj", ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("stzu", response.iterator().next().properties().description()); - Assertions.assertEquals("a", response.iterator().next().properties().tags().get("smaxdwxr")); - Assertions.assertEquals("tq", response.iterator().next().properties().properties().get("vyqmmczuguvlieeg")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVariableTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVariableTests.java deleted file mode 100644 index 5973cdb59f71..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVariableTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVariable; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentVariableTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentVariable model = BinaryData.fromString( - "{\"type\":\"local\",\"value\":\"vbgikyj\",\"\":{\"kaoizjixw\":\"datakvlbishjvpzaptuo\",\"c\":\"datagcdiyk\",\"tmdmuqohhihr\":\"datawnujvqynvav\"}}") - .toObject(EnvironmentVariable.class); - Assertions.assertEquals(EnvironmentVariableType.LOCAL, model.type()); - Assertions.assertEquals("vbgikyj", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVariable model = new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("vbgikyj") - .withAdditionalProperties(mapOf()); - model = BinaryData.fromObject(model).toObject(EnvironmentVariable.class); - Assertions.assertEquals(EnvironmentVariableType.LOCAL, model.type()); - Assertions.assertEquals("vbgikyj", model.value()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionInnerTests.java deleted file mode 100644 index bd369e06db74..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import com.azure.resourcemanager.machinelearning.models.Route; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentVersionInner model = BinaryData.fromString( - "{\"properties\":{\"environmentType\":\"UserCreated\",\"image\":\"fhqlyvi\",\"condaFile\":\"uwivkxoy\",\"build\":{\"contextUri\":\"nbixxrti\",\"dockerfilePath\":\"cpwpg\"},\"osType\":\"Linux\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"vtsoxf\",\"port\":967528675},\"readinessRoute\":{\"path\":\"nxpmyyefrpmpdnq\",\"port\":663766748},\"scoringRoute\":{\"path\":\"awaoqvmmbnpqfrt\",\"port\":1516123032}},\"autoRebuild\":\"OnBaseImageUpdate\",\"provisioningState\":\"Canceled\",\"stage\":\"nitgvkxlz\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"gcealzxwh\",\"tags\":{\"lwigdivbkbx\":\"symoyq\",\"wasqvdaeyyg\":\"omfaj\",\"zkgimsid\":\"xakjsqzhzb\",\"ddyvvjskgfmo\":\"asi\"},\"properties\":{\"hnakzyb\":\"hpqgatjeaahhvj\"}},\"id\":\"jid\",\"name\":\"ksyxkyxvxevblbje\",\"type\":\"nljlageuaulx\"}") - .toObject(EnvironmentVersionInner.class); - Assertions.assertEquals("gcealzxwh", model.properties().description()); - Assertions.assertEquals("symoyq", model.properties().tags().get("lwigdivbkbx")); - Assertions.assertEquals("hpqgatjeaahhvj", model.properties().properties().get("hnakzyb")); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals("fhqlyvi", model.properties().image()); - Assertions.assertEquals("uwivkxoy", model.properties().condaFile()); - Assertions.assertEquals("nbixxrti", model.properties().build().contextUri()); - Assertions.assertEquals("cpwpg", model.properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.LINUX, model.properties().osType()); - Assertions.assertEquals("vtsoxf", model.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(967528675, model.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("nxpmyyefrpmpdnq", model.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(663766748, model.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("awaoqvmmbnpqfrt", model.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(1516123032, model.properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, model.properties().autoRebuild()); - Assertions.assertEquals("nitgvkxlz", model.properties().stage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVersionInner model = new EnvironmentVersionInner().withProperties(new EnvironmentVersionProperties() - .withDescription("gcealzxwh") - .withTags( - mapOf("lwigdivbkbx", "symoyq", "wasqvdaeyyg", "omfaj", "zkgimsid", "xakjsqzhzb", "ddyvvjskgfmo", "asi")) - .withProperties(mapOf("hnakzyb", "hpqgatjeaahhvj")) - .withIsArchived(false) - .withIsAnonymous(false) - .withImage("fhqlyvi") - .withCondaFile("uwivkxoy") - .withBuild(new BuildContext().withContextUri("nbixxrti").withDockerfilePath("cpwpg")) - .withOsType(OperatingSystemType.LINUX) - .withInferenceConfig( - new InferenceContainerProperties().withLivenessRoute(new Route().withPath("vtsoxf").withPort(967528675)) - .withReadinessRoute(new Route().withPath("nxpmyyefrpmpdnq").withPort(663766748)) - .withScoringRoute(new Route().withPath("awaoqvmmbnpqfrt").withPort(1516123032))) - .withAutoRebuild(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE) - .withStage("nitgvkxlz")); - model = BinaryData.fromObject(model).toObject(EnvironmentVersionInner.class); - Assertions.assertEquals("gcealzxwh", model.properties().description()); - Assertions.assertEquals("symoyq", model.properties().tags().get("lwigdivbkbx")); - Assertions.assertEquals("hpqgatjeaahhvj", model.properties().properties().get("hnakzyb")); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals("fhqlyvi", model.properties().image()); - Assertions.assertEquals("uwivkxoy", model.properties().condaFile()); - Assertions.assertEquals("nbixxrti", model.properties().build().contextUri()); - Assertions.assertEquals("cpwpg", model.properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.LINUX, model.properties().osType()); - Assertions.assertEquals("vtsoxf", model.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(967528675, model.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("nxpmyyefrpmpdnq", model.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(663766748, model.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("awaoqvmmbnpqfrt", model.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(1516123032, model.properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, model.properties().autoRebuild()); - Assertions.assertEquals("nitgvkxlz", model.properties().stage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionPropertiesTests.java deleted file mode 100644 index 43045b113823..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import com.azure.resourcemanager.machinelearning.models.Route; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentVersionProperties model = BinaryData.fromString( - "{\"environmentType\":\"UserCreated\",\"image\":\"jbnkpp\",\"condaFile\":\"nenlsvxeizzg\",\"build\":{\"contextUri\":\"lnsrmffe\",\"dockerfilePath\":\"xcktpiymerteeamm\"},\"osType\":\"Windows\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"kkzddrtkgdojbmx\",\"port\":37780018},\"readinessRoute\":{\"path\":\"refdee\",\"port\":2124341165},\"scoringRoute\":{\"path\":\"cuijpxt\",\"port\":214563643}},\"autoRebuild\":\"Disabled\",\"provisioningState\":\"Creating\",\"stage\":\"ujwsawddjibabxvi\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"eexavo\",\"tags\":{\"gsfjac\":\"glecdmdqbwpypq\",\"d\":\"slhhxudbxv\",\"ud\":\"tnsi\"},\"properties\":{\"kdlpa\":\"mes\"}}") - .toObject(EnvironmentVersionProperties.class); - Assertions.assertEquals("eexavo", model.description()); - Assertions.assertEquals("glecdmdqbwpypq", model.tags().get("gsfjac")); - Assertions.assertEquals("mes", model.properties().get("kdlpa")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("jbnkpp", model.image()); - Assertions.assertEquals("nenlsvxeizzg", model.condaFile()); - Assertions.assertEquals("lnsrmffe", model.build().contextUri()); - Assertions.assertEquals("xcktpiymerteeamm", model.build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, model.osType()); - Assertions.assertEquals("kkzddrtkgdojbmx", model.inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(37780018, model.inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("refdee", model.inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(2124341165, model.inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("cuijpxt", model.inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(214563643, model.inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.DISABLED, model.autoRebuild()); - Assertions.assertEquals("ujwsawddjibabxvi", model.stage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVersionProperties model = new EnvironmentVersionProperties().withDescription("eexavo") - .withTags(mapOf("gsfjac", "glecdmdqbwpypq", "d", "slhhxudbxv", "ud", "tnsi")) - .withProperties(mapOf("kdlpa", "mes")) - .withIsArchived(true) - .withIsAnonymous(false) - .withImage("jbnkpp") - .withCondaFile("nenlsvxeizzg") - .withBuild(new BuildContext().withContextUri("lnsrmffe").withDockerfilePath("xcktpiymerteeamm")) - .withOsType(OperatingSystemType.WINDOWS) - .withInferenceConfig(new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("kkzddrtkgdojbmx").withPort(37780018)) - .withReadinessRoute(new Route().withPath("refdee").withPort(2124341165)) - .withScoringRoute(new Route().withPath("cuijpxt").withPort(214563643))) - .withAutoRebuild(AutoRebuildSetting.DISABLED) - .withStage("ujwsawddjibabxvi"); - model = BinaryData.fromObject(model).toObject(EnvironmentVersionProperties.class); - Assertions.assertEquals("eexavo", model.description()); - Assertions.assertEquals("glecdmdqbwpypq", model.tags().get("gsfjac")); - Assertions.assertEquals("mes", model.properties().get("kdlpa")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("jbnkpp", model.image()); - Assertions.assertEquals("nenlsvxeizzg", model.condaFile()); - Assertions.assertEquals("lnsrmffe", model.build().contextUri()); - Assertions.assertEquals("xcktpiymerteeamm", model.build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, model.osType()); - Assertions.assertEquals("kkzddrtkgdojbmx", model.inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(37780018, model.inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("refdee", model.inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(2124341165, model.inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("cuijpxt", model.inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(214563643, model.inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.DISABLED, model.autoRebuild()); - Assertions.assertEquals("ujwsawddjibabxvi", model.stage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionResourceArmPaginatedResultTests.java deleted file mode 100644 index 0434e39dbaa5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import com.azure.resourcemanager.machinelearning.models.Route; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentVersionResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentVersionResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"environmentType\":\"Curated\",\"image\":\"ncxykxhdjhlimm\",\"condaFile\":\"x\",\"build\":{\"contextUri\":\"bcporxvxcjzhqizx\",\"dockerfilePath\":\"xtgqscjavftjuh\"},\"osType\":\"Windows\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"mtggu\",\"port\":1404234385},\"readinessRoute\":{\"path\":\"jrajcivm\",\"port\":1977689221},\"scoringRoute\":{\"path\":\"f\",\"port\":2030059777}},\"autoRebuild\":\"OnBaseImageUpdate\",\"provisioningState\":\"Deleting\",\"stage\":\"kneuvyinzqo\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"hoxgsgbpf\",\"tags\":{\"lgafcqusrdve\":\"jtxvzflbqvgaq\",\"uzhyrmewipmvekdx\":\"nwsdtutnwlduyc\",\"zhhzjhfjmhvvmu\":\"kuqgsjjxundxgket\"},\"properties\":{\"qsxvmhf\":\"mun\",\"yue\":\"uzjyihsasbhudypo\"}},\"id\":\"lynsqyrpf\",\"name\":\"obrltt\",\"type\":\"msjnygqdnfw\"}],\"nextLink\":\"dzgtil\"}") - .toObject(EnvironmentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("hoxgsgbpf", model.value().get(0).properties().description()); - Assertions.assertEquals("jtxvzflbqvgaq", model.value().get(0).properties().tags().get("lgafcqusrdve")); - Assertions.assertEquals("mun", model.value().get(0).properties().properties().get("qsxvmhf")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("ncxykxhdjhlimm", model.value().get(0).properties().image()); - Assertions.assertEquals("x", model.value().get(0).properties().condaFile()); - Assertions.assertEquals("bcporxvxcjzhqizx", model.value().get(0).properties().build().contextUri()); - Assertions.assertEquals("xtgqscjavftjuh", model.value().get(0).properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, model.value().get(0).properties().osType()); - Assertions.assertEquals("mtggu", model.value().get(0).properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1404234385, model.value().get(0).properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("jrajcivm", - model.value().get(0).properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(1977689221, - model.value().get(0).properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("f", model.value().get(0).properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(2030059777, model.value().get(0).properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, - model.value().get(0).properties().autoRebuild()); - Assertions.assertEquals("kneuvyinzqo", model.value().get(0).properties().stage()); - Assertions.assertEquals("dzgtil", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVersionResourceArmPaginatedResult model = new EnvironmentVersionResourceArmPaginatedResult() - .withValue(Arrays.asList(new EnvironmentVersionInner().withProperties(new EnvironmentVersionProperties() - .withDescription("hoxgsgbpf") - .withTags(mapOf("lgafcqusrdve", "jtxvzflbqvgaq", "uzhyrmewipmvekdx", "nwsdtutnwlduyc", "zhhzjhfjmhvvmu", - "kuqgsjjxundxgket")) - .withProperties(mapOf("qsxvmhf", "mun", "yue", "uzjyihsasbhudypo")) - .withIsArchived(true) - .withIsAnonymous(false) - .withImage("ncxykxhdjhlimm") - .withCondaFile("x") - .withBuild(new BuildContext().withContextUri("bcporxvxcjzhqizx").withDockerfilePath("xtgqscjavftjuh")) - .withOsType(OperatingSystemType.WINDOWS) - .withInferenceConfig(new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("mtggu").withPort(1404234385)) - .withReadinessRoute(new Route().withPath("jrajcivm").withPort(1977689221)) - .withScoringRoute(new Route().withPath("f").withPort(2030059777))) - .withAutoRebuild(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE) - .withStage("kneuvyinzqo")))) - .withNextLink("dzgtil"); - model = BinaryData.fromObject(model).toObject(EnvironmentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("hoxgsgbpf", model.value().get(0).properties().description()); - Assertions.assertEquals("jtxvzflbqvgaq", model.value().get(0).properties().tags().get("lgafcqusrdve")); - Assertions.assertEquals("mun", model.value().get(0).properties().properties().get("qsxvmhf")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("ncxykxhdjhlimm", model.value().get(0).properties().image()); - Assertions.assertEquals("x", model.value().get(0).properties().condaFile()); - Assertions.assertEquals("bcporxvxcjzhqizx", model.value().get(0).properties().build().contextUri()); - Assertions.assertEquals("xtgqscjavftjuh", model.value().get(0).properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, model.value().get(0).properties().osType()); - Assertions.assertEquals("mtggu", model.value().get(0).properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1404234385, model.value().get(0).properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("jrajcivm", - model.value().get(0).properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(1977689221, - model.value().get(0).properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("f", model.value().get(0).properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(2030059777, model.value().get(0).properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, - model.value().get(0).properties().autoRebuild()); - Assertions.assertEquals("kneuvyinzqo", model.value().get(0).properties().stage()); - Assertions.assertEquals("dzgtil", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index e73e506273ca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import com.azure.resourcemanager.machinelearning.models.Route; -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 reactor.core.publisher.Mono; - -public final class EnvironmentVersionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"environmentType\":\"UserCreated\",\"image\":\"jgrepbrbmc\",\"condaFile\":\"vxjwpvqrexlui\",\"build\":{\"contextUri\":\"lqwbrfiovpdl\",\"dockerfilePath\":\"drfiwerlbcetrvir\"},\"osType\":\"Linux\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"wpvnloop\",\"port\":940990727},\"readinessRoute\":{\"path\":\"egchtabhacjlf\",\"port\":856600088},\"scoringRoute\":{\"path\":\"klvvwvpfqtpvzhml\",\"port\":474864730}},\"autoRebuild\":\"Disabled\",\"provisioningState\":\"Failed\",\"stage\":\"ffnsdmhawbx\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"hlewyroksayehf\",\"tags\":{\"tmdhbctk\":\"py\"},\"properties\":{\"hxope\":\"xzlphzujkqaxbe\",\"sykhdapxdiibjj\":\"el\",\"yhx\":\"uekhh\",\"ffajh\":\"uhhnrmmfzfkhfnz\"}},\"id\":\"bskgciedlqvpd\",\"name\":\"rlsmsrwlfgbu\",\"type\":\"gchjtpszcawf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentVersion response = manager.environmentVersions() - .define("lcbbu") - .withExistingEnvironment("vgjynuwcque", "anqdmmrodpgtblm", "blcbwvsqpea") - .withProperties(new EnvironmentVersionProperties().withDescription("oafdvxrlrsrfrxyl") - .withTags(mapOf("asnc", "pspipkpcvhqadj", "tkvoivcktjscjkex", "quixuqvat")) - .withProperties(mapOf("yunwmbfjjs", "yrcjgptxvz", "s", "eqvefnzvhmiwba", "ktytrivf", "fm")) - .withIsArchived(false) - .withIsAnonymous(true) - .withImage("girsfilxusyzcn") - .withCondaFile("vipeh") - .withBuild(new BuildContext().withContextUri("bburbxovgjipbnn").withDockerfilePath("sjxwjnw")) - .withOsType(OperatingSystemType.WINDOWS) - .withInferenceConfig(new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("hpyixibr").withPort(987704652)) - .withReadinessRoute(new Route().withPath("uzsojblyygftic").withPort(644261840)) - .withScoringRoute(new Route().withPath("rswqmteu").withPort(155856060))) - .withAutoRebuild(AutoRebuildSetting.DISABLED) - .withStage("otrbnvoe")) - .create(); - - Assertions.assertEquals("hlewyroksayehf", response.properties().description()); - Assertions.assertEquals("py", response.properties().tags().get("tmdhbctk")); - Assertions.assertEquals("xzlphzujkqaxbe", response.properties().properties().get("hxope")); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("jgrepbrbmc", response.properties().image()); - Assertions.assertEquals("vxjwpvqrexlui", response.properties().condaFile()); - Assertions.assertEquals("lqwbrfiovpdl", response.properties().build().contextUri()); - Assertions.assertEquals("drfiwerlbcetrvir", response.properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.LINUX, response.properties().osType()); - Assertions.assertEquals("wpvnloop", response.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(940990727, response.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("egchtabhacjlf", response.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(856600088, response.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("klvvwvpfqtpvzhml", response.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(474864730, response.properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.DISABLED, response.properties().autoRebuild()); - Assertions.assertEquals("ffnsdmhawbx", response.properties().stage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteWithResponseMockTests.java deleted file mode 100644 index e37cf57f79b7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EnvironmentVersionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.environmentVersions() - .deleteWithResponse("nypktgslkokqa", "gzcojgdq", "hzfec", "gpjnydkkgbvs", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetWithResponseMockTests.java deleted file mode 100644 index ae84875411a3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EnvironmentVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"environmentType\":\"Curated\",\"image\":\"yrpwzsmwgebpsk\",\"condaFile\":\"cifdvtwuncn\",\"build\":{\"contextUri\":\"yjwjmyubhtmlgjai\",\"dockerfilePath\":\"ymjdwirglqibj\"},\"osType\":\"Linux\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"w\",\"port\":375117512},\"readinessRoute\":{\"path\":\"bzfhu\",\"port\":1172708430},\"scoringRoute\":{\"path\":\"k\",\"port\":777274816}},\"autoRebuild\":\"OnBaseImageUpdate\",\"provisioningState\":\"Failed\",\"stage\":\"xxiglehylbna\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"hoem\",\"tags\":{\"vfgukrxumwdqwy\":\"mmpvo\",\"umhaeqboig\":\"nawzeleqpnkqxk\",\"fhivsytidzvvndp\":\"jxatwxiya\",\"uexhgdhpkplas\":\"w\"},\"properties\":{\"oiddv\":\"tqxfpfopekyzdzvh\",\"sifixolvny\":\"qyjekvzpqr\",\"bpwpuayx\":\"fut\"}},\"id\":\"piultybwwmj\",\"name\":\"smkjalorxeegiczr\",\"type\":\"n\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentVersion response = manager.environmentVersions() - .getWithResponse("ks", "gkvga", "nrhrqqiwfysujcv", "clgp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hoem", response.properties().description()); - Assertions.assertEquals("mmpvo", response.properties().tags().get("vfgukrxumwdqwy")); - Assertions.assertEquals("tqxfpfopekyzdzvh", response.properties().properties().get("oiddv")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals("yrpwzsmwgebpsk", response.properties().image()); - Assertions.assertEquals("cifdvtwuncn", response.properties().condaFile()); - Assertions.assertEquals("yjwjmyubhtmlgjai", response.properties().build().contextUri()); - Assertions.assertEquals("ymjdwirglqibj", response.properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.LINUX, response.properties().osType()); - Assertions.assertEquals("w", response.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(375117512, response.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("bzfhu", response.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(1172708430, response.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("k", response.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(777274816, response.properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, response.properties().autoRebuild()); - Assertions.assertEquals("xxiglehylbna", response.properties().stage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListMockTests.java deleted file mode 100644 index cf8dc11105fd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EnvironmentVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"environmentType\":\"UserCreated\",\"image\":\"aljomgzorprrap\",\"condaFile\":\"bjenylgebrsnvof\",\"build\":{\"contextUri\":\"zvbploazc\",\"dockerfilePath\":\"hgermm\"},\"osType\":\"Linux\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"uipsoawxugpu\",\"port\":1995117934},\"readinessRoute\":{\"path\":\"kwxzmuzg\",\"port\":1007623800},\"scoringRoute\":{\"path\":\"ygpbhauhej\",\"port\":803038260}},\"autoRebuild\":\"Disabled\",\"provisioningState\":\"Deleting\",\"stage\":\"xxzxwrnqwdjvlw\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"wsfxqc\",\"tags\":{\"cbciu\":\"ez\",\"jguzsyfwamhmeo\":\"gakmxgwwmavllp\",\"nzcufysalbjfkje\":\"xbzagwnompvyis\"},\"properties\":{\"ridipw\":\"zmh\",\"jqhjenbdupfp\":\"zjnnmpi\",\"rsfghyye\":\"losadjffl\"}},\"id\":\"adzu\",\"name\":\"dcccls\",\"type\":\"flcxxp\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.environmentVersions() - .list("iyapifcjl", "ugnrzowc", "r", "afqsozawqxnhlv", 633579364, "ugwxdwtfmfjk", ListViewType.ACTIVE_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wsfxqc", response.iterator().next().properties().description()); - Assertions.assertEquals("ez", response.iterator().next().properties().tags().get("cbciu")); - Assertions.assertEquals("zmh", response.iterator().next().properties().properties().get("ridipw")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(false, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("aljomgzorprrap", response.iterator().next().properties().image()); - Assertions.assertEquals("bjenylgebrsnvof", response.iterator().next().properties().condaFile()); - Assertions.assertEquals("zvbploazc", response.iterator().next().properties().build().contextUri()); - Assertions.assertEquals("hgermm", response.iterator().next().properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.LINUX, response.iterator().next().properties().osType()); - Assertions.assertEquals("uipsoawxugpu", - response.iterator().next().properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1995117934, - response.iterator().next().properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("kwxzmuzg", - response.iterator().next().properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(1007623800, - response.iterator().next().properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("ygpbhauhej", - response.iterator().next().properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(803038260, - response.iterator().next().properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.DISABLED, response.iterator().next().properties().autoRebuild()); - Assertions.assertEquals("xxzxwrnqwdjvlw", response.iterator().next().properties().stage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishMockTests.java deleted file mode 100644 index 9289a518c784..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EnvironmentVersionsPublishMockTests { - @Test - public void testPublish() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.environmentVersions() - .publish("zlcvndihkph", "zgkkucwmjmgsw", "w", "skuqgneorqtr", - new DestinationAsset().withRegistryName("eikqvaagnzbkqq") - .withDestinationName("cd") - .withDestinationVersion("csom"), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPriceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPriceTests.java deleted file mode 100644 index effb318ba179..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPriceTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrice; -import com.azure.resourcemanager.machinelearning.models.VMPriceOSType; -import com.azure.resourcemanager.machinelearning.models.VMTier; -import org.junit.jupiter.api.Assertions; - -public final class EstimatedVMPriceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EstimatedVMPrice model = BinaryData - .fromString("{\"retailPrice\":17.81756965941649,\"osType\":\"Windows\",\"vmTier\":\"Standard\"}") - .toObject(EstimatedVMPrice.class); - Assertions.assertEquals(17.81756965941649, model.retailPrice()); - Assertions.assertEquals(VMPriceOSType.WINDOWS, model.osType()); - Assertions.assertEquals(VMTier.STANDARD, model.vmTier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EstimatedVMPrice model = new EstimatedVMPrice().withRetailPrice(17.81756965941649) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.STANDARD); - model = BinaryData.fromObject(model).toObject(EstimatedVMPrice.class); - Assertions.assertEquals(17.81756965941649, model.retailPrice()); - Assertions.assertEquals(VMPriceOSType.WINDOWS, model.osType()); - Assertions.assertEquals(VMTier.STANDARD, model.vmTier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPricesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPricesTests.java deleted file mode 100644 index 0211ec8825d0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPricesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BillingCurrency; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrice; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrices; -import com.azure.resourcemanager.machinelearning.models.UnitOfMeasure; -import com.azure.resourcemanager.machinelearning.models.VMPriceOSType; -import com.azure.resourcemanager.machinelearning.models.VMTier; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class EstimatedVMPricesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EstimatedVMPrices model = BinaryData.fromString( - "{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":51.60313899930067,\"osType\":\"Linux\",\"vmTier\":\"Spot\"},{\"retailPrice\":9.272665097148082,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"},{\"retailPrice\":45.65930032967857,\"osType\":\"Linux\",\"vmTier\":\"Spot\"},{\"retailPrice\":12.242522151631585,\"osType\":\"Linux\",\"vmTier\":\"LowPriority\"}]}") - .toObject(EstimatedVMPrices.class); - Assertions.assertEquals(BillingCurrency.USD, model.billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.unitOfMeasure()); - Assertions.assertEquals(51.60313899930067, model.values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, model.values().get(0).osType()); - Assertions.assertEquals(VMTier.SPOT, model.values().get(0).vmTier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EstimatedVMPrices model = new EstimatedVMPrices().withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList( - new EstimatedVMPrice().withRetailPrice(51.60313899930067) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.SPOT), - new EstimatedVMPrice().withRetailPrice(9.272665097148082) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.LOW_PRIORITY), - new EstimatedVMPrice().withRetailPrice(45.65930032967857) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.SPOT), - new EstimatedVMPrice().withRetailPrice(12.242522151631585) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.LOW_PRIORITY))); - model = BinaryData.fromObject(model).toObject(EstimatedVMPrices.class); - Assertions.assertEquals(BillingCurrency.USD, model.billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.unitOfMeasure()); - Assertions.assertEquals(51.60313899930067, model.values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, model.values().get(0).osType()); - Assertions.assertEquals(VMTier.SPOT, model.values().get(0).vmTier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ExternalFqdnResponseInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ExternalFqdnResponseInnerTests.java deleted file mode 100644 index a46a5b94f31f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ExternalFqdnResponseInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoint; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoints; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExternalFqdnResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExternalFqdnResponseInner model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"category\":\"knso\",\"endpoints\":[{\"domainName\":\"xbldtlwwrlkdmtn\",\"endpointDetails\":[{}]},{\"domainName\":\"otllxdyhgsyo\",\"endpointDetails\":[{},{},{},{}]}]}},{\"properties\":{\"category\":\"tdtbnnhadooc\",\"endpoints\":[{\"domainName\":\"ikhnvpamqgxqq\",\"endpointDetails\":[{},{}]},{\"domainName\":\"kywggxkallatmel\",\"endpointDetails\":[{},{}]},{\"domainName\":\"iccjzkzivgvvcna\",\"endpointDetails\":[{},{}]},{\"domainName\":\"rnxxmueed\",\"endpointDetails\":[{},{},{}]}]}}]}") - .toObject(ExternalFqdnResponseInner.class); - Assertions.assertEquals("knso", model.value().get(0).properties().category()); - Assertions.assertEquals("xbldtlwwrlkdmtn", model.value().get(0).properties().endpoints().get(0).domainName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalFqdnResponseInner model - = new ExternalFqdnResponseInner() - .withValue( - Arrays.asList(new FqdnEndpoints().withProperties(new FqdnEndpointsProperties().withCategory("knso") - .withEndpoints(Arrays.asList( - new FqdnEndpoint().withDomainName("xbldtlwwrlkdmtn") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail())), - new FqdnEndpoint().withDomainName("otllxdyhgsyo") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail(), new FqdnEndpointDetail(), - new FqdnEndpointDetail(), new FqdnEndpointDetail()))))), - new FqdnEndpoints() - .withProperties( - new FqdnEndpointsProperties().withCategory("tdtbnnhadooc") - .withEndpoints( - Arrays - .asList( - new FqdnEndpoint().withDomainName("ikhnvpamqgxqq") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail(), - new FqdnEndpointDetail())), - new FqdnEndpoint().withDomainName("kywggxkallatmel") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail(), - new FqdnEndpointDetail())), - new FqdnEndpoint().withDomainName("iccjzkzivgvvcna") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail(), - new FqdnEndpointDetail())), - new FqdnEndpoint().withDomainName("rnxxmueed") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail(), - new FqdnEndpointDetail(), new FqdnEndpointDetail()))))))); - model = BinaryData.fromObject(model).toObject(ExternalFqdnResponseInner.class); - Assertions.assertEquals("knso", model.value().get(0).properties().category()); - Assertions.assertEquals("xbldtlwwrlkdmtn", model.value().get(0).properties().endpoints().get(0).domainName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionDriftMonitoringSignalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionDriftMonitoringSignalTests.java deleted file mode 100644 index 06c7ce622f67..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionDriftMonitoringSignalTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeatureAttributionDriftMonitoringSignal; -import com.azure.resourcemanager.machinelearning.models.FeatureAttributionMetric; -import com.azure.resourcemanager.machinelearning.models.FeatureAttributionMetricThreshold; -import com.azure.resourcemanager.machinelearning.models.FeatureImportanceMode; -import com.azure.resourcemanager.machinelearning.models.FeatureImportanceSettings; -import com.azure.resourcemanager.machinelearning.models.JobInputType; -import com.azure.resourcemanager.machinelearning.models.MonitoringFeatureDataType; -import com.azure.resourcemanager.machinelearning.models.MonitoringInputDataBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeatureAttributionDriftMonitoringSignalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureAttributionDriftMonitoringSignal model = BinaryData.fromString( - "{\"signalType\":\"FeatureAttributionDrift\",\"metricThreshold\":{\"threshold\":{\"value\":39.98706908901154},\"metric\":\"NormalizedDiscountedCumulativeGain\"},\"featureImportanceSettings\":{\"mode\":\"Disabled\",\"targetColumn\":\"snstl\"},\"productionData\":[{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"pjnx\",\"jobInputType\":\"uri_file\",\"uri\":\"htupsvyouweuiy\",\"columns\":{\"sf\":\"kzts\",\"ztadopgfz\":\"evyllznfhkqyt\",\"gqkzjuqw\":\"gjfcycrsvloyyh\",\"nfdbgsoscienezf\":\"ajquzxpixhyoi\"}},{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"ennmf\",\"jobInputType\":\"mltable\",\"uri\":\"pjnrtekwwnthro\",\"columns\":{\"yiurztvktjh\":\"ud\",\"hpuzxkpye\":\"fecqkoqyouerga\",\"zfz\":\"hfdyldhgye\",\"tdereunokakzw\":\"iyuq\"}},{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"jlwyxedzn\",\"jobInputType\":\"custom_model\",\"uri\":\"rfo\",\"columns\":{\"xfjjtpdyzout\":\"ewvmyifo\",\"gvad\":\"fptofhgnuywez\",\"pytpmpvdnogehlu\":\"aaqwvkg\",\"rtbnu\":\"b\"}},{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"faxzsvbxxyjissk\",\"jobInputType\":\"mlflow_model\",\"uri\":\"qocl\",\"columns\":{\"sqeq\":\"oewyhxessmvrkd\",\"esbrujbjpppktl\":\"bdxmd\",\"at\":\"dibfmthi\"}}],\"referenceData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"jrnm\",\"jobInputType\":\"triton_model\",\"uri\":\"zqpl\",\"columns\":{\"nikzs\":\"ih\",\"gkensckhbmcarmo\":\"zfffjilzfbpnt\"}},\"featureDataTypeOverride\":{\"kwykuqdndxl\":\"Numerical\",\"h\":\"Numerical\",\"gapvdgtfpeerscdx\":\"Numerical\"},\"notificationTypes\":[\"AmlNotification\"],\"properties\":{\"fmbgacn\":\"c\",\"cmspsanmameubkqi\":\"gfdt\",\"hlq\":\"mlf\",\"uugkw\":\"skkqjmxptuei\"}}") - .toObject(FeatureAttributionDriftMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("c", model.properties().get("fmbgacn")); - Assertions.assertEquals(39.98706908901154D, model.metricThreshold().threshold().value()); - Assertions.assertEquals(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN, - model.metricThreshold().metric()); - Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("snstl", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals("pjnx", model.productionData().get(0).dataContext()); - Assertions.assertEquals(JobInputType.URI_FILE, model.productionData().get(0).jobInputType()); - Assertions.assertEquals("htupsvyouweuiy", model.productionData().get(0).uri()); - Assertions.assertEquals("kzts", model.productionData().get(0).columns().get("sf")); - Assertions.assertEquals("jrnm", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.TRITON_MODEL, model.referenceData().jobInputType()); - Assertions.assertEquals("zqpl", model.referenceData().uri()); - Assertions.assertEquals("ih", model.referenceData().columns().get("nikzs")); - Assertions.assertEquals(MonitoringFeatureDataType.NUMERICAL, - model.featureDataTypeOverride().get("kwykuqdndxl")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureAttributionDriftMonitoringSignal model = new FeatureAttributionDriftMonitoringSignal() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("fmbgacn", "c", "cmspsanmameubkqi", "gfdt", "hlq", "mlf", "uugkw", "skkqjmxptuei")) - .withMetricThreshold(new FeatureAttributionMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(39.98706908901154D)) - .withMetric(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN)) - .withFeatureImportanceSettings( - new FeatureImportanceSettings().withMode(FeatureImportanceMode.DISABLED).withTargetColumn("snstl")) - .withProductionData(Arrays.asList( - new MonitoringInputDataBase().withDataContext("pjnx") - .withJobInputType(JobInputType.URI_FILE) - .withUri("htupsvyouweuiy") - .withColumns(mapOf("sf", "kzts", "ztadopgfz", "evyllznfhkqyt", "gqkzjuqw", "gjfcycrsvloyyh", - "nfdbgsoscienezf", "ajquzxpixhyoi")), - new MonitoringInputDataBase().withDataContext("ennmf") - .withJobInputType(JobInputType.MLTABLE) - .withUri("pjnrtekwwnthro") - .withColumns(mapOf("yiurztvktjh", "ud", "hpuzxkpye", "fecqkoqyouerga", "zfz", "hfdyldhgye", - "tdereunokakzw", "iyuq")), - new MonitoringInputDataBase().withDataContext("jlwyxedzn") - .withJobInputType(JobInputType.CUSTOM_MODEL) - .withUri("rfo") - .withColumns(mapOf("xfjjtpdyzout", "ewvmyifo", "gvad", "fptofhgnuywez", "pytpmpvdnogehlu", - "aaqwvkg", "rtbnu", "b")), - new MonitoringInputDataBase().withDataContext("faxzsvbxxyjissk") - .withJobInputType(JobInputType.MLFLOW_MODEL) - .withUri("qocl") - .withColumns(mapOf("sqeq", "oewyhxessmvrkd", "esbrujbjpppktl", "bdxmd", "at", "dibfmthi")))) - .withReferenceData(new MonitoringInputDataBase().withDataContext("jrnm") - .withJobInputType(JobInputType.TRITON_MODEL) - .withUri("zqpl") - .withColumns(mapOf("nikzs", "ih", "gkensckhbmcarmo", "zfffjilzfbpnt"))) - .withFeatureDataTypeOverride(mapOf("kwykuqdndxl", MonitoringFeatureDataType.NUMERICAL, "h", - MonitoringFeatureDataType.NUMERICAL, "gapvdgtfpeerscdx", MonitoringFeatureDataType.NUMERICAL)); - model = BinaryData.fromObject(model).toObject(FeatureAttributionDriftMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("c", model.properties().get("fmbgacn")); - Assertions.assertEquals(39.98706908901154D, model.metricThreshold().threshold().value()); - Assertions.assertEquals(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN, - model.metricThreshold().metric()); - Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("snstl", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals("pjnx", model.productionData().get(0).dataContext()); - Assertions.assertEquals(JobInputType.URI_FILE, model.productionData().get(0).jobInputType()); - Assertions.assertEquals("htupsvyouweuiy", model.productionData().get(0).uri()); - Assertions.assertEquals("kzts", model.productionData().get(0).columns().get("sf")); - Assertions.assertEquals("jrnm", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.TRITON_MODEL, model.referenceData().jobInputType()); - Assertions.assertEquals("zqpl", model.referenceData().uri()); - Assertions.assertEquals("ih", model.referenceData().columns().get("nikzs")); - Assertions.assertEquals(MonitoringFeatureDataType.NUMERICAL, - model.featureDataTypeOverride().get("kwykuqdndxl")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionMetricThresholdTests.java deleted file mode 100644 index eb8f10218a12..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionMetricThresholdTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeatureAttributionMetric; -import com.azure.resourcemanager.machinelearning.models.FeatureAttributionMetricThreshold; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import org.junit.jupiter.api.Assertions; - -public final class FeatureAttributionMetricThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureAttributionMetricThreshold model = BinaryData - .fromString( - "{\"threshold\":{\"value\":57.97533067862126},\"metric\":\"NormalizedDiscountedCumulativeGain\"}") - .toObject(FeatureAttributionMetricThreshold.class); - Assertions.assertEquals(57.97533067862126D, model.threshold().value()); - Assertions.assertEquals(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN, model.metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureAttributionMetricThreshold model = new FeatureAttributionMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(57.97533067862126D)) - .withMetric(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN); - model = BinaryData.fromObject(model).toObject(FeatureAttributionMetricThreshold.class); - Assertions.assertEquals(57.97533067862126D, model.threshold().value()); - Assertions.assertEquals(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN, model.metric()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureImportanceSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureImportanceSettingsTests.java deleted file mode 100644 index 2f094382acb5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureImportanceSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeatureImportanceMode; -import com.azure.resourcemanager.machinelearning.models.FeatureImportanceSettings; -import org.junit.jupiter.api.Assertions; - -public final class FeatureImportanceSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureImportanceSettings model - = BinaryData.fromString("{\"mode\":\"Enabled\",\"targetColumn\":\"udhuaorhjk\"}") - .toObject(FeatureImportanceSettings.class); - Assertions.assertEquals(FeatureImportanceMode.ENABLED, model.mode()); - Assertions.assertEquals("udhuaorhjk", model.targetColumn()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureImportanceSettings model - = new FeatureImportanceSettings().withMode(FeatureImportanceMode.ENABLED).withTargetColumn("udhuaorhjk"); - model = BinaryData.fromObject(model).toObject(FeatureImportanceSettings.class); - Assertions.assertEquals(FeatureImportanceMode.ENABLED, model.mode()); - Assertions.assertEquals("udhuaorhjk", model.targetColumn()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureInnerTests.java deleted file mode 100644 index 73b59adbbd60..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeatureProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeatureInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureInner model = BinaryData.fromString( - "{\"properties\":{\"featureName\":\"itacgxmfcsserx\",\"dataType\":\"String\",\"description\":\"oxhlw\",\"tags\":{\"qrsxyp\":\"j\",\"yuel\":\"uuuybnchrsziz\",\"nlgmtrwahzjmu\":\"etndnbfqyggagf\"},\"properties\":{\"fusuckzmkwklsno\":\"byrplrohkpig\"}},\"id\":\"xmqeqalh\",\"name\":\"jnhgwydyyn\",\"type\":\"svkhgbv\"}") - .toObject(FeatureInner.class); - Assertions.assertEquals("oxhlw", model.properties().description()); - Assertions.assertEquals("j", model.properties().tags().get("qrsxyp")); - Assertions.assertEquals("byrplrohkpig", model.properties().properties().get("fusuckzmkwklsno")); - Assertions.assertEquals("itacgxmfcsserx", model.properties().featureName()); - Assertions.assertEquals(FeatureDataType.STRING, model.properties().dataType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureInner model = new FeatureInner().withProperties(new FeatureProperties().withDescription("oxhlw") - .withTags(mapOf("qrsxyp", "j", "yuel", "uuuybnchrsziz", "nlgmtrwahzjmu", "etndnbfqyggagf")) - .withProperties(mapOf("fusuckzmkwklsno", "byrplrohkpig")) - .withFeatureName("itacgxmfcsserx") - .withDataType(FeatureDataType.STRING)); - model = BinaryData.fromObject(model).toObject(FeatureInner.class); - Assertions.assertEquals("oxhlw", model.properties().description()); - Assertions.assertEquals("j", model.properties().tags().get("qrsxyp")); - Assertions.assertEquals("byrplrohkpig", model.properties().properties().get("fusuckzmkwklsno")); - Assertions.assertEquals("itacgxmfcsserx", model.properties().featureName()); - Assertions.assertEquals(FeatureDataType.STRING, model.properties().dataType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturePropertiesTests.java deleted file mode 100644 index e3724ab33108..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturePropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeatureProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureProperties model = BinaryData.fromString( - "{\"featureName\":\"anarfdlpukhpyrne\",\"dataType\":\"Binary\",\"description\":\"pe\",\"tags\":{\"dbhfhp\":\"hnmgbroux\",\"zoyw\":\"paz\",\"htuevrhrljy\":\"xhpdulontacnpqwt\"},\"properties\":{\"duugwbsre\":\"wxhn\",\"nlvhhtklnvnafvv\":\"rfqkfuar\",\"lcqxypokk\":\"yfedevjbo\",\"zng\":\"minqcym\"}}") - .toObject(FeatureProperties.class); - Assertions.assertEquals("pe", model.description()); - Assertions.assertEquals("hnmgbroux", model.tags().get("dbhfhp")); - Assertions.assertEquals("wxhn", model.properties().get("duugwbsre")); - Assertions.assertEquals("anarfdlpukhpyrne", model.featureName()); - Assertions.assertEquals(FeatureDataType.BINARY, model.dataType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureProperties model = new FeatureProperties().withDescription("pe") - .withTags(mapOf("dbhfhp", "hnmgbroux", "zoyw", "paz", "htuevrhrljy", "xhpdulontacnpqwt")) - .withProperties( - mapOf("duugwbsre", "wxhn", "nlvhhtklnvnafvv", "rfqkfuar", "lcqxypokk", "yfedevjbo", "zng", "minqcym")) - .withFeatureName("anarfdlpukhpyrne") - .withDataType(FeatureDataType.BINARY); - model = BinaryData.fromObject(model).toObject(FeatureProperties.class); - Assertions.assertEquals("pe", model.description()); - Assertions.assertEquals("hnmgbroux", model.tags().get("dbhfhp")); - Assertions.assertEquals("wxhn", model.properties().get("duugwbsre")); - Assertions.assertEquals("anarfdlpukhpyrne", model.featureName()); - Assertions.assertEquals(FeatureDataType.BINARY, model.dataType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureResourceArmPaginatedResultTests.java deleted file mode 100644 index 4c65883d342e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeatureProperties; -import com.azure.resourcemanager.machinelearning.models.FeatureResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeatureResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"featureName\":\"zonwpngajinnixj\",\"dataType\":\"Long\",\"description\":\"mjfjmyccxlzhcox\",\"tags\":{\"sfnrdtjxt\":\"ekhenl\",\"cq\":\"r\",\"uslvyjtcvuwkasi\":\"jvidttge\",\"tuqfecjxeygtu\":\"iesfuug\"},\"properties\":{\"uewmrswnjlxuzrhw\":\"ic\",\"dohzjq\":\"usxjbaqehg\",\"o\":\"tu\"}},\"id\":\"e\",\"name\":\"xncnwfe\",\"type\":\"bnwgfmxj\"},{\"properties\":{\"featureName\":\"g\",\"dataType\":\"Binary\",\"description\":\"dlfgtdysnaq\",\"tags\":{\"zjrwdkqze\":\"qbctqha\",\"fza\":\"yjleziunjx\",\"eg\":\"tkw\",\"uooqjagmdit\":\"amlbnseqacjjvpil\"},\"properties\":{\"tdtpdelqacslmo\":\"iookjbsah\",\"xofvcjk\":\"oebn\",\"xejw\":\"dirazf\"}},\"id\":\"mdujtmvcopexcm\",\"name\":\"urbuhhlkyqltq\",\"type\":\"rogtuwkf\"},{\"properties\":{\"featureName\":\"jk\",\"dataType\":\"Double\",\"description\":\"idfv\",\"tags\":{\"ikayiansharuj\":\"lxnfuijtkbusqogs\"},\"properties\":{\"qhjpenuygbqe\":\"qxfzyjqttvwk\"}},\"id\":\"ekewvnqvcdlguauc\",\"name\":\"f\",\"type\":\"jwnlax\"}],\"nextLink\":\"njqikcz\"}") - .toObject(FeatureResourceArmPaginatedResult.class); - Assertions.assertEquals("mjfjmyccxlzhcox", model.value().get(0).properties().description()); - Assertions.assertEquals("ekhenl", model.value().get(0).properties().tags().get("sfnrdtjxt")); - Assertions.assertEquals("ic", model.value().get(0).properties().properties().get("uewmrswnjlxuzrhw")); - Assertions.assertEquals("zonwpngajinnixj", model.value().get(0).properties().featureName()); - Assertions.assertEquals(FeatureDataType.LONG, model.value().get(0).properties().dataType()); - Assertions.assertEquals("njqikcz", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureResourceArmPaginatedResult model - = new FeatureResourceArmPaginatedResult().withValue(Arrays.asList( - new FeatureInner().withProperties(new FeatureProperties() - .withDescription("mjfjmyccxlzhcox") - .withTags(mapOf("sfnrdtjxt", "ekhenl", "cq", "r", "uslvyjtcvuwkasi", "jvidttge", "tuqfecjxeygtu", - "iesfuug")) - .withProperties(mapOf("uewmrswnjlxuzrhw", "ic", "dohzjq", "usxjbaqehg", "o", "tu")) - .withFeatureName("zonwpngajinnixj") - .withDataType(FeatureDataType.LONG)), - new FeatureInner().withProperties(new FeatureProperties().withDescription("dlfgtdysnaq") - .withTags(mapOf("zjrwdkqze", "qbctqha", "fza", "yjleziunjx", "eg", "tkw", "uooqjagmdit", - "amlbnseqacjjvpil")) - .withProperties(mapOf("tdtpdelqacslmo", "iookjbsah", "xofvcjk", "oebn", "xejw", "dirazf")) - .withFeatureName("g") - .withDataType(FeatureDataType.BINARY)), - new FeatureInner().withProperties(new FeatureProperties().withDescription("idfv") - .withTags(mapOf("ikayiansharuj", "lxnfuijtkbusqogs")) - .withProperties(mapOf("qhjpenuygbqe", "qxfzyjqttvwk")) - .withFeatureName("jk") - .withDataType(FeatureDataType.DOUBLE)))) - .withNextLink("njqikcz"); - model = BinaryData.fromObject(model).toObject(FeatureResourceArmPaginatedResult.class); - Assertions.assertEquals("mjfjmyccxlzhcox", model.value().get(0).properties().description()); - Assertions.assertEquals("ekhenl", model.value().get(0).properties().tags().get("sfnrdtjxt")); - Assertions.assertEquals("ic", model.value().get(0).properties().properties().get("uewmrswnjlxuzrhw")); - Assertions.assertEquals("zonwpngajinnixj", model.value().get(0).properties().featureName()); - Assertions.assertEquals(FeatureDataType.LONG, model.value().get(0).properties().dataType()); - Assertions.assertEquals("njqikcz", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureStoreSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureStoreSettingsTests.java deleted file mode 100644 index f802cd4499cb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureStoreSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeRuntimeDto; -import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; -import org.junit.jupiter.api.Assertions; - -public final class FeatureStoreSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureStoreSettings model = BinaryData.fromString( - "{\"computeRuntime\":{\"sparkRuntimeVersion\":\"qsrxybzqqed\"},\"offlineStoreConnectionName\":\"tbciqfouflmm\",\"onlineStoreConnectionName\":\"zsm\"}") - .toObject(FeatureStoreSettings.class); - Assertions.assertEquals("qsrxybzqqed", model.computeRuntime().sparkRuntimeVersion()); - Assertions.assertEquals("tbciqfouflmm", model.offlineStoreConnectionName()); - Assertions.assertEquals("zsm", model.onlineStoreConnectionName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureStoreSettings model = new FeatureStoreSettings() - .withComputeRuntime(new ComputeRuntimeDto().withSparkRuntimeVersion("qsrxybzqqed")) - .withOfflineStoreConnectionName("tbciqfouflmm") - .withOnlineStoreConnectionName("zsm"); - model = BinaryData.fromObject(model).toObject(FeatureStoreSettings.class); - Assertions.assertEquals("qsrxybzqqed", model.computeRuntime().sparkRuntimeVersion()); - Assertions.assertEquals("tbciqfouflmm", model.offlineStoreConnectionName()); - Assertions.assertEquals("zsm", model.onlineStoreConnectionName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureSubsetTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureSubsetTests.java deleted file mode 100644 index 5bb094f67de4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureSubsetTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeatureSubset; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FeatureSubsetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureSubset model = BinaryData - .fromString( - "{\"filterType\":\"FeatureSubset\",\"features\":[\"huuonjkkxukg\",\"e\",\"vvpxjoeg\",\"jojlle\"]}") - .toObject(FeatureSubset.class); - Assertions.assertEquals("huuonjkkxukg", model.features().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureSubset model - = new FeatureSubset().withFeatures(Arrays.asList("huuonjkkxukg", "e", "vvpxjoeg", "jojlle")); - model = BinaryData.fromObject(model).toObject(FeatureSubset.class); - Assertions.assertEquals("huuonjkkxukg", model.features().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureWindowTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureWindowTests.java deleted file mode 100644 index 5de019d54fb9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureWindowTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeatureWindow; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class FeatureWindowTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureWindow model = BinaryData - .fromString("{\"featureWindowStart\":\"2021-05-01T05:25:27Z\",\"featureWindowEnd\":\"2021-05-01T01:36Z\"}") - .toObject(FeatureWindow.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-01T05:25:27Z"), model.featureWindowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-01T01:36Z"), model.featureWindowEnd()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureWindow model = new FeatureWindow().withFeatureWindowStart(OffsetDateTime.parse("2021-05-01T05:25:27Z")) - .withFeatureWindowEnd(OffsetDateTime.parse("2021-05-01T01:36Z")); - model = BinaryData.fromObject(model).toObject(FeatureWindow.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-01T05:25:27Z"), model.featureWindowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-01T01:36Z"), model.featureWindowEnd()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetWithResponseMockTests.java deleted file mode 100644 index 998857fe3239..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Feature; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"featureName\":\"lcldoyohu\",\"dataType\":\"Long\",\"description\":\"lop\",\"tags\":{\"wfrgdmbgbht\":\"sylwsmdo\"},\"properties\":{\"lgrrsk\":\"iustkqywab\",\"dxgdjudek\":\"tzbkeeohpf\",\"zmehcdfdxthqnz\":\"xh\",\"ueweivaje\":\"ukirdedijdhzkw\"}},\"id\":\"wlxdknxctglzbcxd\",\"name\":\"sgw\",\"type\":\"gyiw\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Feature response = manager.features() - .getWithResponse("bizxq", "dmhzbcujdzl", "yermjemny", "hoqpbfjfcbweabpt", "mkuquvcgvn", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("lop", response.properties().description()); - Assertions.assertEquals("sylwsmdo", response.properties().tags().get("wfrgdmbgbht")); - Assertions.assertEquals("iustkqywab", response.properties().properties().get("lgrrsk")); - Assertions.assertEquals("lcldoyohu", response.properties().featureName()); - Assertions.assertEquals(FeatureDataType.LONG, response.properties().dataType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListMockTests.java deleted file mode 100644 index 53f749a5d473..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Feature; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"featureName\":\"bqrqbpiqfstkdlyj\",\"dataType\":\"Float\",\"description\":\"ef\",\"tags\":{\"kz\":\"kf\",\"xnnitrugotf\":\"chrkiwpadnhf\",\"exbrvbdyriyray\":\"dlfe\",\"cl\":\"igksni\"},\"properties\":{\"xeigyddp\":\"rezqx\"}},\"id\":\"mbxerz\",\"name\":\"pcr\",\"type\":\"lwvcnm\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.features() - .list("eirjrkak", "vnd", "bmazlxlbd", "kidgqeyqrlgpkypb", "kpardo", "dtedxz", "yhbzmgzsyt", "pfslrx", - ListViewType.ALL, 1571501996, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ef", response.iterator().next().properties().description()); - Assertions.assertEquals("kf", response.iterator().next().properties().tags().get("kz")); - Assertions.assertEquals("rezqx", response.iterator().next().properties().properties().get("xeigyddp")); - Assertions.assertEquals("bqrqbpiqfstkdlyj", response.iterator().next().properties().featureName()); - Assertions.assertEquals(FeatureDataType.FLOAT, response.iterator().next().properties().dataType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerInnerTests.java deleted file mode 100644 index a4516c9489ba..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetContainerInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"pnwjfujq\",\"nextVersion\":\"fcbahhp\",\"description\":\"ofoiy\",\"tags\":{\"ndviauogphuartvt\":\"filkmkkholv\"},\"properties\":{\"ahmnxhkxjqirw\":\"yefchnm\",\"ewmozqvbu\":\"weooxffifhxwrs\",\"ttaboidvmfqh\":\"qmamhsycxhxzga\",\"mtdherngb\":\"pubowsepdfg\"}},\"id\":\"juahokqto\",\"name\":\"kauxof\",\"type\":\"hfphwpnulaiywze\"}") - .toObject(FeaturesetContainerInner.class); - Assertions.assertEquals("ofoiy", model.properties().description()); - Assertions.assertEquals("filkmkkholv", model.properties().tags().get("ndviauogphuartvt")); - Assertions.assertEquals("yefchnm", model.properties().properties().get("ahmnxhkxjqirw")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetContainerInner model - = new FeaturesetContainerInner().withProperties(new FeaturesetContainerProperties().withDescription("ofoiy") - .withTags(mapOf("ndviauogphuartvt", "filkmkkholv")) - .withProperties(mapOf("ahmnxhkxjqirw", "yefchnm", "ewmozqvbu", "weooxffifhxwrs", "ttaboidvmfqh", - "qmamhsycxhxzga", "mtdherngb", "pubowsepdfg")) - .withIsArchived(false)); - model = BinaryData.fromObject(model).toObject(FeaturesetContainerInner.class); - Assertions.assertEquals("ofoiy", model.properties().description()); - Assertions.assertEquals("filkmkkholv", model.properties().tags().get("ndviauogphuartvt")); - Assertions.assertEquals("yefchnm", model.properties().properties().get("ahmnxhkxjqirw")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerPropertiesTests.java deleted file mode 100644 index b48202b04317..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetContainerProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"wkojpllndnpd\",\"nextVersion\":\"pqafgfugsnnfhy\",\"description\":\"efy\",\"tags\":{\"rmlmuowo\":\"octfjgtixrjvzuyt\"},\"properties\":{\"p\":\"uir\"}}") - .toObject(FeaturesetContainerProperties.class); - Assertions.assertEquals("efy", model.description()); - Assertions.assertEquals("octfjgtixrjvzuyt", model.tags().get("rmlmuowo")); - Assertions.assertEquals("uir", model.properties().get("p")); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetContainerProperties model = new FeaturesetContainerProperties().withDescription("efy") - .withTags(mapOf("rmlmuowo", "octfjgtixrjvzuyt")) - .withProperties(mapOf("p", "uir")) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(FeaturesetContainerProperties.class); - Assertions.assertEquals("efy", model.description()); - Assertions.assertEquals("octfjgtixrjvzuyt", model.tags().get("rmlmuowo")); - Assertions.assertEquals("uir", model.properties().get("p")); - Assertions.assertEquals(false, model.isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index abfa7683f1bb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetContainerResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":false,\"latestVersion\":\"ov\",\"nextVersion\":\"pikqmh\",\"description\":\"owjrmzvuporqz\",\"tags\":{\"xcnqmxqpswokmvkh\":\"ydzvkf\",\"wtglxx\":\"ggdhbemzqkzszuw\"},\"properties\":{\"gjsxv\":\"fpgpicrmnzhrgm\",\"qgvriibakcla\":\"qcbfrmbodths\",\"gmwohqfzizvu\":\"jfrnxousxauzlwv\"}},\"id\":\"mk\",\"name\":\"svth\",\"type\":\"wpztekovmribia\"},{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":false,\"latestVersion\":\"cfotangcfhnykzcu\",\"nextVersion\":\"wvxwlmzqwmvt\",\"description\":\"jmxmcuqud\",\"tags\":{\"dkvgfabuiyjibuzp\":\"clxyn\"},\"properties\":{\"pgoxgji\":\"gneik\",\"rrxxgewpktvq\":\"qhibtozipqwjedm\"}},\"id\":\"kmqp\",\"name\":\"o\",\"type\":\"hlfbcgwgc\"}],\"nextLink\":\"xoe\"}") - .toObject(FeaturesetContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("owjrmzvuporqz", model.value().get(0).properties().description()); - Assertions.assertEquals("ydzvkf", model.value().get(0).properties().tags().get("xcnqmxqpswokmvkh")); - Assertions.assertEquals("fpgpicrmnzhrgm", model.value().get(0).properties().properties().get("gjsxv")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("xoe", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetContainerResourceArmPaginatedResult model - = new FeaturesetContainerResourceArmPaginatedResult().withValue(Arrays.asList( - new FeaturesetContainerInner() - .withProperties(new FeaturesetContainerProperties().withDescription("owjrmzvuporqz") - .withTags(mapOf("xcnqmxqpswokmvkh", "ydzvkf", "wtglxx", "ggdhbemzqkzszuw")) - .withProperties(mapOf("gjsxv", "fpgpicrmnzhrgm", "qgvriibakcla", "qcbfrmbodths", "gmwohqfzizvu", - "jfrnxousxauzlwv")) - .withIsArchived(false)), - new FeaturesetContainerInner() - .withProperties(new FeaturesetContainerProperties().withDescription("jmxmcuqud") - .withTags(mapOf("dkvgfabuiyjibuzp", "clxyn")) - .withProperties(mapOf("pgoxgji", "gneik", "rrxxgewpktvq", "qhibtozipqwjedm")) - .withIsArchived(false)))) - .withNextLink("xoe"); - model = BinaryData.fromObject(model).toObject(FeaturesetContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("owjrmzvuporqz", model.value().get(0).properties().description()); - Assertions.assertEquals("ydzvkf", model.value().get(0).properties().tags().get("xcnqmxqpswokmvkh")); - Assertions.assertEquals("fpgpicrmnzhrgm", model.value().get(0).properties().properties().get("gjsxv")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("xoe", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateMockTests.java deleted file mode 100644 index 317df1aa1f37..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainer; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties; -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 reactor.core.publisher.Mono; - -public final class FeaturesetContainersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"d\",\"nextVersion\":\"bjzxrpxji\",\"description\":\"upirvdonka\",\"tags\":{\"n\":\"vgjgcwwuusjjhtcy\",\"svwq\":\"highnxhgmfrnk\"},\"properties\":{\"auksttximeztasf\":\"jteqlujmmkn\"}},\"id\":\"mecweohlerpt\",\"name\":\"wvzapybdeea\",\"type\":\"igbpabacp\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturesetContainer response = manager.featuresetContainers() - .define("xy") - .withExistingWorkspace("iweyuigyzsebk", "fykgmwurcxxj") - .withProperties(new FeaturesetContainerProperties().withDescription("nk") - .withTags(mapOf("lwujobdqi", "pmqffgjsqqqairoo", "v", "pp", "trwgljfatezdxq", "ovijpmegnkrvtfbi")) - .withProperties(mapOf("lgnieeqjdfxxxnn", "phgimyomje", "rijbiterqfu", "uxkepga", "dd", "errcanlpf", - "qawupqkvmy", "wpg")) - .withIsArchived(false)) - .create(); - - Assertions.assertEquals("upirvdonka", response.properties().description()); - Assertions.assertEquals("vgjgcwwuusjjhtcy", response.properties().tags().get("n")); - Assertions.assertEquals("jteqlujmmkn", response.properties().properties().get("auksttximeztasf")); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteMockTests.java deleted file mode 100644 index 0cb46c2f66f7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesetContainersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.featuresetContainers() - .delete("flhhbupqovuw", "vqihmqhqjd", "bgcemjt", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntityWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntityWithResponseMockTests.java deleted file mode 100644 index edbcb7328bfc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntityWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesetContainersGetEntityWithResponseMockTests { - @Test - public void testGetEntityWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":true,\"latestVersion\":\"pxe\",\"nextVersion\":\"becxuvkbao\",\"description\":\"vyhgpgjdrng\",\"tags\":{\"ucyackgka\":\"eepukuofzwizt\"},\"properties\":{\"smurjab\":\"gtpcohfksixvwkpc\"}},\"id\":\"xohagcojgmyzjd\",\"name\":\"mqe\",\"type\":\"rqtgdipbn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturesetContainer response = manager.featuresetContainers() - .getEntityWithResponse("ljxagcalyq", "craxilzdxcm", "dmdsypksfrhi", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vyhgpgjdrng", response.properties().description()); - Assertions.assertEquals("eepukuofzwizt", response.properties().tags().get("ucyackgka")); - Assertions.assertEquals("gtpcohfksixvwkpc", response.properties().properties().get("smurjab")); - Assertions.assertEquals(true, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListMockTests.java deleted file mode 100644 index 26153b624830..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainer; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesetContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":false,\"latestVersion\":\"vpdu\",\"nextVersion\":\"plpdzriettnmiuf\",\"description\":\"fqmlmbyqyekuw\",\"tags\":{\"rt\":\"zpegumydo\"},\"properties\":{\"evqjdxiiqwqbvanv\":\"ecgbxrc\",\"nkruywrxnksmaebd\":\"pxnaaii\",\"wfuxnt\":\"xjsmrseauxeovbgr\"}},\"id\":\"gylleketkv\",\"name\":\"ptqhatfg\",\"type\":\"hhbxgfhgkdm\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.featuresetContainers() - .list("pny", "luivrjselauzrpes", "eb", "egzxrusafvf", ListViewType.ALL, 1984547680, "a", "uoh", - "kimntxdvlqmn", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("fqmlmbyqyekuw", response.iterator().next().properties().description()); - Assertions.assertEquals("zpegumydo", response.iterator().next().properties().tags().get("rt")); - Assertions.assertEquals("ecgbxrc", - response.iterator().next().properties().properties().get("evqjdxiiqwqbvanv")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetSpecificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetSpecificationTests.java deleted file mode 100644 index 1624a6353867..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetSpecificationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetSpecification model - = BinaryData.fromString("{\"path\":\"msplzgaufcshhvn\"}").toObject(FeaturesetSpecification.class); - Assertions.assertEquals("msplzgaufcshhvn", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetSpecification model = new FeaturesetSpecification().withPath("msplzgaufcshhvn"); - model = BinaryData.fromObject(model).toObject(FeaturesetSpecification.class); - Assertions.assertEquals("msplzgaufcshhvn", model.path()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillRequestTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillRequestTests.java deleted file mode 100644 index deaadee64e46..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillRequestTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataAvailabilityStatus; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; -import com.azure.resourcemanager.machinelearning.models.FeatureWindow; -import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetVersionBackfillRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetVersionBackfillRequest model = BinaryData.fromString( - "{\"displayName\":\"bwzohmnrxxbs\",\"description\":\"klinhmdptysprq\",\"featureWindow\":{\"featureWindowStart\":\"2021-03-17T04:51:43Z\",\"featureWindowEnd\":\"2021-09-05T11:06:21Z\"},\"dataAvailabilityStatus\":[\"Incomplete\",\"Incomplete\"],\"jobId\":\"vjgp\",\"tags\":{\"qvapcohhoucq\":\"fiqwoy\",\"jxcx\":\"q\",\"tzqdd\":\"rzdcgdzbenribcaw\",\"mzwcjjncqt\":\"jwfljhznamtua\"},\"resource\":{\"instanceType\":\"izvg\"},\"sparkConfiguration\":{\"ngrebwg\":\"tzuuvb\",\"x\":\"ahttzlswvajqfut\"},\"properties\":{\"aohcmbuocn\":\"zasunwqrjzfrgq\",\"hmbpyryxamebly\":\"r\",\"kmrocxne\":\"yvk\",\"mtodl\":\"v\"}}") - .toObject(FeaturesetVersionBackfillRequest.class); - Assertions.assertEquals("bwzohmnrxxbs", model.displayName()); - Assertions.assertEquals("klinhmdptysprq", model.description()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-17T04:51:43Z"), - model.featureWindow().featureWindowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T11:06:21Z"), model.featureWindow().featureWindowEnd()); - Assertions.assertEquals(DataAvailabilityStatus.INCOMPLETE, model.dataAvailabilityStatus().get(0)); - Assertions.assertEquals("vjgp", model.jobId()); - Assertions.assertEquals("fiqwoy", model.tags().get("qvapcohhoucq")); - Assertions.assertEquals("izvg", model.resource().instanceType()); - Assertions.assertEquals("tzuuvb", model.sparkConfiguration().get("ngrebwg")); - Assertions.assertEquals("zasunwqrjzfrgq", model.properties().get("aohcmbuocn")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetVersionBackfillRequest model = new FeaturesetVersionBackfillRequest().withDisplayName("bwzohmnrxxbs") - .withDescription("klinhmdptysprq") - .withFeatureWindow(new FeatureWindow().withFeatureWindowStart(OffsetDateTime.parse("2021-03-17T04:51:43Z")) - .withFeatureWindowEnd(OffsetDateTime.parse("2021-09-05T11:06:21Z"))) - .withDataAvailabilityStatus( - Arrays.asList(DataAvailabilityStatus.INCOMPLETE, DataAvailabilityStatus.INCOMPLETE)) - .withJobId("vjgp") - .withTags(mapOf("qvapcohhoucq", "fiqwoy", "jxcx", "q", "tzqdd", "rzdcgdzbenribcaw", "mzwcjjncqt", - "jwfljhznamtua")) - .withResource(new MaterializationComputeResource().withInstanceType("izvg")) - .withSparkConfiguration(mapOf("ngrebwg", "tzuuvb", "x", "ahttzlswvajqfut")) - .withProperties( - mapOf("aohcmbuocn", "zasunwqrjzfrgq", "hmbpyryxamebly", "r", "kmrocxne", "yvk", "mtodl", "v")); - model = BinaryData.fromObject(model).toObject(FeaturesetVersionBackfillRequest.class); - Assertions.assertEquals("bwzohmnrxxbs", model.displayName()); - Assertions.assertEquals("klinhmdptysprq", model.description()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-17T04:51:43Z"), - model.featureWindow().featureWindowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T11:06:21Z"), model.featureWindow().featureWindowEnd()); - Assertions.assertEquals(DataAvailabilityStatus.INCOMPLETE, model.dataAvailabilityStatus().get(0)); - Assertions.assertEquals("vjgp", model.jobId()); - Assertions.assertEquals("fiqwoy", model.tags().get("qvapcohhoucq")); - Assertions.assertEquals("izvg", model.resource().instanceType()); - Assertions.assertEquals("tzuuvb", model.sparkConfiguration().get("ngrebwg")); - Assertions.assertEquals("zasunwqrjzfrgq", model.properties().get("aohcmbuocn")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillResponseInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillResponseInnerTests.java deleted file mode 100644 index a3bae11b08a0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillResponseInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetVersionBackfillResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetVersionBackfillResponseInner model - = BinaryData.fromString("{\"jobIds\":[\"ygvoavyunssxlgh\",\"ee\",\"jlgvvpase\",\"sgb\"]}") - .toObject(FeaturesetVersionBackfillResponseInner.class); - Assertions.assertEquals("ygvoavyunssxlgh", model.jobIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetVersionBackfillResponseInner model = new FeaturesetVersionBackfillResponseInner() - .withJobIds(Arrays.asList("ygvoavyunssxlgh", "ee", "jlgvvpase", "sgb")); - model = BinaryData.fromObject(model).toObject(FeaturesetVersionBackfillResponseInner.class); - Assertions.assertEquals("ygvoavyunssxlgh", model.jobIds().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionInnerTests.java deleted file mode 100644 index ed0c9bc96baf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionInnerTests.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties; -import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; -import com.azure.resourcemanager.machinelearning.models.MaterializationSettings; -import com.azure.resourcemanager.machinelearning.models.MaterializationStoreType; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetVersionInner model = BinaryData.fromString( - "{\"properties\":{\"specification\":{\"path\":\"sxcdgljplkeuach\"},\"materializationSettings\":{\"storeType\":\"Offline\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Week\",\"interval\":1553395151,\"schedule\":{\"hours\":[286506544,1823247004],\"minutes\":[467932979,1819324739],\"weekDays\":[\"Tuesday\",\"Tuesday\",\"Wednesday\",\"Tuesday\"],\"monthDays\":[1207457404]},\"endTime\":\"hqjjys\",\"startTime\":\"rlpshhkv\",\"timeZone\":\"dwqslsrhmpqvw\"},\"notification\":{\"emails\":[\"ndcbrwi\",\"uvqejosovyrrle\"],\"emailOn\":[\"JobFailed\",\"JobFailed\",\"JobFailed\",\"JobFailed\"],\"webhooks\":{\"bmrqbrjbbmp\":{\"webhookType\":\"Webhook\",\"eventType\":\"qobbpihehcec\"},\"rseqwjksghudgz\":{\"webhookType\":\"Webhook\",\"eventType\":\"lvykfrex\"},\"hrkmdyomkxfbvfbh\":{\"webhookType\":\"Webhook\",\"eventType\":\"ogjggsvoujkxibda\"},\"hpwpgddeimawzovg\":{\"webhookType\":\"Webhook\",\"eventType\":\"i\"}}},\"resource\":{\"instanceType\":\"muikjcjcaztbws\"},\"sparkConfiguration\":{\"ytwvczcswkacve\":\"owxwcomli\",\"pqthehnmnaoya\":\"yfdvlvhbwrnfxtgd\"}},\"stage\":\"coeqswankltytm\",\"entities\":[\"oznnhdrlktgj\",\"sggux\",\"eml\",\"ywaeeczgf\"],\"provisioningState\":\"Updating\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"sxbly\",\"tags\":{\"plpvm\":\"zujksrlsmdes\",\"eowxvgpi\":\"cdoewbidyv\",\"xzecpaxwkufykhvu\":\"deugf\"},\"properties\":{\"znabaobns\":\"pmru\",\"ihywartspph\":\"ujdjltymkmvg\"}},\"id\":\"xkykxdssjp\",\"name\":\"mmuc\",\"type\":\"xhikkflrmymyin\"}") - .toObject(FeaturesetVersionInner.class); - Assertions.assertEquals("sxbly", model.properties().description()); - Assertions.assertEquals("zujksrlsmdes", model.properties().tags().get("plpvm")); - Assertions.assertEquals("pmru", model.properties().properties().get("znabaobns")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals("sxcdgljplkeuach", model.properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.OFFLINE, - model.properties().materializationSettings().storeType()); - Assertions.assertEquals("hqjjys", model.properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("rlpshhkv", model.properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("dwqslsrhmpqvw", model.properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.WEEK, - model.properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(1553395151, model.properties().materializationSettings().schedule().interval()); - Assertions.assertEquals(286506544, - model.properties().materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(467932979, - model.properties().materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.TUESDAY, - model.properties().materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1207457404, - model.properties().materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("ndcbrwi", model.properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, - model.properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("qobbpihehcec", - model.properties().materializationSettings().notification().webhooks().get("bmrqbrjbbmp").eventType()); - Assertions.assertEquals("muikjcjcaztbws", - model.properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("owxwcomli", - model.properties().materializationSettings().sparkConfiguration().get("ytwvczcswkacve")); - Assertions.assertEquals("coeqswankltytm", model.properties().stage()); - Assertions.assertEquals("oznnhdrlktgj", model.properties().entities().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetVersionInner model = new FeaturesetVersionInner().withProperties(new FeaturesetVersionProperties() - .withDescription("sxbly") - .withTags(mapOf("plpvm", "zujksrlsmdes", "eowxvgpi", "cdoewbidyv", "xzecpaxwkufykhvu", "deugf")) - .withProperties(mapOf("znabaobns", "pmru", "ihywartspph", "ujdjltymkmvg")) - .withIsArchived(true) - .withIsAnonymous(true) - .withSpecification(new FeaturesetSpecification().withPath("sxcdgljplkeuach")) - .withMaterializationSettings(new MaterializationSettings().withStoreType(MaterializationStoreType.OFFLINE) - .withSchedule(new RecurrenceTrigger().withEndTime("hqjjys") - .withStartTime("rlpshhkv") - .withTimeZone("dwqslsrhmpqvw") - .withFrequency(RecurrenceFrequency.WEEK) - .withInterval(1553395151) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList(286506544, 1823247004)) - .withMinutes(Arrays.asList(467932979, 1819324739)) - .withWeekDays( - Arrays.asList(WeekDay.TUESDAY, WeekDay.TUESDAY, WeekDay.WEDNESDAY, WeekDay.TUESDAY)) - .withMonthDays(Arrays.asList(1207457404)))) - .withNotification( - new NotificationSetting().withEmails(Arrays.asList("ndcbrwi", "uvqejosovyrrle")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED, - EmailNotificationEnableType.JOB_FAILED, EmailNotificationEnableType.JOB_FAILED, - EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("bmrqbrjbbmp", new Webhook().withEventType("qobbpihehcec"), - "rseqwjksghudgz", new Webhook().withEventType("lvykfrex"), "hrkmdyomkxfbvfbh", - new Webhook().withEventType("ogjggsvoujkxibda"), "hpwpgddeimawzovg", - new Webhook().withEventType("i")))) - .withResource(new MaterializationComputeResource().withInstanceType("muikjcjcaztbws")) - .withSparkConfiguration(mapOf("ytwvczcswkacve", "owxwcomli", "pqthehnmnaoya", "yfdvlvhbwrnfxtgd"))) - .withStage("coeqswankltytm") - .withEntities(Arrays.asList("oznnhdrlktgj", "sggux", "eml", "ywaeeczgf"))); - model = BinaryData.fromObject(model).toObject(FeaturesetVersionInner.class); - Assertions.assertEquals("sxbly", model.properties().description()); - Assertions.assertEquals("zujksrlsmdes", model.properties().tags().get("plpvm")); - Assertions.assertEquals("pmru", model.properties().properties().get("znabaobns")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals("sxcdgljplkeuach", model.properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.OFFLINE, - model.properties().materializationSettings().storeType()); - Assertions.assertEquals("hqjjys", model.properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("rlpshhkv", model.properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("dwqslsrhmpqvw", model.properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.WEEK, - model.properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(1553395151, model.properties().materializationSettings().schedule().interval()); - Assertions.assertEquals(286506544, - model.properties().materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(467932979, - model.properties().materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.TUESDAY, - model.properties().materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1207457404, - model.properties().materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("ndcbrwi", model.properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, - model.properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("qobbpihehcec", - model.properties().materializationSettings().notification().webhooks().get("bmrqbrjbbmp").eventType()); - Assertions.assertEquals("muikjcjcaztbws", - model.properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("owxwcomli", - model.properties().materializationSettings().sparkConfiguration().get("ytwvczcswkacve")); - Assertions.assertEquals("coeqswankltytm", model.properties().stage()); - Assertions.assertEquals("oznnhdrlktgj", model.properties().entities().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionPropertiesTests.java deleted file mode 100644 index 6b17297a1aba..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties; -import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; -import com.azure.resourcemanager.machinelearning.models.MaterializationSettings; -import com.azure.resourcemanager.machinelearning.models.MaterializationStoreType; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetVersionProperties model = BinaryData.fromString( - "{\"specification\":{\"path\":\"hr\"},\"materializationSettings\":{\"storeType\":\"None\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Minute\",\"interval\":1553660421,\"schedule\":{\"hours\":[2094134008],\"minutes\":[809500058],\"weekDays\":[\"Saturday\",\"Wednesday\",\"Saturday\",\"Tuesday\"],\"monthDays\":[1275151185,264674589,1965793317,753182470]},\"endTime\":\"iowlxteqdptj\",\"startTime\":\"dtguk\",\"timeZone\":\"nblwphqlkcc\"},\"notification\":{\"emails\":[\"gqwa\",\"oiulwgniipr\",\"lvawuwzdufypivls\"],\"emailOn\":[\"JobFailed\",\"JobFailed\"],\"webhooks\":{\"phavpmhbrb\":{\"webhookType\":\"Webhook\",\"eventType\":\"kmifoxxkub\"},\"sqyzqedikdfr\":{\"webhookType\":\"Webhook\",\"eventType\":\"vgovpbbttefjokn\"}}},\"resource\":{\"instanceType\":\"qmrjg\"},\"sparkConfiguration\":{\"iwzcxmjpbyeph\":\"fqlggw\",\"ljvrcmyfqipgxhnp\":\"gt\"}},\"stage\":\"yqwcabvnuil\",\"entities\":[\"aswlp\",\"ugmrmf\",\"lrxw\"],\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"vcisiz\",\"tags\":{\"jwuive\":\"eds\"},\"properties\":{\"psmgo\":\"gyeewxeiq\",\"l\":\"guamlj\"}}") - .toObject(FeaturesetVersionProperties.class); - Assertions.assertEquals("vcisiz", model.description()); - Assertions.assertEquals("eds", model.tags().get("jwuive")); - Assertions.assertEquals("gyeewxeiq", model.properties().get("psmgo")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("hr", model.specification().path()); - Assertions.assertEquals(MaterializationStoreType.NONE, model.materializationSettings().storeType()); - Assertions.assertEquals("iowlxteqdptj", model.materializationSettings().schedule().endTime()); - Assertions.assertEquals("dtguk", model.materializationSettings().schedule().startTime()); - Assertions.assertEquals("nblwphqlkcc", model.materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.MINUTE, model.materializationSettings().schedule().frequency()); - Assertions.assertEquals(1553660421, model.materializationSettings().schedule().interval()); - Assertions.assertEquals(2094134008, model.materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(809500058, model.materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.SATURDAY, - model.materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1275151185, model.materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("gqwa", model.materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, - model.materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("kmifoxxkub", - model.materializationSettings().notification().webhooks().get("phavpmhbrb").eventType()); - Assertions.assertEquals("qmrjg", model.materializationSettings().resource().instanceType()); - Assertions.assertEquals("fqlggw", model.materializationSettings().sparkConfiguration().get("iwzcxmjpbyeph")); - Assertions.assertEquals("yqwcabvnuil", model.stage()); - Assertions.assertEquals("aswlp", model.entities().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetVersionProperties model = new FeaturesetVersionProperties().withDescription("vcisiz") - .withTags(mapOf("jwuive", "eds")) - .withProperties(mapOf("psmgo", "gyeewxeiq", "l", "guamlj")) - .withIsArchived(true) - .withIsAnonymous(false) - .withSpecification(new FeaturesetSpecification().withPath("hr")) - .withMaterializationSettings(new MaterializationSettings().withStoreType(MaterializationStoreType.NONE) - .withSchedule(new RecurrenceTrigger().withEndTime("iowlxteqdptj") - .withStartTime("dtguk") - .withTimeZone("nblwphqlkcc") - .withFrequency(RecurrenceFrequency.MINUTE) - .withInterval(1553660421) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList(2094134008)) - .withMinutes(Arrays.asList(809500058)) - .withWeekDays( - Arrays.asList(WeekDay.SATURDAY, WeekDay.WEDNESDAY, WeekDay.SATURDAY, WeekDay.TUESDAY)) - .withMonthDays(Arrays.asList(1275151185, 264674589, 1965793317, 753182470)))) - .withNotification(new NotificationSetting() - .withEmails(Arrays.asList("gqwa", "oiulwgniipr", "lvawuwzdufypivls")) - .withEmailOn( - Arrays.asList(EmailNotificationEnableType.JOB_FAILED, EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("phavpmhbrb", new Webhook().withEventType("kmifoxxkub"), "sqyzqedikdfr", - new Webhook().withEventType("vgovpbbttefjokn")))) - .withResource(new MaterializationComputeResource().withInstanceType("qmrjg")) - .withSparkConfiguration(mapOf("iwzcxmjpbyeph", "fqlggw", "ljvrcmyfqipgxhnp", "gt"))) - .withStage("yqwcabvnuil") - .withEntities(Arrays.asList("aswlp", "ugmrmf", "lrxw")); - model = BinaryData.fromObject(model).toObject(FeaturesetVersionProperties.class); - Assertions.assertEquals("vcisiz", model.description()); - Assertions.assertEquals("eds", model.tags().get("jwuive")); - Assertions.assertEquals("gyeewxeiq", model.properties().get("psmgo")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("hr", model.specification().path()); - Assertions.assertEquals(MaterializationStoreType.NONE, model.materializationSettings().storeType()); - Assertions.assertEquals("iowlxteqdptj", model.materializationSettings().schedule().endTime()); - Assertions.assertEquals("dtguk", model.materializationSettings().schedule().startTime()); - Assertions.assertEquals("nblwphqlkcc", model.materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.MINUTE, model.materializationSettings().schedule().frequency()); - Assertions.assertEquals(1553660421, model.materializationSettings().schedule().interval()); - Assertions.assertEquals(2094134008, model.materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(809500058, model.materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.SATURDAY, - model.materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1275151185, model.materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("gqwa", model.materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, - model.materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("kmifoxxkub", - model.materializationSettings().notification().webhooks().get("phavpmhbrb").eventType()); - Assertions.assertEquals("qmrjg", model.materializationSettings().resource().instanceType()); - Assertions.assertEquals("fqlggw", model.materializationSettings().sparkConfiguration().get("iwzcxmjpbyeph")); - Assertions.assertEquals("yqwcabvnuil", model.stage()); - Assertions.assertEquals("aswlp", model.entities().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionResourceArmPaginatedResultTests.java deleted file mode 100644 index db21b4d547ce..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; -import com.azure.resourcemanager.machinelearning.models.MaterializationSettings; -import com.azure.resourcemanager.machinelearning.models.MaterializationStoreType; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetVersionResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetVersionResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"specification\":{\"path\":\"ewuninvud\"},\"materializationSettings\":{\"storeType\":\"OnlineAndOffline\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Day\",\"interval\":709462942,\"schedule\":{\"hours\":[],\"minutes\":[]},\"endTime\":\"ec\",\"startTime\":\"ct\",\"timeZone\":\"xdtddmflhuytxzv\"},\"notification\":{\"emails\":[\"pxbannovvoxc\",\"ytprwnwvroev\",\"tlyo\",\"rrrouuxvnsa\"],\"emailOn\":[\"JobCompleted\",\"JobCancelled\",\"JobCompleted\",\"JobCancelled\"],\"webhooks\":{\"zrxklobd\":{\"webhookType\":\"Webhook\"},\"nazpmk\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"vevfxz\"},\"sparkConfiguration\":{\"hrdd\":\"hbzxli\",\"nzqcy\":\"tfgxqbawpcb\",\"yuicdhzbdy\":\"napqo\",\"bid\":\"wwgbdv\"}},\"stage\":\"m\",\"entities\":[\"plfmuvapckccrrvw\"],\"provisioningState\":\"Canceled\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"k\",\"tags\":{\"pyyrmfs\":\"immoiroqboshbrag\",\"opfppdbwnupgah\":\"bpav\",\"jcaacfdmmcpugm\":\"kuma\"},\"properties\":{\"oqhnlb\":\"epvufhbzehew\",\"krsrrmoucs\":\"nbldxeaclgschori\",\"abeolhbhlvbm\":\"fldpuviyfc\"}},\"id\":\"qi\",\"name\":\"s\",\"type\":\"tkcudfbsfarfsiow\"},{\"properties\":{\"specification\":{\"path\":\"xnq\"},\"materializationSettings\":{\"storeType\":\"None\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Minute\",\"interval\":1896459173,\"schedule\":{\"hours\":[],\"minutes\":[]},\"endTime\":\"qyki\",\"startTime\":\"d\",\"timeZone\":\"aoaf\"},\"notification\":{\"emails\":[\"v\",\"xmycjimryvwgcw\"],\"emailOn\":[\"JobCancelled\",\"JobFailed\"],\"webhooks\":{\"esyds\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"fo\"},\"sparkConfiguration\":{\"llklmtk\":\"bvopwndyqle\",\"dfjmzsyzfhotlh\":\"lowkxxpvb\",\"yych\":\"k\",\"hv\":\"nsjlpjrtws\"}},\"stage\":\"icphvtrrmhw\",\"entities\":[\"dpyflubhv\",\"glrocuy\",\"lw\"],\"provisioningState\":\"Deleting\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"clutnpqme\",\"tags\":{\"mykyujxsglhs\":\"jk\",\"fihotj\":\"rryejylmbkzudnig\",\"refqy\":\"wlpxuzzjg\"},\"properties\":{\"fb\":\"toihiqakydi\",\"spodaqax\":\"kwpzdqtvh\"}},\"id\":\"pie\",\"name\":\"gbebjf\",\"type\":\"lbmoichd\"},{\"properties\":{\"specification\":{\"path\":\"fpubntnbatz\"},\"materializationSettings\":{\"storeType\":\"Online\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Month\",\"interval\":1702744153,\"schedule\":{\"hours\":[],\"minutes\":[]},\"endTime\":\"el\",\"startTime\":\"ttcjuhplrvkmjc\",\"timeZone\":\"jvlgfggcvkyyliz\"},\"notification\":{\"emails\":[\"psfxsf\",\"ztlvtmvagbwidqlv\"],\"emailOn\":[\"JobFailed\",\"JobFailed\"],\"webhooks\":{\"fizr\":{\"webhookType\":\"Webhook\"},\"jfnmjmvlwyz\":{\"webhookType\":\"Webhook\"},\"iblkujr\":{\"webhookType\":\"Webhook\"},\"lfojuidjp\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"jucejikzoeovvtz\"},\"sparkConfiguration\":{\"bqzolxr\":\"tjklntikyjuzk\"}},\"stage\":\"hqjwtrhtgvg\",\"entities\":[\"rrkolawjmjs\"],\"provisioningState\":\"Canceled\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"fzzzwyjafitlhg\",\"tags\":{\"whmozusgzvlnsnnj\":\"uchlgmltx\",\"rag\":\"fpafolpymwamxq\",\"vl\":\"gdphtvdula\",\"rupdwvnphcnzq\":\"jchcsrlzknmzla\"},\"properties\":{\"smlzzhzdtxetlgy\":\"hmqrhvthlaiwdc\",\"geaar\":\"lhqvlnnpxybafi\",\"lidwcwvmzegjon\":\"gjekglklby\"}},\"id\":\"jirwgdnqzbrfk\",\"name\":\"pzhz\",\"type\":\"tk\"}],\"nextLink\":\"cit\"}") - .toObject(FeaturesetVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("k", model.value().get(0).properties().description()); - Assertions.assertEquals("immoiroqboshbrag", model.value().get(0).properties().tags().get("pyyrmfs")); - Assertions.assertEquals("epvufhbzehew", model.value().get(0).properties().properties().get("oqhnlb")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("ewuninvud", model.value().get(0).properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.ONLINE_AND_OFFLINE, - model.value().get(0).properties().materializationSettings().storeType()); - Assertions.assertEquals("ec", model.value().get(0).properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("ct", - model.value().get(0).properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("xdtddmflhuytxzv", - model.value().get(0).properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, - model.value().get(0).properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(709462942, - model.value().get(0).properties().materializationSettings().schedule().interval()); - Assertions.assertEquals("pxbannovvoxc", - model.value().get(0).properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, - model.value().get(0).properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("vevfxz", - model.value().get(0).properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("hbzxli", - model.value().get(0).properties().materializationSettings().sparkConfiguration().get("hrdd")); - Assertions.assertEquals("m", model.value().get(0).properties().stage()); - Assertions.assertEquals("plfmuvapckccrrvw", model.value().get(0).properties().entities().get(0)); - Assertions.assertEquals("cit", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetVersionResourceArmPaginatedResult model - = new FeaturesetVersionResourceArmPaginatedResult().withValue(Arrays.asList( - new FeaturesetVersionInner().withProperties(new FeaturesetVersionProperties().withDescription("k") - .withTags(mapOf("pyyrmfs", "immoiroqboshbrag", "opfppdbwnupgah", "bpav", "jcaacfdmmcpugm", "kuma")) - .withProperties( - mapOf("oqhnlb", "epvufhbzehew", "krsrrmoucs", "nbldxeaclgschori", "abeolhbhlvbm", "fldpuviyfc")) - .withIsArchived(false) - .withIsAnonymous(true) - .withSpecification(new FeaturesetSpecification().withPath("ewuninvud")) - .withMaterializationSettings(new MaterializationSettings() - .withStoreType(MaterializationStoreType.ONLINE_AND_OFFLINE) - .withSchedule(new RecurrenceTrigger().withEndTime("ec") - .withStartTime("ct") - .withTimeZone("xdtddmflhuytxzv") - .withFrequency(RecurrenceFrequency.DAY) - .withInterval(709462942) - .withSchedule( - new RecurrenceSchedule().withHours(Arrays.asList()).withMinutes(Arrays.asList()))) - .withNotification(new NotificationSetting() - .withEmails(Arrays.asList("pxbannovvoxc", "ytprwnwvroev", "tlyo", "rrrouuxvnsa")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, - EmailNotificationEnableType.JOB_CANCELLED, EmailNotificationEnableType.JOB_COMPLETED, - EmailNotificationEnableType.JOB_CANCELLED)) - .withWebhooks(mapOf("zrxklobd", new Webhook(), "nazpmk", new Webhook()))) - .withResource(new MaterializationComputeResource().withInstanceType("vevfxz")) - .withSparkConfiguration( - mapOf("hrdd", "hbzxli", "nzqcy", "tfgxqbawpcb", "yuicdhzbdy", "napqo", "bid", "wwgbdv"))) - .withStage("m") - .withEntities(Arrays.asList("plfmuvapckccrrvw"))), - new FeaturesetVersionInner() - .withProperties(new FeaturesetVersionProperties().withDescription("clutnpqme") - .withTags(mapOf("mykyujxsglhs", "jk", "fihotj", "rryejylmbkzudnig", "refqy", "wlpxuzzjg")) - .withProperties(mapOf("fb", "toihiqakydi", "spodaqax", "kwpzdqtvh")) - .withIsArchived(false) - .withIsAnonymous(false) - .withSpecification(new FeaturesetSpecification().withPath("xnq")) - .withMaterializationSettings( - new MaterializationSettings().withStoreType(MaterializationStoreType.NONE) - .withSchedule(new RecurrenceTrigger().withEndTime("qyki") - .withStartTime("d") - .withTimeZone("aoaf") - .withFrequency(RecurrenceFrequency.MINUTE) - .withInterval(1896459173) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList()) - .withMinutes(Arrays.asList()))) - .withNotification( - new NotificationSetting().withEmails(Arrays.asList("v", "xmycjimryvwgcw")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED, - EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("esyds", new Webhook()))) - .withResource(new MaterializationComputeResource().withInstanceType("fo")) - .withSparkConfiguration(mapOf("llklmtk", "bvopwndyqle", "dfjmzsyzfhotlh", "lowkxxpvb", - "yych", "k", "hv", "nsjlpjrtws"))) - .withStage("icphvtrrmhw") - .withEntities(Arrays.asList("dpyflubhv", "glrocuy", "lw"))), - new FeaturesetVersionInner() - .withProperties( - new FeaturesetVersionProperties().withDescription("fzzzwyjafitlhg") - .withTags(mapOf("whmozusgzvlnsnnj", "uchlgmltx", "rag", "fpafolpymwamxq", "vl", - "gdphtvdula", "rupdwvnphcnzq", "jchcsrlzknmzla")) - .withProperties(mapOf("smlzzhzdtxetlgy", "hmqrhvthlaiwdc", "geaar", "lhqvlnnpxybafi", - "lidwcwvmzegjon", "gjekglklby")) - .withIsArchived(true) - .withIsAnonymous(true) - .withSpecification(new FeaturesetSpecification().withPath("fpubntnbatz")) - .withMaterializationSettings(new MaterializationSettings() - .withStoreType(MaterializationStoreType.ONLINE) - .withSchedule(new RecurrenceTrigger().withEndTime("el") - .withStartTime("ttcjuhplrvkmjc") - .withTimeZone("jvlgfggcvkyyliz") - .withFrequency(RecurrenceFrequency.MONTH) - .withInterval(1702744153) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList()) - .withMinutes(Arrays.asList()))) - .withNotification( - new NotificationSetting().withEmails(Arrays.asList("psfxsf", "ztlvtmvagbwidqlv")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED, - EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("fizr", new Webhook(), "jfnmjmvlwyz", new Webhook(), - "iblkujr", new Webhook(), "lfojuidjp", new Webhook()))) - .withResource(new MaterializationComputeResource().withInstanceType("jucejikzoeovvtz")) - .withSparkConfiguration(mapOf("bqzolxr", "tjklntikyjuzk"))) - .withStage("hqjwtrhtgvg") - .withEntities(Arrays.asList("rrkolawjmjs"))))) - .withNextLink("cit"); - model = BinaryData.fromObject(model).toObject(FeaturesetVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("k", model.value().get(0).properties().description()); - Assertions.assertEquals("immoiroqboshbrag", model.value().get(0).properties().tags().get("pyyrmfs")); - Assertions.assertEquals("epvufhbzehew", model.value().get(0).properties().properties().get("oqhnlb")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("ewuninvud", model.value().get(0).properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.ONLINE_AND_OFFLINE, - model.value().get(0).properties().materializationSettings().storeType()); - Assertions.assertEquals("ec", model.value().get(0).properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("ct", - model.value().get(0).properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("xdtddmflhuytxzv", - model.value().get(0).properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, - model.value().get(0).properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(709462942, - model.value().get(0).properties().materializationSettings().schedule().interval()); - Assertions.assertEquals("pxbannovvoxc", - model.value().get(0).properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, - model.value().get(0).properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("vevfxz", - model.value().get(0).properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("hbzxli", - model.value().get(0).properties().materializationSettings().sparkConfiguration().get("hrdd")); - Assertions.assertEquals("m", model.value().get(0).properties().stage()); - Assertions.assertEquals("plfmuvapckccrrvw", model.value().get(0).properties().entities().get(0)); - Assertions.assertEquals("cit", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillMockTests.java deleted file mode 100644 index 5759b0c494b9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataAvailabilityStatus; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillResponse; -import com.azure.resourcemanager.machinelearning.models.FeatureWindow; -import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; -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 reactor.core.publisher.Mono; - -public final class FeaturesetVersionsBackfillMockTests { - @Test - public void testBackfill() throws Exception { - String responseStr = "{\"jobIds\":[\"mmud\",\"ow\",\"bscidkwznw\",\"tlizdoys\"]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturesetVersionBackfillResponse response = manager.featuresetVersions() - .backfill("qxajsiueaibqjbi", "bwxuypcuriwll", "tclveqdqtzsh", "lwjxrymiysgh", - new FeaturesetVersionBackfillRequest().withDisplayName("mq") - .withDescription("kkw") - .withFeatureWindow( - new FeatureWindow().withFeatureWindowStart(OffsetDateTime.parse("2020-12-23T10:58Z")) - .withFeatureWindowEnd(OffsetDateTime.parse("2021-01-24T18:11:33Z"))) - .withDataAvailabilityStatus( - Arrays.asList(DataAvailabilityStatus.NONE, DataAvailabilityStatus.INCOMPLETE)) - .withJobId("aadnxbss") - .withTags(mapOf("xxccf", "ialrqhw")) - .withResource(new MaterializationComputeResource().withInstanceType("ozaiyvrex")) - .withSparkConfiguration(mapOf("clujyww", "zrikno")) - .withProperties(mapOf("msobuahoki", "usnawbncljk")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mmud", response.jobIds().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateMockTests.java deleted file mode 100644 index 8c49e9542b43..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersion; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties; -import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; -import com.azure.resourcemanager.machinelearning.models.MaterializationSettings; -import com.azure.resourcemanager.machinelearning.models.MaterializationStoreType; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -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 reactor.core.publisher.Mono; - -public final class FeaturesetVersionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"specification\":{\"path\":\"nlcvlmrvhe\"},\"materializationSettings\":{\"storeType\":\"OnlineAndOffline\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Day\",\"interval\":460923091,\"schedule\":{\"hours\":[1207128416],\"minutes\":[850079120],\"weekDays\":[\"Friday\"],\"monthDays\":[1640588997,1906393199]},\"endTime\":\"d\",\"startTime\":\"talzcjaw\",\"timeZone\":\"xownoypqussxi\"},\"notification\":{\"emails\":[\"rsd\",\"tjxlopncca\"],\"emailOn\":[\"JobCancelled\",\"JobCompleted\",\"JobCancelled\",\"JobCancelled\"],\"webhooks\":{\"ijlwr\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"bzjpgh\"},\"sparkConfiguration\":{\"xi\":\"pceqaklsfxl\",\"xpuokk\":\"ymfqmvnhsfjxtusb\"}},\"stage\":\"tsppgt\",\"entities\":[\"nalpwa\",\"lkw\"],\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"njdrnfgtm\",\"tags\":{\"xufuwcajyezlk\":\"lhnxqvzzi\",\"bpnrgnxwrfu\":\"iveftugiwsvlfp\",\"xzyfqcjc\":\"zaysfzuvu\",\"nazpgvfcubxlmq\":\"vbqovkzueytp\"},\"properties\":{\"yfuupqkrzvdjpcev\":\"bqrlbyh\",\"phhpwxghwwfqzwys\":\"kkgqfjw\"}},\"id\":\"qqmdajsqepxftyi\",\"name\":\"adsliifdrbsrpjsp\",\"type\":\"ib\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturesetVersion response = manager.featuresetVersions() - .define("dvuotkvkbpmk") - .withExistingFeatureset("z", "bogdj", "uybcp") - .withProperties(new FeaturesetVersionProperties().withDescription("kdihslnbyi") - .withTags(mapOf("wjvxycygcvgebfe", "t", "nsicucqteciexsc", "tyantecvttkgopdj", "jlypwgwbycfam", "hzh", - "irhhbogxw", "ikisppygothi")) - .withProperties( - mapOf("oza", "ymyerpu", "wdkgbzjoyyptno", "utjliwb", "ejzxkflzqwkxxboa", "doqxkzeowizv")) - .withIsArchived(false) - .withIsAnonymous(false) - .withSpecification(new FeaturesetSpecification().withPath("nkcwauylkb")) - .withMaterializationSettings(new MaterializationSettings() - .withStoreType(MaterializationStoreType.ONLINE) - .withSchedule(new RecurrenceTrigger().withEndTime("hyuxxeike") - .withStartTime("pwrnhqaf") - .withTimeZone("vysphjkxgfmes") - .withFrequency(RecurrenceFrequency.MONTH) - .withInterval(1882121848) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList(1636152298, 1171310815)) - .withMinutes(Arrays.asList(799567544, 1872935428)) - .withWeekDays(Arrays.asList(WeekDay.SATURDAY, WeekDay.WEDNESDAY)) - .withMonthDays(Arrays.asList(558205337)))) - .withNotification(new NotificationSetting().withEmails(Arrays.asList("qfynvckx", "anlvo", "rvzhdn")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, - EmailNotificationEnableType.JOB_CANCELLED)) - .withWebhooks(mapOf("ssgq", new Webhook(), "nolspvxpiegxlzd", new Webhook(), "atptzkmfvdrkcw", - new Webhook()))) - .withResource(new MaterializationComputeResource().withInstanceType("nwsffiahf")) - .withSparkConfiguration(mapOf("ozkdqzhr", "zzxirxxk"))) - .withStage("ivvpyznjwmduuzn") - .withEntities(Arrays.asList("zzwsesqy", "ktvofgxorhsxcs", "axcme", "kpxt"))) - .create(); - - Assertions.assertEquals("njdrnfgtm", response.properties().description()); - Assertions.assertEquals("lhnxqvzzi", response.properties().tags().get("xufuwcajyezlk")); - Assertions.assertEquals("bqrlbyh", response.properties().properties().get("yfuupqkrzvdjpcev")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("nlcvlmrvhe", response.properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.ONLINE_AND_OFFLINE, - response.properties().materializationSettings().storeType()); - Assertions.assertEquals("d", response.properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("talzcjaw", response.properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("xownoypqussxi", response.properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, - response.properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(460923091, response.properties().materializationSettings().schedule().interval()); - Assertions.assertEquals(1207128416, - response.properties().materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(850079120, - response.properties().materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.FRIDAY, - response.properties().materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1640588997, - response.properties().materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("rsd", response.properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - response.properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("bzjpgh", response.properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("pceqaklsfxl", - response.properties().materializationSettings().sparkConfiguration().get("xi")); - Assertions.assertEquals("tsppgt", response.properties().stage()); - Assertions.assertEquals("nalpwa", response.properties().entities().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteMockTests.java deleted file mode 100644 index 50fcbf89107a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesetVersionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.featuresetVersions() - .delete("lj", "ki", "magfyinmajj", "plgtwfkflcvbzkbe", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetWithResponseMockTests.java deleted file mode 100644 index 658f5f3caf42..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersion; -import com.azure.resourcemanager.machinelearning.models.MaterializationStoreType; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesetVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"specification\":{\"path\":\"deoubv\"},\"materializationSettings\":{\"storeType\":\"OnlineAndOffline\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Day\",\"interval\":1311355901,\"schedule\":{\"hours\":[1757358361,1263017411,513981146],\"minutes\":[2095072946,1962296302],\"weekDays\":[\"Wednesday\",\"Thursday\",\"Saturday\",\"Thursday\"],\"monthDays\":[1281228089,1358126478,1774923631,1733089394]},\"endTime\":\"lbeqczzscgrop\",\"startTime\":\"giscgk\",\"timeZone\":\"iyikqlyoorm\"},\"notification\":{\"emails\":[\"lqijykck\"],\"emailOn\":[\"JobCancelled\"],\"webhooks\":{\"bcpiadjslvxs\":{\"webhookType\":\"Webhook\"},\"lcd\":{\"webhookType\":\"Webhook\"},\"bibfviacghygmt\":{\"webhookType\":\"Webhook\"},\"ivpzjnrw\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"zmxqyj\"},\"sparkConfiguration\":{\"kew\":\"jpy\"}},\"stage\":\"kzmsyezxifjuvhuo\",\"entities\":[\"twvkuhtdxd\",\"odzdh\",\"knmcvmxiun\",\"ifuahtkkccrusrzs\"],\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"ayxnlvt\",\"tags\":{\"wslctilbxnny\":\"o\",\"dfhpelzavohv\":\"jt\",\"liqcbonqjoek\":\"bncdrchuew\",\"xrbalvkfdq\":\"jcglvobctit\"},\"properties\":{\"yrqlazfjltck\":\"rqhxfqkqp\",\"pxalkqlvbkzaiyr\":\"jvdxhyfvqtdexfd\"}},\"id\":\"woi\",\"name\":\"iniyoizuww\",\"type\":\"crigbjbelnqalbs\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturesetVersion response = manager.featuresetVersions() - .getWithResponse("uafbddm", "fqynmldhgzzohtag", "yuhdqhqgrksypoo", "fxzobovsvhbtdgxg", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ayxnlvt", response.properties().description()); - Assertions.assertEquals("o", response.properties().tags().get("wslctilbxnny")); - Assertions.assertEquals("rqhxfqkqp", response.properties().properties().get("yrqlazfjltck")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("deoubv", response.properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.ONLINE_AND_OFFLINE, - response.properties().materializationSettings().storeType()); - Assertions.assertEquals("lbeqczzscgrop", response.properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("giscgk", response.properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("iyikqlyoorm", response.properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, - response.properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(1311355901, response.properties().materializationSettings().schedule().interval()); - Assertions.assertEquals(1757358361, - response.properties().materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(2095072946, - response.properties().materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.WEDNESDAY, - response.properties().materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1281228089, - response.properties().materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("lqijykck", - response.properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - response.properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("zmxqyj", response.properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("jpy", response.properties().materializationSettings().sparkConfiguration().get("kew")); - Assertions.assertEquals("kzmsyezxifjuvhuo", response.properties().stage()); - Assertions.assertEquals("twvkuhtdxd", response.properties().entities().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListMockTests.java deleted file mode 100644 index eef98e00dceb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersion; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.MaterializationStoreType; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesetVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"specification\":{\"path\":\"zuimpiybmybtihcg\"},\"materializationSettings\":{\"storeType\":\"None\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Hour\",\"interval\":754391268,\"schedule\":{\"hours\":[471304798,2070713613],\"minutes\":[78034116,484189663,1618494270],\"weekDays\":[\"Thursday\",\"Monday\",\"Wednesday\"],\"monthDays\":[1881150095,1100953393]},\"endTime\":\"iasichhxqnlmjv\",\"startTime\":\"sdfibwvhw\",\"timeZone\":\"hysrmk\"},\"notification\":{\"emails\":[\"nxzljxaayxpd\",\"vgyujkxjge\",\"zdbigitra\"],\"emailOn\":[\"JobCancelled\"],\"webhooks\":{\"irnbpiddvbxqxoli\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"lsr\"},\"sparkConfiguration\":{\"ktbay\":\"vtzy\",\"lk\":\"asnj\",\"fdssofuxys\":\"yzlkqyezyzxkr\",\"qajfwz\":\"ltkqvikoi\"}},\"stage\":\"fgoqv\",\"entities\":[\"eiydoqbr\"],\"provisioningState\":\"Failed\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"ednkz\",\"tags\":{\"xpkrwgznacmkw\":\"jawpzrtse\"},\"properties\":{\"niadgzxbwn\":\"l\",\"u\":\"yihct\"}},\"id\":\"zozbkh\",\"name\":\"vughutiql\",\"type\":\"vnfyfyftkvzb\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.featuresetVersions() - .list("wjudx", "fvn", "zcffchn", "iyevjeht", "eaoxxsehfl", ListViewType.ARCHIVED_ONLY, 1116596337, "bpyz", - "cplphfstvurtkce", "yvaxwzbwxx", "disxsrrhr", "rbbedrn", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ednkz", response.iterator().next().properties().description()); - Assertions.assertEquals("jawpzrtse", response.iterator().next().properties().tags().get("xpkrwgznacmkw")); - Assertions.assertEquals("l", response.iterator().next().properties().properties().get("niadgzxbwn")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("zuimpiybmybtihcg", response.iterator().next().properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.NONE, - response.iterator().next().properties().materializationSettings().storeType()); - Assertions.assertEquals("iasichhxqnlmjv", - response.iterator().next().properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("sdfibwvhw", - response.iterator().next().properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("hysrmk", - response.iterator().next().properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.HOUR, - response.iterator().next().properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(754391268, - response.iterator().next().properties().materializationSettings().schedule().interval()); - Assertions.assertEquals(471304798, - response.iterator().next().properties().materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(78034116, - response.iterator().next().properties().materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, - response.iterator().next().properties().materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1881150095, - response.iterator().next().properties().materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("nxzljxaayxpd", - response.iterator().next().properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - response.iterator().next().properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("lsr", - response.iterator().next().properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("vtzy", - response.iterator().next().properties().materializationSettings().sparkConfiguration().get("ktbay")); - Assertions.assertEquals("fgoqv", response.iterator().next().properties().stage()); - Assertions.assertEquals("eiydoqbr", response.iterator().next().properties().entities().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerInnerTests.java deleted file mode 100644 index 80982e3bc57d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturestoreEntityContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturestoreEntityContainerInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"scubiwsdrnpxqwod\",\"nextVersion\":\"fjxcjrmmuabwibv\",\"description\":\"gjonmcy\",\"tags\":{\"bamwineo\":\"y\",\"vevboclzh\":\"vfkakpold\",\"gvttx\":\"jknyu\",\"a\":\"nrup\"},\"properties\":{\"swyskbruffg\":\"dixtreki\",\"lcouqehbhbcdszir\":\"lukkutvlxhrpqhvm\"}},\"id\":\"an\",\"name\":\"oypmbltoorm\",\"type\":\"fqlwxldykalsy\"}") - .toObject(FeaturestoreEntityContainerInner.class); - Assertions.assertEquals("gjonmcy", model.properties().description()); - Assertions.assertEquals("y", model.properties().tags().get("bamwineo")); - Assertions.assertEquals("dixtreki", model.properties().properties().get("swyskbruffg")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturestoreEntityContainerInner model = new FeaturestoreEntityContainerInner() - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("gjonmcy") - .withTags(mapOf("bamwineo", "y", "vevboclzh", "vfkakpold", "gvttx", "jknyu", "a", "nrup")) - .withProperties(mapOf("swyskbruffg", "dixtreki", "lcouqehbhbcdszir", "lukkutvlxhrpqhvm")) - .withIsArchived(true)); - model = BinaryData.fromObject(model).toObject(FeaturestoreEntityContainerInner.class); - Assertions.assertEquals("gjonmcy", model.properties().description()); - Assertions.assertEquals("y", model.properties().tags().get("bamwineo")); - Assertions.assertEquals("dixtreki", model.properties().properties().get("swyskbruffg")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerPropertiesTests.java deleted file mode 100644 index 12af91c10e5d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturestoreEntityContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturestoreEntityContainerProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"pnnbm\",\"nextVersion\":\"sibjgs\",\"description\":\"xxahmrnadzyqegxy\",\"tags\":{\"bjijkgqxnh\":\"inbmh\",\"aujvaa\":\"bkezn\",\"xw\":\"nggiycwkdtaa\",\"rq\":\"ekaum\"},\"properties\":{\"bnxwbjsidbirkf\":\"mqkra\",\"dgo\":\"kso\",\"zkye\":\"ewijymrhbguz\",\"o\":\"nfnzhhh\"}}") - .toObject(FeaturestoreEntityContainerProperties.class); - Assertions.assertEquals("xxahmrnadzyqegxy", model.description()); - Assertions.assertEquals("inbmh", model.tags().get("bjijkgqxnh")); - Assertions.assertEquals("mqkra", model.properties().get("bnxwbjsidbirkf")); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturestoreEntityContainerProperties model - = new FeaturestoreEntityContainerProperties().withDescription("xxahmrnadzyqegxy") - .withTags(mapOf("bjijkgqxnh", "inbmh", "aujvaa", "bkezn", "xw", "nggiycwkdtaa", "rq", "ekaum")) - .withProperties(mapOf("bnxwbjsidbirkf", "mqkra", "dgo", "kso", "zkye", "ewijymrhbguz", "o", "nfnzhhh")) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(FeaturestoreEntityContainerProperties.class); - Assertions.assertEquals("xxahmrnadzyqegxy", model.description()); - Assertions.assertEquals("inbmh", model.tags().get("bjijkgqxnh")); - Assertions.assertEquals("mqkra", model.properties().get("bnxwbjsidbirkf")); - Assertions.assertEquals(false, model.isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index 8d9c0bd9778e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturestoreEntityContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturestoreEntityContainerResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":true,\"latestVersion\":\"dhga\",\"nextVersion\":\"pirpiwrqof\",\"description\":\"o\",\"tags\":{\"cbjpibkephuu\":\"nlexw\",\"qpbrlc\":\"erctatoyin\"},\"properties\":{\"crrpcjttbstvje\":\"uczkgofxyfsruc\",\"mlghktuidvrmazlp\":\"qnrmvvfko\"}},\"id\":\"wex\",\"name\":\"mzvlazipbh\",\"type\":\"wvqsgny\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"ens\",\"nextVersion\":\"meyyvpkpatlb\",\"description\":\"pzgsk\",\"tags\":{\"xwcdomm\":\"hfvolmknb\"},\"properties\":{\"zfgbrttuiaclkie\":\"qa\",\"hiqfyuttdiy\":\"hajlfn\",\"vnwsw\":\"b\",\"cvogygzyvne\":\"txkyctwwgzwxjlm\"}},\"id\":\"aifghtmoqqt\",\"name\":\"ffhzbkrkjjjavfq\",\"type\":\"vhnqo\"},{\"properties\":{\"provisioningState\":\"Updating\",\"isArchived\":true,\"latestVersion\":\"yetesy\",\"nextVersion\":\"idbz\",\"description\":\"hqtfbovn\",\"tags\":{\"kzyaup\":\"bwetnjuhpsp\",\"vmaonurjt\":\"accxnafbwqroohtu\"},\"properties\":{\"lbl\":\"hihpvecmsl\",\"bsjuscvsfx\":\"jxl\",\"cydrtceukdqkk\":\"gctmgxuupbezq\"}},\"id\":\"hztgeqmgqzgwld\",\"name\":\"ychillcecfe\",\"type\":\"uwaoaguhicqlli\"},{\"properties\":{\"provisioningState\":\"Updating\",\"isArchived\":true,\"latestVersion\":\"jvhrweft\",\"nextVersion\":\"qejpmvssehaepwa\",\"description\":\"xtczhupeuknijd\",\"tags\":{\"ydjfb\":\"es\",\"v\":\"c\",\"uflgbhgauacdixm\":\"hulrtywikdmhla\",\"ryjqgdkf\":\"ufr\"},\"properties\":{\"vjhvefgwbm\":\"oeoq\"}},\"id\":\"c\",\"name\":\"ntasfaymxbu\",\"type\":\"pzealbmqkyojw\"}],\"nextLink\":\"fkmbtsuahxsgxj\"}") - .toObject(FeaturestoreEntityContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("o", model.value().get(0).properties().description()); - Assertions.assertEquals("nlexw", model.value().get(0).properties().tags().get("cbjpibkephuu")); - Assertions.assertEquals("uczkgofxyfsruc", model.value().get(0).properties().properties().get("crrpcjttbstvje")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("fkmbtsuahxsgxj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturestoreEntityContainerResourceArmPaginatedResult model - = new FeaturestoreEntityContainerResourceArmPaginatedResult() - .withValue( - Arrays.asList( - new FeaturestoreEntityContainerInner() - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("o") - .withTags(mapOf("cbjpibkephuu", "nlexw", "qpbrlc", "erctatoyin")) - .withProperties( - mapOf("crrpcjttbstvje", "uczkgofxyfsruc", "mlghktuidvrmazlp", "qnrmvvfko")) - .withIsArchived(true)), - new FeaturestoreEntityContainerInner() - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("pzgsk") - .withTags(mapOf("xwcdomm", "hfvolmknb")) - .withProperties(mapOf("zfgbrttuiaclkie", "qa", "hiqfyuttdiy", "hajlfn", "vnwsw", "b", - "cvogygzyvne", "txkyctwwgzwxjlm")) - .withIsArchived(true)), - new FeaturestoreEntityContainerInner() - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("hqtfbovn") - .withTags(mapOf("kzyaup", "bwetnjuhpsp", "vmaonurjt", "accxnafbwqroohtu")) - .withProperties( - mapOf("lbl", "hihpvecmsl", "bsjuscvsfx", "jxl", "cydrtceukdqkk", "gctmgxuupbezq")) - .withIsArchived(true)), - new FeaturestoreEntityContainerInner().withProperties( - new FeaturestoreEntityContainerProperties().withDescription("xtczhupeuknijd") - .withTags(mapOf("ydjfb", "es", "v", "c", "uflgbhgauacdixm", "hulrtywikdmhla", - "ryjqgdkf", "ufr")) - .withProperties(mapOf("vjhvefgwbm", "oeoq")) - .withIsArchived(true)))) - .withNextLink("fkmbtsuahxsgxj"); - model = BinaryData.fromObject(model).toObject(FeaturestoreEntityContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("o", model.value().get(0).properties().description()); - Assertions.assertEquals("nlexw", model.value().get(0).properties().tags().get("cbjpibkephuu")); - Assertions.assertEquals("uczkgofxyfsruc", model.value().get(0).properties().properties().get("crrpcjttbstvje")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("fkmbtsuahxsgxj", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateMockTests.java deleted file mode 100644 index f7d14448a078..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainer; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; -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 reactor.core.publisher.Mono; - -public final class FeaturestoreEntityContainersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"wxrqiwxeppu\",\"nextVersion\":\"izoak\",\"description\":\"jyv\",\"tags\":{\"s\":\"vfbmxzobpg\",\"ybyilhdbb\":\"lkpajio\",\"t\":\"meuyxhcwu\",\"choji\":\"go\"},\"properties\":{\"frgiplxrifbsbk\":\"q\",\"dbbpoijsxvrutji\":\"fk\",\"ktpj\":\"uufknarscx\"}},\"id\":\"zos\",\"name\":\"rsm\",\"type\":\"nn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturestoreEntityContainer response = manager.featurestoreEntityContainers() - .define("jckyocyb") - .withExistingWorkspace("cyulwzjorvsgmkk", "les") - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("uywfhltwlz") - .withTags(mapOf("ybmkmxusm", "iprlcgqewmnwyhq", "uniu", "papepwpbnjckow", "zypmmyr", "ysvnddllbwnmvh")) - .withProperties(mapOf("tltlmczcxouane", "douzohihqlwyqsxe", "pvdmtfcstucmi", "epgqztakovslv", "qitiut", - "sdsnuqqg", "xjkclz", "ka")) - .withIsArchived(true)) - .create(); - - Assertions.assertEquals("jyv", response.properties().description()); - Assertions.assertEquals("vfbmxzobpg", response.properties().tags().get("s")); - Assertions.assertEquals("q", response.properties().properties().get("frgiplxrifbsbk")); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteMockTests.java deleted file mode 100644 index ff4f3f76de62..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturestoreEntityContainersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.featurestoreEntityContainers() - .delete("lmegj", "oseohoygowdzizzu", "d", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntityWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntityWithResponseMockTests.java deleted file mode 100644 index 3a1a5c42f35e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntityWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturestoreEntityContainersGetEntityWithResponseMockTests { - @Test - public void testGetEntityWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":true,\"latestVersion\":\"sihdzxeufjybtz\",\"nextVersion\":\"xdmppib\",\"description\":\"qjcphofyoqfvm\",\"tags\":{\"muzltnneolghgte\":\"l\",\"qdtykcaocjuuxqnk\":\"tyxlsycckj\",\"mrwc\":\"c\"},\"properties\":{\"pigla\":\"jcvewlrjrnaktj\",\"hrrxmc\":\"heqjc\"}},\"id\":\"rqnuahhke\",\"name\":\"v\",\"type\":\"rbdujpshiszivr\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturestoreEntityContainer response = manager.featurestoreEntityContainers() - .getEntityWithResponse("rcppqvovsirtas", "piplpexhhjjatlep", "biroxamnvrcq", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("qjcphofyoqfvm", response.properties().description()); - Assertions.assertEquals("l", response.properties().tags().get("muzltnneolghgte")); - Assertions.assertEquals("jcvewlrjrnaktj", response.properties().properties().get("pigla")); - Assertions.assertEquals(true, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListMockTests.java deleted file mode 100644 index 19f9395e6d13..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainer; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturestoreEntityContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":true,\"latestVersion\":\"nybnt\",\"nextVersion\":\"w\",\"description\":\"xujzox\",\"tags\":{\"hulxgce\":\"qtkrjucazwedm\",\"anudvqannenxg\":\"x\"},\"properties\":{\"pqifsgzfgxwf\":\"mgblqyfgzb\"}},\"id\":\"iq\",\"name\":\"dsohwnnayo\",\"type\":\"ghjxhpppnksqi\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.featurestoreEntityContainers() - .list("n", "mfooi", "pn", "fvqgcuwgkmqcbr", ListViewType.ACTIVE_ONLY, 785699585, "fuxktsxnikc", "ittfmlp", - "htepasjebrinvfc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xujzox", response.iterator().next().properties().description()); - Assertions.assertEquals("qtkrjucazwedm", response.iterator().next().properties().tags().get("hulxgce")); - Assertions.assertEquals("mgblqyfgzb", response.iterator().next().properties().properties().get("pqifsgzfgxwf")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionInnerTests.java deleted file mode 100644 index 89e29e41dab9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties; -import com.azure.resourcemanager.machinelearning.models.IndexColumn; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturestoreEntityVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturestoreEntityVersionInner model = BinaryData.fromString( - "{\"properties\":{\"indexColumns\":[{\"dataType\":\"Float\",\"columnName\":\"xhzzyse\"}],\"stage\":\"sxivzrrryvei\",\"provisioningState\":\"Canceled\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"atvfuzkaftj\",\"tags\":{\"tgrqgdgkkile\":\"uxwigsyeipqdsm\"},\"properties\":{\"baedorvvmqfl\":\"csmknhwt\",\"gdexjd\":\"ygbdgwumgxdgdhpa\"}},\"id\":\"jsaqwotmmwllcols\",\"name\":\"sxap\",\"type\":\"efh\"}") - .toObject(FeaturestoreEntityVersionInner.class); - Assertions.assertEquals("atvfuzkaftj", model.properties().description()); - Assertions.assertEquals("uxwigsyeipqdsm", model.properties().tags().get("tgrqgdgkkile")); - Assertions.assertEquals("csmknhwt", model.properties().properties().get("baedorvvmqfl")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.FLOAT, model.properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("xhzzyse", model.properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("sxivzrrryvei", model.properties().stage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturestoreEntityVersionInner model = new FeaturestoreEntityVersionInner() - .withProperties(new FeaturestoreEntityVersionProperties().withDescription("atvfuzkaftj") - .withTags(mapOf("tgrqgdgkkile", "uxwigsyeipqdsm")) - .withProperties(mapOf("baedorvvmqfl", "csmknhwt", "gdexjd", "ygbdgwumgxdgdhpa")) - .withIsArchived(true) - .withIsAnonymous(true) - .withIndexColumns( - Arrays.asList(new IndexColumn().withDataType(FeatureDataType.FLOAT).withColumnName("xhzzyse"))) - .withStage("sxivzrrryvei")); - model = BinaryData.fromObject(model).toObject(FeaturestoreEntityVersionInner.class); - Assertions.assertEquals("atvfuzkaftj", model.properties().description()); - Assertions.assertEquals("uxwigsyeipqdsm", model.properties().tags().get("tgrqgdgkkile")); - Assertions.assertEquals("csmknhwt", model.properties().properties().get("baedorvvmqfl")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.FLOAT, model.properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("xhzzyse", model.properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("sxivzrrryvei", model.properties().stage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionPropertiesTests.java deleted file mode 100644 index 4f4a75c911be..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties; -import com.azure.resourcemanager.machinelearning.models.IndexColumn; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturestoreEntityVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturestoreEntityVersionProperties model = BinaryData.fromString( - "{\"indexColumns\":[{\"dataType\":\"Long\",\"columnName\":\"kjljnhv\"},{\"dataType\":\"Boolean\",\"columnName\":\"ek\"},{\"dataType\":\"Datetime\",\"columnName\":\"snbksdqhj\"},{\"dataType\":\"Long\",\"columnName\":\"xeslkhhustcpoqm\"}],\"stage\":\"nwqjwgokn\",\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"b\",\"tags\":{\"ensvkzykjtj\":\"bkjbz\",\"hcdpkupnqrmgj\":\"nsxfwu\",\"fiz\":\"bpkuwxeoio\",\"jzwfb\":\"av\"},\"properties\":{\"mmfz\":\"y\",\"rzx\":\"bfw\"}}") - .toObject(FeaturestoreEntityVersionProperties.class); - Assertions.assertEquals("b", model.description()); - Assertions.assertEquals("bkjbz", model.tags().get("ensvkzykjtj")); - Assertions.assertEquals("y", model.properties().get("mmfz")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(FeatureDataType.LONG, model.indexColumns().get(0).dataType()); - Assertions.assertEquals("kjljnhv", model.indexColumns().get(0).columnName()); - Assertions.assertEquals("nwqjwgokn", model.stage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturestoreEntityVersionProperties model = new FeaturestoreEntityVersionProperties().withDescription("b") - .withTags(mapOf("ensvkzykjtj", "bkjbz", "hcdpkupnqrmgj", "nsxfwu", "fiz", "bpkuwxeoio", "jzwfb", "av")) - .withProperties(mapOf("mmfz", "y", "rzx", "bfw")) - .withIsArchived(false) - .withIsAnonymous(true) - .withIndexColumns( - Arrays.asList(new IndexColumn().withDataType(FeatureDataType.LONG).withColumnName("kjljnhv"), - new IndexColumn().withDataType(FeatureDataType.BOOLEAN).withColumnName("ek"), - new IndexColumn().withDataType(FeatureDataType.DATETIME).withColumnName("snbksdqhj"), - new IndexColumn().withDataType(FeatureDataType.LONG).withColumnName("xeslkhhustcpoqm"))) - .withStage("nwqjwgokn"); - model = BinaryData.fromObject(model).toObject(FeaturestoreEntityVersionProperties.class); - Assertions.assertEquals("b", model.description()); - Assertions.assertEquals("bkjbz", model.tags().get("ensvkzykjtj")); - Assertions.assertEquals("y", model.properties().get("mmfz")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(FeatureDataType.LONG, model.indexColumns().get(0).dataType()); - Assertions.assertEquals("kjljnhv", model.indexColumns().get(0).columnName()); - Assertions.assertEquals("nwqjwgokn", model.stage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionResourceArmPaginatedResultTests.java deleted file mode 100644 index c8dcd9cf9512..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.IndexColumn; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturestoreEntityVersionResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturestoreEntityVersionResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"indexColumns\":[{\"dataType\":\"Boolean\",\"columnName\":\"ycyarnroohg\"},{\"dataType\":\"Integer\",\"columnName\":\"oghktdpycz\"},{\"dataType\":\"Binary\",\"columnName\":\"ocnhzqrottjzcfyj\"}],\"stage\":\"twrlohapqin\",\"provisioningState\":\"Updating\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"d\",\"tags\":{\"pjby\":\"jzralc\",\"hf\":\"psjoqcjenk\"},\"properties\":{\"jhhhqxu\":\"sqxfxjelgcmpz\",\"oyvivbsiz\":\"yvca\",\"bscm\":\"sjsz\",\"v\":\"lzijiufehgmvflnw\"}},\"id\":\"xrerlniylylyf\",\"name\":\"xzutgqztwhghmupg\",\"type\":\"yjtcdxabbujftab\"},{\"properties\":{\"indexColumns\":[{\"dataType\":\"Long\",\"columnName\":\"qpxzucafeddwwn\"},{\"dataType\":\"String\",\"columnName\":\"wxudgn\"},{\"dataType\":\"Binary\",\"columnName\":\"krtalvn\"}],\"stage\":\"gpbemeluclvdjju\",\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"xahhxhqfaqnvzo\",\"tags\":{\"ejdtxptl\":\"ipemchgavscz\",\"zhomewjjstliu\":\"h\",\"nvodrrs\":\"qawmoaianc\",\"vvbxiwkgfbqljnq\":\"blxydkxr\"},\"properties\":{\"lrqff\":\"chocokulehur\",\"ravjuq\":\"weyurkphyjd\",\"apx\":\"brxmrgch\"}},\"id\":\"y\",\"name\":\"jjk\",\"type\":\"ajb\"},{\"properties\":{\"indexColumns\":[{\"dataType\":\"Boolean\",\"columnName\":\"u\"},{\"dataType\":\"Double\",\"columnName\":\"cblevpmc\"}],\"stage\":\"jy\",\"provisioningState\":\"Updating\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"jgkz\",\"tags\":{\"ovwmbjlzqsczpgvd\":\"afhbzf\"},\"properties\":{\"jtks\":\"pfdqwowftptnu\"}},\"id\":\"gcgqyhleseyqrhvy\",\"name\":\"ldotjvdkwisws\",\"type\":\"ukjtasbvwispkxk\"},{\"properties\":{\"indexColumns\":[{\"dataType\":\"Binary\",\"columnName\":\"dlqvtwknvg\"},{\"dataType\":\"Binary\",\"columnName\":\"gtywatmqaqkue\"},{\"dataType\":\"Double\",\"columnName\":\"oeshoygzcbyfq\"},{\"dataType\":\"Binary\",\"columnName\":\"oytehqpuvjm\"}],\"stage\":\"mtdwcky\",\"provisioningState\":\"Deleting\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"ljdjuskbrreqy\",\"tags\":{\"ysh\":\"eysfaqegplw\",\"ybwptda\":\"ddkvbxgkqu\",\"mt\":\"arvvlfnt\"},\"properties\":{\"r\":\"wenaz\",\"qalsxkd\":\"hzr\",\"vessm\":\"wqapfgsdp\"}},\"id\":\"h\",\"name\":\"uuipldq\",\"type\":\"ctekval\"}],\"nextLink\":\"htjqvqyvw\"}") - .toObject(FeaturestoreEntityVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).properties().description()); - Assertions.assertEquals("jzralc", model.value().get(0).properties().tags().get("pjby")); - Assertions.assertEquals("sqxfxjelgcmpz", model.value().get(0).properties().properties().get("jhhhqxu")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.BOOLEAN, - model.value().get(0).properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("ycyarnroohg", model.value().get(0).properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("twrlohapqin", model.value().get(0).properties().stage()); - Assertions.assertEquals("htjqvqyvw", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturestoreEntityVersionResourceArmPaginatedResult model - = new FeaturestoreEntityVersionResourceArmPaginatedResult() - .withValue(Arrays.asList( - new FeaturestoreEntityVersionInner().withProperties(new FeaturestoreEntityVersionProperties() - .withDescription("d") - .withTags(mapOf("pjby", "jzralc", "hf", "psjoqcjenk")) - .withProperties(mapOf("jhhhqxu", "sqxfxjelgcmpz", "oyvivbsiz", "yvca", "bscm", "sjsz", "v", - "lzijiufehgmvflnw")) - .withIsArchived(true) - .withIsAnonymous(true) - .withIndexColumns(Arrays.asList( - new IndexColumn().withDataType(FeatureDataType.BOOLEAN).withColumnName("ycyarnroohg"), - new IndexColumn().withDataType(FeatureDataType.INTEGER).withColumnName("oghktdpycz"), - new IndexColumn().withDataType(FeatureDataType.BINARY).withColumnName("ocnhzqrottjzcfyj"))) - .withStage("twrlohapqin")), - new FeaturestoreEntityVersionInner() - .withProperties(new FeaturestoreEntityVersionProperties().withDescription("xahhxhqfaqnvzo") - .withTags(mapOf("ejdtxptl", "ipemchgavscz", "zhomewjjstliu", "h", "nvodrrs", "qawmoaianc", - "vvbxiwkgfbqljnq", "blxydkxr")) - .withProperties(mapOf("lrqff", "chocokulehur", "ravjuq", "weyurkphyjd", "apx", "brxmrgch")) - .withIsArchived(true) - .withIsAnonymous(true) - .withIndexColumns(Arrays.asList( - new IndexColumn().withDataType(FeatureDataType.LONG).withColumnName("qpxzucafeddwwn"), - new IndexColumn().withDataType(FeatureDataType.STRING).withColumnName("wxudgn"), - new IndexColumn().withDataType(FeatureDataType.BINARY).withColumnName("krtalvn"))) - .withStage("gpbemeluclvdjju")), - new FeaturestoreEntityVersionInner() - .withProperties(new FeaturestoreEntityVersionProperties().withDescription("jgkz") - .withTags(mapOf("ovwmbjlzqsczpgvd", "afhbzf")) - .withProperties(mapOf("jtks", "pfdqwowftptnu")) - .withIsArchived(true) - .withIsAnonymous(true) - .withIndexColumns(Arrays.asList( - new IndexColumn().withDataType(FeatureDataType.BOOLEAN).withColumnName("u"), - new IndexColumn().withDataType(FeatureDataType.DOUBLE).withColumnName("cblevpmc"))) - .withStage("jy")), - new FeaturestoreEntityVersionInner() - .withProperties(new FeaturestoreEntityVersionProperties().withDescription("ljdjuskbrreqy") - .withTags(mapOf("ysh", "eysfaqegplw", "ybwptda", "ddkvbxgkqu", "mt", "arvvlfnt")) - .withProperties(mapOf("r", "wenaz", "qalsxkd", "hzr", "vessm", "wqapfgsdp")) - .withIsArchived(false) - .withIsAnonymous(true) - .withIndexColumns(Arrays.asList( - new IndexColumn().withDataType(FeatureDataType.BINARY).withColumnName("dlqvtwknvg"), - new IndexColumn().withDataType(FeatureDataType.BINARY).withColumnName("gtywatmqaqkue"), - new IndexColumn().withDataType(FeatureDataType.DOUBLE).withColumnName("oeshoygzcbyfq"), - new IndexColumn().withDataType(FeatureDataType.BINARY).withColumnName("oytehqpuvjm"))) - .withStage("mtdwcky")))) - .withNextLink("htjqvqyvw"); - model = BinaryData.fromObject(model).toObject(FeaturestoreEntityVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).properties().description()); - Assertions.assertEquals("jzralc", model.value().get(0).properties().tags().get("pjby")); - Assertions.assertEquals("sqxfxjelgcmpz", model.value().get(0).properties().properties().get("jhhhqxu")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.BOOLEAN, - model.value().get(0).properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("ycyarnroohg", model.value().get(0).properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("twrlohapqin", model.value().get(0).properties().stage()); - Assertions.assertEquals("htjqvqyvw", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateMockTests.java deleted file mode 100644 index f013b12920d8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersion; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties; -import com.azure.resourcemanager.machinelearning.models.IndexColumn; -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 reactor.core.publisher.Mono; - -public final class FeaturestoreEntityVersionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"indexColumns\":[{\"dataType\":\"Double\",\"columnName\":\"kwsuxrs\"},{\"dataType\":\"String\",\"columnName\":\"uu\"}],\"stage\":\"dcgxnkbwvuwbbz\",\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"cl\",\"tags\":{\"jfyfmjc\":\"r\"},\"properties\":{\"lmeyoncxjevma\":\"ybhsgqiumkt\"}},\"id\":\"rgwtynqbhhfhi\",\"name\":\"wwkhiyubykxzcvut\",\"type\":\"yihpsrjzpvojwjan\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturestoreEntityVersion response = manager.featurestoreEntityVersions() - .define("razwkcohjxoc") - .withExistingFeaturestoreEntity("bckl", "sxuuksvfsukpk", "ealbckpnnenrcezt") - .withProperties(new FeaturestoreEntityVersionProperties().withDescription("jnadfhheilnh") - .withTags(mapOf("azozo", "uounzzckogc", "diydwklkuamxho", "nyofts", "gmkztwzlwellh", "tnqeonyizqdw", - "vrfuzedudkt", "ppf")) - .withProperties(mapOf("cflhycluou", "watfvjvumim")) - .withIsArchived(false) - .withIsAnonymous(true) - .withIndexColumns( - Arrays.asList(new IndexColumn().withDataType(FeatureDataType.DOUBLE).withColumnName("orhkneu"), - new IndexColumn().withDataType(FeatureDataType.INTEGER).withColumnName("wizznkrarjii"), - new IndexColumn().withDataType(FeatureDataType.FLOAT).withColumnName("chcwhlhdzdcrlf"), - new IndexColumn().withDataType(FeatureDataType.STRING).withColumnName("xypxlzcrtmfvjzcv"))) - .withStage("pde")) - .create(); - - Assertions.assertEquals("cl", response.properties().description()); - Assertions.assertEquals("r", response.properties().tags().get("jfyfmjc")); - Assertions.assertEquals("ybhsgqiumkt", response.properties().properties().get("lmeyoncxjevma")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.DOUBLE, response.properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("kwsuxrs", response.properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("dcgxnkbwvuwbbz", response.properties().stage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteMockTests.java deleted file mode 100644 index 019d9ff409dd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturestoreEntityVersionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.featurestoreEntityVersions() - .delete("b", "wsfllzykzp", "jdslpbyejsgbpjjn", "lbkaknivw", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetWithResponseMockTests.java deleted file mode 100644 index c81d229a2fb6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturestoreEntityVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"indexColumns\":[{\"dataType\":\"Double\",\"columnName\":\"ekdqqwcspfhrndq\"},{\"dataType\":\"Datetime\",\"columnName\":\"s\"}],\"stage\":\"gsdqnqqzqdvg\",\"provisioningState\":\"Canceled\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"nyaarwphbuzmvjil\",\"tags\":{\"jw\":\"mfkctpaiwh\",\"vjdywpfxi\":\"xduwimwn\"},\"properties\":{\"swmyjdbcknso\":\"kmnjt\",\"uvvaitk\":\"tmpdkcbpki\"}},\"id\":\"ndwguss\",\"name\":\"tnppxxeysqenfwug\",\"type\":\"nysemunvzmv\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturestoreEntityVersion response = manager.featurestoreEntityVersions() - .getWithResponse("ddnddctkjcq", "xdir", "tqilsbabqtjchxsf", "eyleiye", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("nyaarwphbuzmvjil", response.properties().description()); - Assertions.assertEquals("mfkctpaiwh", response.properties().tags().get("jw")); - Assertions.assertEquals("kmnjt", response.properties().properties().get("swmyjdbcknso")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.DOUBLE, response.properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("ekdqqwcspfhrndq", response.properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("gsdqnqqzqdvg", response.properties().stage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListMockTests.java deleted file mode 100644 index c0d67f09ae45..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersion; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturestoreEntityVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"indexColumns\":[{\"dataType\":\"Datetime\",\"columnName\":\"mxpjkuqbng\"}],\"stage\":\"mlxs\",\"provisioningState\":\"Failed\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"xtgqpqfwuplfjkba\",\"tags\":{\"hxbfhbip\":\"seimuipggt\",\"fefznxcleyamv\":\"dziphe\",\"vbtkafcnfitpu\":\"itjjhqvypqgncgw\"},\"properties\":{\"xb\":\"kdwyjdvy\",\"nxbdisjeovgc\":\"wjgyngoudclridql\"}},\"id\":\"chgjonrhdib\",\"name\":\"vpdjytme\",\"type\":\"uiuvkcnqonj\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.featurestoreEntityVersions() - .list("wnwoxve", "wwqchxowppvux", "actoqqehn", "ir", "gnvuolv", ListViewType.ALL, 408724874, "nlbkizebbrwl", - "eq", "isoiqgetzgwywy", "bwuamo", "opqqiyjrehe", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xtgqpqfwuplfjkba", response.iterator().next().properties().description()); - Assertions.assertEquals("seimuipggt", response.iterator().next().properties().tags().get("hxbfhbip")); - Assertions.assertEquals("kdwyjdvy", response.iterator().next().properties().properties().get("xb")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(false, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.DATETIME, - response.iterator().next().properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("mxpjkuqbng", - response.iterator().next().properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("mlxs", response.iterator().next().properties().stage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturizationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturizationSettingsTests.java deleted file mode 100644 index fea23d4afea9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturizationSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeaturizationSettings; -import org.junit.jupiter.api.Assertions; - -public final class FeaturizationSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturizationSettings model - = BinaryData.fromString("{\"datasetLanguage\":\"auwxsuykznhrfgsl\"}").toObject(FeaturizationSettings.class); - Assertions.assertEquals("auwxsuykznhrfgsl", model.datasetLanguage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturizationSettings model = new FeaturizationSettings().withDatasetLanguage("auwxsuykznhrfgsl"); - model = BinaryData.fromObject(model).toObject(FeaturizationSettings.class); - Assertions.assertEquals("auwxsuykznhrfgsl", model.datasetLanguage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FixedInputDataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FixedInputDataTests.java deleted file mode 100644 index 4742da42e998..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FixedInputDataTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FixedInputData; -import com.azure.resourcemanager.machinelearning.models.JobInputType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FixedInputDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FixedInputData model = BinaryData.fromString( - "{\"inputDataType\":\"Fixed\",\"dataContext\":\"dpmtonvhgn\",\"jobInputType\":\"uri_folder\",\"uri\":\"me\",\"columns\":{\"mmmkvavucgjiuaiq\":\"bpjbapm\",\"hr\":\"mnuf\",\"vwlvivjmxmlit\":\"hxwwuzdm\",\"iifef\":\"dsjipdviscotyxb\"}}") - .toObject(FixedInputData.class); - Assertions.assertEquals("dpmtonvhgn", model.dataContext()); - Assertions.assertEquals(JobInputType.URI_FOLDER, model.jobInputType()); - Assertions.assertEquals("me", model.uri()); - Assertions.assertEquals("bpjbapm", model.columns().get("mmmkvavucgjiuaiq")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FixedInputData model = new FixedInputData().withDataContext("dpmtonvhgn") - .withJobInputType(JobInputType.URI_FOLDER) - .withUri("me") - .withColumns(mapOf("mmmkvavucgjiuaiq", "bpjbapm", "hr", "mnuf", "vwlvivjmxmlit", "hxwwuzdm", "iifef", - "dsjipdviscotyxb")); - model = BinaryData.fromObject(model).toObject(FixedInputData.class); - Assertions.assertEquals("dpmtonvhgn", model.dataContext()); - Assertions.assertEquals(JobInputType.URI_FOLDER, model.jobInputType()); - Assertions.assertEquals("me", model.uri()); - Assertions.assertEquals("bpjbapm", model.columns().get("mmmkvavucgjiuaiq")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FlavorDataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FlavorDataTests.java deleted file mode 100644 index da2593a6d20c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FlavorDataTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FlavorDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FlavorData model = BinaryData - .fromString("{\"data\":{\"nm\":\"ltxijjumfqwazln\",\"qdqx\":\"jng\",\"zsvtuikzhajqgl\":\"bjwgnyfus\"}}") - .toObject(FlavorData.class); - Assertions.assertEquals("ltxijjumfqwazln", model.data().get("nm")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FlavorData model - = new FlavorData().withData(mapOf("nm", "ltxijjumfqwazln", "qdqx", "jng", "zsvtuikzhajqgl", "bjwgnyfus")); - model = BinaryData.fromObject(model).toObject(FlavorData.class); - Assertions.assertEquals("ltxijjumfqwazln", model.data().get("nm")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastHorizonTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastHorizonTests.java deleted file mode 100644 index ba53d60d641c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastHorizonTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ForecastHorizon; - -public final class ForecastHorizonTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ForecastHorizon model = BinaryData.fromString("{\"mode\":\"ForecastHorizon\"}").toObject(ForecastHorizon.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForecastHorizon model = new ForecastHorizon(); - model = BinaryData.fromObject(model).toObject(ForecastHorizon.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingSettingsTests.java deleted file mode 100644 index c44ab2c114d3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeatureLags; -import com.azure.resourcemanager.machinelearning.models.ForecastHorizon; -import com.azure.resourcemanager.machinelearning.models.ForecastingSettings; -import com.azure.resourcemanager.machinelearning.models.Seasonality; -import com.azure.resourcemanager.machinelearning.models.ShortSeriesHandlingConfiguration; -import com.azure.resourcemanager.machinelearning.models.TargetAggregationFunction; -import com.azure.resourcemanager.machinelearning.models.TargetLags; -import com.azure.resourcemanager.machinelearning.models.TargetRollingWindowSize; -import com.azure.resourcemanager.machinelearning.models.UseStl; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ForecastingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ForecastingSettings model = BinaryData.fromString( - "{\"countryOrRegionForHolidays\":\"tphuykuninttl\",\"timeColumnName\":\"jdszdbuzi\",\"targetLags\":{\"mode\":\"TargetLags\"},\"targetRollingWindowSize\":{\"mode\":\"TargetRollingWindowSize\"},\"forecastHorizon\":{\"mode\":\"ForecastHorizon\"},\"timeSeriesIdColumnNames\":[\"qvgpnewuh\",\"fwjnoxuoxtfn\",\"essfepgckncj\"],\"frequency\":\"vsnvbtqdxfmj\",\"featureLags\":\"None\",\"seasonality\":{\"mode\":\"Seasonality\"},\"shortSeriesHandlingConfig\":\"Pad\",\"useStl\":\"SeasonTrend\",\"targetAggregateFunction\":\"Max\",\"cvStepSize\":1226506395}") - .toObject(ForecastingSettings.class); - Assertions.assertEquals("tphuykuninttl", model.countryOrRegionForHolidays()); - Assertions.assertEquals("jdszdbuzi", model.timeColumnName()); - Assertions.assertEquals("qvgpnewuh", model.timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals("vsnvbtqdxfmj", model.frequency()); - Assertions.assertEquals(FeatureLags.NONE, model.featureLags()); - Assertions.assertEquals(ShortSeriesHandlingConfiguration.PAD, model.shortSeriesHandlingConfig()); - Assertions.assertEquals(UseStl.SEASON_TREND, model.useStl()); - Assertions.assertEquals(TargetAggregationFunction.MAX, model.targetAggregateFunction()); - Assertions.assertEquals(1226506395, model.cvStepSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForecastingSettings model = new ForecastingSettings().withCountryOrRegionForHolidays("tphuykuninttl") - .withTimeColumnName("jdszdbuzi") - .withTargetLags(new TargetLags()) - .withTargetRollingWindowSize(new TargetRollingWindowSize()) - .withForecastHorizon(new ForecastHorizon()) - .withTimeSeriesIdColumnNames(Arrays.asList("qvgpnewuh", "fwjnoxuoxtfn", "essfepgckncj")) - .withFrequency("vsnvbtqdxfmj") - .withFeatureLags(FeatureLags.NONE) - .withSeasonality(new Seasonality()) - .withShortSeriesHandlingConfig(ShortSeriesHandlingConfiguration.PAD) - .withUseStl(UseStl.SEASON_TREND) - .withTargetAggregateFunction(TargetAggregationFunction.MAX) - .withCvStepSize(1226506395); - model = BinaryData.fromObject(model).toObject(ForecastingSettings.class); - Assertions.assertEquals("tphuykuninttl", model.countryOrRegionForHolidays()); - Assertions.assertEquals("jdszdbuzi", model.timeColumnName()); - Assertions.assertEquals("qvgpnewuh", model.timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals("vsnvbtqdxfmj", model.frequency()); - Assertions.assertEquals(FeatureLags.NONE, model.featureLags()); - Assertions.assertEquals(ShortSeriesHandlingConfiguration.PAD, model.shortSeriesHandlingConfig()); - Assertions.assertEquals(UseStl.SEASON_TREND, model.useStl()); - Assertions.assertEquals(TargetAggregationFunction.MAX, model.targetAggregateFunction()); - Assertions.assertEquals(1226506395, model.cvStepSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTests.java deleted file mode 100644 index 19341b1a0bde..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BlockedTransformers; -import com.azure.resourcemanager.machinelearning.models.ColumnTransformer; -import com.azure.resourcemanager.machinelearning.models.FeatureLags; -import com.azure.resourcemanager.machinelearning.models.FeaturizationMode; -import com.azure.resourcemanager.machinelearning.models.ForecastHorizon; -import com.azure.resourcemanager.machinelearning.models.Forecasting; -import com.azure.resourcemanager.machinelearning.models.ForecastingModels; -import com.azure.resourcemanager.machinelearning.models.ForecastingPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.ForecastingSettings; -import com.azure.resourcemanager.machinelearning.models.ForecastingTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NCrossValidations; -import com.azure.resourcemanager.machinelearning.models.Seasonality; -import com.azure.resourcemanager.machinelearning.models.ShortSeriesHandlingConfiguration; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings; -import com.azure.resourcemanager.machinelearning.models.TargetAggregationFunction; -import com.azure.resourcemanager.machinelearning.models.TargetLags; -import com.azure.resourcemanager.machinelearning.models.TargetRollingWindowSize; -import com.azure.resourcemanager.machinelearning.models.UseStl; -import java.time.Duration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ForecastingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Forecasting model = BinaryData.fromString( - "{\"taskType\":\"Forecasting\",\"primaryMetric\":\"SpearmanCorrelation\",\"forecastingSettings\":{\"countryOrRegionForHolidays\":\"rqoemwsieeailwdq\",\"timeColumnName\":\"fydeotmfxlkd\",\"targetLags\":{\"mode\":\"TargetLags\"},\"targetRollingWindowSize\":{\"mode\":\"TargetRollingWindowSize\"},\"forecastHorizon\":{\"mode\":\"ForecastHorizon\"},\"timeSeriesIdColumnNames\":[\"mkuuyiuy\",\"afixlxicwgpthd\",\"fmfzcfasfodropa\",\"v\"],\"frequency\":\"tw\",\"featureLags\":\"None\",\"seasonality\":{\"mode\":\"Seasonality\"},\"shortSeriesHandlingConfig\":\"Auto\",\"useStl\":\"None\",\"targetAggregateFunction\":\"Mean\",\"cvStepSize\":1700774376},\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"ExtremeRandomTrees\",\"SeasonalNaive\",\"TCNForecaster\",\"LassoLars\"],\"blockedTrainingAlgorithms\":[\"GradientBoosting\",\"XGBoostRegressor\",\"ElasticNet\"],\"enableOnnxCompatibleModels\":true,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"ElasticNet\",\"stackMetaLearnerTrainPercentage\":66.84514235526332,\"stackMetaLearnerKWargs\":\"dataxlzmiyddee\"},\"enableStackEnsemble\":true,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT182H54M43S\",\"enableModelExplainability\":true,\"enableDnnTraining\":true},\"limitSettings\":{\"maxTrials\":656139727,\"trialTimeout\":\"PT61H59M4S\",\"timeout\":\"PT204H44M19S\",\"maxConcurrentTrials\":1030669826,\"maxCoresPerTrial\":1032949821,\"exitScore\":48.61053148417434,\"enableEarlyTermination\":true},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"cvSplitColumnNames\":[\"pxyazk\",\"pirgzxvbczwhy\"],\"weightColumnName\":\"bthmsritj\",\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"iggrunoz\",\"mode\":\"Direct\",\"description\":\"ljthoiv\"},\"testData\":{\"jobInputType\":\"mltable\",\"uri\":\"wsn\",\"mode\":\"EvalMount\",\"description\":\"ihscjvakmhzbhw\"},\"validationDataSize\":28.61316181159782,\"testDataSize\":4.746102486575632,\"featurizationSettings\":{\"mode\":\"Auto\",\"blockedTransformers\":[\"WordEmbedding\"],\"columnNameAndTypes\":{\"fzs\":\"nuqqkotauratnicp\",\"yrletndqlmf\":\"le\",\"evnoqayrehjuqwva\":\"ggnbbuypwovvvsfl\",\"enqqzlxnqzu\":\"xrlzhpziha\"},\"transformerParams\":{\"gzsdtmwbyorjp\":[{\"fields\":[\"bg\",\"kfwmjcwtewfh\",\"wyrkbrehzlrynjpc\",\"amkaepl\"],\"parameters\":\"datajub\"},{\"fields\":[\"ywevtjrieikmw\",\"aoklfnis\",\"xgucbmtredscnn\",\"tjcyyuv\"],\"parameters\":\"datarx\"},{\"fields\":[\"lecwwtz\"],\"parameters\":\"datacloyhy\"},{\"fields\":[\"idhz\"],\"parameters\":\"datare\"}],\"ifq\":[{\"fields\":[\"ychakvy\",\"fbqvumkxqj\",\"iuepmaxfnzlpqmp\",\"t\"],\"parameters\":\"datafvulb\"},{\"fields\":[\"tuxy\"],\"parameters\":\"datahfcaeo\"}],\"nivrxpfduio\":[{\"fields\":[\"flobhahq\",\"omfecorkfro\",\"gbmxldjmz\",\"zbjesylslur\"],\"parameters\":\"datafygpnyhgd\"},{\"fields\":[\"sc\",\"gqyvouprsytqzss\"],\"parameters\":\"datamgw\"}],\"tewuvcy\":[{\"fields\":[\"qvpbfjpoqzucfzl\",\"czdquurbo\",\"mvhvz\"],\"parameters\":\"datal\"},{\"fields\":[\"nqujywz\",\"qyggmnwsvhb\",\"gqiwy\"],\"parameters\":\"datatobdrrpnre\"},{\"fields\":[\"nsbfjhhlwtpkvege\",\"tt\",\"zkgtzqn\"],\"parameters\":\"datas\"}]},\"enableDnnFeaturization\":true,\"datasetLanguage\":\"fjxflpditfno\"},\"logVerbosity\":\"Warning\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"yuxlvrhprrv\",\"mode\":\"EvalMount\",\"description\":\"leqflv\"},\"targetColumnName\":\"rv\"}") - .toObject(Forecasting.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("leqflv", model.trainingData().description()); - Assertions.assertEquals("yuxlvrhprrv", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("rv", model.targetColumnName()); - Assertions.assertEquals(ForecastingPrimaryMetrics.SPEARMAN_CORRELATION, model.primaryMetric()); - Assertions.assertEquals("rqoemwsieeailwdq", model.forecastingSettings().countryOrRegionForHolidays()); - Assertions.assertEquals("fydeotmfxlkd", model.forecastingSettings().timeColumnName()); - Assertions.assertEquals("mkuuyiuy", model.forecastingSettings().timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals("tw", model.forecastingSettings().frequency()); - Assertions.assertEquals(FeatureLags.NONE, model.forecastingSettings().featureLags()); - Assertions.assertEquals(ShortSeriesHandlingConfiguration.AUTO, - model.forecastingSettings().shortSeriesHandlingConfig()); - Assertions.assertEquals(UseStl.NONE, model.forecastingSettings().useStl()); - Assertions.assertEquals(TargetAggregationFunction.MEAN, model.forecastingSettings().targetAggregateFunction()); - Assertions.assertEquals(1700774376, model.forecastingSettings().cvStepSize()); - Assertions.assertEquals(true, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.ELASTIC_NET, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(66.84514235526332D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT182H54M43S"), - model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(ForecastingModels.EXTREME_RANDOM_TREES, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ForecastingModels.GRADIENT_BOOSTING, - model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals(656139727, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT61H59M4S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT204H44M19S"), model.limitSettings().timeout()); - Assertions.assertEquals(1030669826, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1032949821, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(48.61053148417434D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("pxyazk", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("bthmsritj", model.weightColumnName()); - Assertions.assertEquals("ljthoiv", model.validationData().description()); - Assertions.assertEquals("iggrunoz", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("ihscjvakmhzbhw", model.testData().description()); - Assertions.assertEquals("wsn", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.testData().mode()); - Assertions.assertEquals(28.61316181159782D, model.validationDataSize()); - Assertions.assertEquals(4.746102486575632D, model.testDataSize()); - Assertions.assertEquals("fjxflpditfno", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.WORD_EMBEDDING, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("nuqqkotauratnicp", model.featurizationSettings().columnNameAndTypes().get("fzs")); - Assertions.assertEquals("bg", - model.featurizationSettings().transformerParams().get("gzsdtmwbyorjp").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Forecasting model = new Forecasting().withLogVerbosity(LogVerbosity.WARNING) - .withTrainingData(new MLTableJobInput().withDescription("leqflv") - .withUri("yuxlvrhprrv") - .withMode(InputDeliveryMode.EVAL_MOUNT)) - .withTargetColumnName("rv") - .withPrimaryMetric(ForecastingPrimaryMetrics.SPEARMAN_CORRELATION) - .withForecastingSettings(new ForecastingSettings().withCountryOrRegionForHolidays("rqoemwsieeailwdq") - .withTimeColumnName("fydeotmfxlkd") - .withTargetLags(new TargetLags()) - .withTargetRollingWindowSize(new TargetRollingWindowSize()) - .withForecastHorizon(new ForecastHorizon()) - .withTimeSeriesIdColumnNames(Arrays.asList("mkuuyiuy", "afixlxicwgpthd", "fmfzcfasfodropa", "v")) - .withFrequency("tw") - .withFeatureLags(FeatureLags.NONE) - .withSeasonality(new Seasonality()) - .withShortSeriesHandlingConfig(ShortSeriesHandlingConfiguration.AUTO) - .withUseStl(UseStl.NONE) - .withTargetAggregateFunction(TargetAggregationFunction.MEAN) - .withCvStepSize(1700774376)) - .withTrainingSettings(new ForecastingTrainingSettings().withEnableOnnxCompatibleModels(true) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.ELASTIC_NET) - .withStackMetaLearnerTrainPercentage(66.84514235526332D) - .withStackMetaLearnerKWargs("dataxlzmiyddee")) - .withEnableStackEnsemble(true) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT182H54M43S")) - .withEnableModelExplainability(true) - .withEnableDnnTraining(true) - .withAllowedTrainingAlgorithms(Arrays.asList(ForecastingModels.EXTREME_RANDOM_TREES, - ForecastingModels.SEASONAL_NAIVE, ForecastingModels.TCNFORECASTER, ForecastingModels.LASSO_LARS)) - .withBlockedTrainingAlgorithms(Arrays.asList(ForecastingModels.GRADIENT_BOOSTING, - ForecastingModels.XGBOOST_REGRESSOR, ForecastingModels.ELASTIC_NET))) - .withLimitSettings(new TableVerticalLimitSettings().withMaxTrials(656139727) - .withTrialTimeout(Duration.parse("PT61H59M4S")) - .withTimeout(Duration.parse("PT204H44M19S")) - .withMaxConcurrentTrials(1030669826) - .withMaxCoresPerTrial(1032949821) - .withExitScore(48.61053148417434D) - .withEnableEarlyTermination(true)) - .withNCrossValidations(new NCrossValidations()) - .withCvSplitColumnNames(Arrays.asList("pxyazk", "pirgzxvbczwhy")) - .withWeightColumnName("bthmsritj") - .withValidationData( - new MLTableJobInput().withDescription("ljthoiv").withUri("iggrunoz").withMode(InputDeliveryMode.DIRECT)) - .withTestData(new MLTableJobInput().withDescription("ihscjvakmhzbhw") - .withUri("wsn") - .withMode(InputDeliveryMode.EVAL_MOUNT)) - .withValidationDataSize(28.61316181159782D) - .withTestDataSize(4.746102486575632D) - .withFeaturizationSettings(new TableVerticalFeaturizationSettings().withDatasetLanguage("fjxflpditfno") - .withMode(FeaturizationMode.AUTO) - .withBlockedTransformers(Arrays.asList(BlockedTransformers.WORD_EMBEDDING)) - .withColumnNameAndTypes(mapOf("fzs", "nuqqkotauratnicp", "yrletndqlmf", "le", "evnoqayrehjuqwva", - "ggnbbuypwovvvsfl", "enqqzlxnqzu", "xrlzhpziha")) - .withTransformerParams(mapOf("gzsdtmwbyorjp", - Arrays.asList( - new ColumnTransformer() - .withFields(Arrays.asList("bg", "kfwmjcwtewfh", "wyrkbrehzlrynjpc", "amkaepl")) - .withParameters("datajub"), - new ColumnTransformer() - .withFields(Arrays.asList("ywevtjrieikmw", "aoklfnis", "xgucbmtredscnn", "tjcyyuv")) - .withParameters("datarx"), - new ColumnTransformer().withFields(Arrays.asList("lecwwtz")).withParameters("datacloyhy"), - new ColumnTransformer().withFields(Arrays.asList("idhz")).withParameters("datare")), - "ifq", - Arrays.asList( - new ColumnTransformer() - .withFields(Arrays.asList("ychakvy", "fbqvumkxqj", "iuepmaxfnzlpqmp", "t")) - .withParameters("datafvulb"), - new ColumnTransformer().withFields(Arrays.asList("tuxy")).withParameters("datahfcaeo")), - "nivrxpfduio", - Arrays.asList( - new ColumnTransformer() - .withFields(Arrays.asList("flobhahq", "omfecorkfro", "gbmxldjmz", "zbjesylslur")) - .withParameters("datafygpnyhgd"), - new ColumnTransformer().withFields(Arrays.asList("sc", "gqyvouprsytqzss")) - .withParameters("datamgw")), - "tewuvcy", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("qvpbfjpoqzucfzl", "czdquurbo", "mvhvz")) - .withParameters("datal"), - new ColumnTransformer().withFields(Arrays.asList("nqujywz", "qyggmnwsvhb", "gqiwy")) - .withParameters("datatobdrrpnre"), - new ColumnTransformer().withFields(Arrays.asList("nsbfjhhlwtpkvege", "tt", "zkgtzqn")) - .withParameters("datas")))) - .withEnableDnnFeaturization(true)); - model = BinaryData.fromObject(model).toObject(Forecasting.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("leqflv", model.trainingData().description()); - Assertions.assertEquals("yuxlvrhprrv", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("rv", model.targetColumnName()); - Assertions.assertEquals(ForecastingPrimaryMetrics.SPEARMAN_CORRELATION, model.primaryMetric()); - Assertions.assertEquals("rqoemwsieeailwdq", model.forecastingSettings().countryOrRegionForHolidays()); - Assertions.assertEquals("fydeotmfxlkd", model.forecastingSettings().timeColumnName()); - Assertions.assertEquals("mkuuyiuy", model.forecastingSettings().timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals("tw", model.forecastingSettings().frequency()); - Assertions.assertEquals(FeatureLags.NONE, model.forecastingSettings().featureLags()); - Assertions.assertEquals(ShortSeriesHandlingConfiguration.AUTO, - model.forecastingSettings().shortSeriesHandlingConfig()); - Assertions.assertEquals(UseStl.NONE, model.forecastingSettings().useStl()); - Assertions.assertEquals(TargetAggregationFunction.MEAN, model.forecastingSettings().targetAggregateFunction()); - Assertions.assertEquals(1700774376, model.forecastingSettings().cvStepSize()); - Assertions.assertEquals(true, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.ELASTIC_NET, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(66.84514235526332D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT182H54M43S"), - model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(ForecastingModels.EXTREME_RANDOM_TREES, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ForecastingModels.GRADIENT_BOOSTING, - model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals(656139727, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT61H59M4S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT204H44M19S"), model.limitSettings().timeout()); - Assertions.assertEquals(1030669826, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1032949821, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(48.61053148417434D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("pxyazk", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("bthmsritj", model.weightColumnName()); - Assertions.assertEquals("ljthoiv", model.validationData().description()); - Assertions.assertEquals("iggrunoz", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("ihscjvakmhzbhw", model.testData().description()); - Assertions.assertEquals("wsn", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.testData().mode()); - Assertions.assertEquals(28.61316181159782D, model.validationDataSize()); - Assertions.assertEquals(4.746102486575632D, model.testDataSize()); - Assertions.assertEquals("fjxflpditfno", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.WORD_EMBEDDING, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("nuqqkotauratnicp", model.featurizationSettings().columnNameAndTypes().get("fzs")); - Assertions.assertEquals("bg", - model.featurizationSettings().transformerParams().get("gzsdtmwbyorjp").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTrainingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTrainingSettingsTests.java deleted file mode 100644 index 3ee8a0dc9b38..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTrainingSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ForecastingModels; -import com.azure.resourcemanager.machinelearning.models.ForecastingTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ForecastingTrainingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ForecastingTrainingSettings model = BinaryData.fromString( - "{\"allowedTrainingAlgorithms\":[\"SeasonalNaive\",\"SeasonalAverage\",\"SeasonalAverage\"],\"blockedTrainingAlgorithms\":[\"ExponentialSmoothing\"],\"enableOnnxCompatibleModels\":false,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LightGBMClassifier\",\"stackMetaLearnerTrainPercentage\":13.408561162477984,\"stackMetaLearnerKWargs\":\"datakvbos\"},\"enableStackEnsemble\":false,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT27H40M3S\",\"enableModelExplainability\":true,\"enableDnnTraining\":true}") - .toObject(ForecastingTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMCLASSIFIER, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(13.408561162477984D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(false, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT27H40M3S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableDnnTraining()); - Assertions.assertEquals(ForecastingModels.SEASONAL_NAIVE, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ForecastingModels.EXPONENTIAL_SMOOTHING, model.blockedTrainingAlgorithms().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForecastingTrainingSettings model = new ForecastingTrainingSettings().withEnableOnnxCompatibleModels(false) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMCLASSIFIER) - .withStackMetaLearnerTrainPercentage(13.408561162477984D) - .withStackMetaLearnerKWargs("datakvbos")) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT27H40M3S")) - .withEnableModelExplainability(true) - .withEnableDnnTraining(true) - .withAllowedTrainingAlgorithms(Arrays.asList(ForecastingModels.SEASONAL_NAIVE, - ForecastingModels.SEASONAL_AVERAGE, ForecastingModels.SEASONAL_AVERAGE)) - .withBlockedTrainingAlgorithms(Arrays.asList(ForecastingModels.EXPONENTIAL_SMOOTHING)); - model = BinaryData.fromObject(model).toObject(ForecastingTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMCLASSIFIER, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(13.408561162477984D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(false, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT27H40M3S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableDnnTraining()); - Assertions.assertEquals(ForecastingModels.SEASONAL_NAIVE, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ForecastingModels.EXPONENTIAL_SMOOTHING, model.blockedTrainingAlgorithms().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointDetailTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointDetailTests.java deleted file mode 100644 index 1678ef64f69a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointDetailTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail; -import org.junit.jupiter.api.Assertions; - -public final class FqdnEndpointDetailTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FqdnEndpointDetail model = BinaryData.fromString("{\"port\":1449386799}").toObject(FqdnEndpointDetail.class); - Assertions.assertEquals(1449386799, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpointDetail model = new FqdnEndpointDetail().withPort(1449386799); - model = BinaryData.fromObject(model).toObject(FqdnEndpointDetail.class); - Assertions.assertEquals(1449386799, model.port()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointTests.java deleted file mode 100644 index 440265ccd2ac..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoint; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FqdnEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FqdnEndpoint model = BinaryData - .fromString("{\"domainName\":\"irels\",\"endpointDetails\":[{\"port\":730394428},{\"port\":1632471353}]}") - .toObject(FqdnEndpoint.class); - Assertions.assertEquals("irels", model.domainName()); - Assertions.assertEquals(730394428, model.endpointDetails().get(0).port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpoint model = new FqdnEndpoint().withDomainName("irels") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(730394428), - new FqdnEndpointDetail().withPort(1632471353))); - model = BinaryData.fromObject(model).toObject(FqdnEndpoint.class); - Assertions.assertEquals("irels", model.domainName()); - Assertions.assertEquals(730394428, model.endpointDetails().get(0).port()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertiesTests.java deleted file mode 100644 index 526ca2a4dc6e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoint; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FqdnEndpointsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FqdnEndpointsProperties model = BinaryData.fromString( - "{\"category\":\"njhf\",\"endpoints\":[{\"domainName\":\"szkkfoqre\",\"endpointDetails\":[{\"port\":648968318},{\"port\":1648570452},{\"port\":498356163},{\"port\":195683064}]},{\"domainName\":\"a\",\"endpointDetails\":[{\"port\":322973840},{\"port\":1950360907},{\"port\":1038031643}]}]}") - .toObject(FqdnEndpointsProperties.class); - Assertions.assertEquals("njhf", model.category()); - Assertions.assertEquals("szkkfoqre", model.endpoints().get(0).domainName()); - Assertions.assertEquals(648968318, model.endpoints().get(0).endpointDetails().get(0).port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpointsProperties model = new FqdnEndpointsProperties().withCategory("njhf") - .withEndpoints(Arrays.asList( - new FqdnEndpoint().withDomainName("szkkfoqre") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(648968318), - new FqdnEndpointDetail().withPort(1648570452), new FqdnEndpointDetail().withPort(498356163), - new FqdnEndpointDetail().withPort(195683064))), - new FqdnEndpoint().withDomainName("a") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(322973840), - new FqdnEndpointDetail().withPort(1950360907), - new FqdnEndpointDetail().withPort(1038031643))))); - model = BinaryData.fromObject(model).toObject(FqdnEndpointsProperties.class); - Assertions.assertEquals("njhf", model.category()); - Assertions.assertEquals("szkkfoqre", model.endpoints().get(0).domainName()); - Assertions.assertEquals(648968318, model.endpoints().get(0).endpointDetails().get(0).port()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsTests.java deleted file mode 100644 index e74791131143..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoint; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoints; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FqdnEndpointsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FqdnEndpoints model = BinaryData.fromString( - "{\"properties\":{\"category\":\"stkwqqtch\",\"endpoints\":[{\"domainName\":\"fmtdaaygdvwvgp\",\"endpointDetails\":[{\"port\":976430532},{\"port\":434631779},{\"port\":1822865162}]},{\"domainName\":\"dxepxgyq\",\"endpointDetails\":[{\"port\":1825902686},{\"port\":1104557585},{\"port\":128514806},{\"port\":1947559864}]},{\"domainName\":\"himdbl\",\"endpointDetails\":[{\"port\":1230098756}]}]}}") - .toObject(FqdnEndpoints.class); - Assertions.assertEquals("stkwqqtch", model.properties().category()); - Assertions.assertEquals("fmtdaaygdvwvgp", model.properties().endpoints().get(0).domainName()); - Assertions.assertEquals(976430532, model.properties().endpoints().get(0).endpointDetails().get(0).port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpoints model = new FqdnEndpoints().withProperties(new FqdnEndpointsProperties().withCategory("stkwqqtch") - .withEndpoints(Arrays.asList( - new FqdnEndpoint().withDomainName("fmtdaaygdvwvgp") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(976430532), - new FqdnEndpointDetail().withPort(434631779), new FqdnEndpointDetail().withPort(1822865162))), - new FqdnEndpoint().withDomainName("dxepxgyq") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(1825902686), - new FqdnEndpointDetail().withPort(1104557585), new FqdnEndpointDetail().withPort(128514806), - new FqdnEndpointDetail().withPort(1947559864))), - new FqdnEndpoint().withDomainName("himdbl") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(1230098756)))))); - model = BinaryData.fromObject(model).toObject(FqdnEndpoints.class); - Assertions.assertEquals("stkwqqtch", model.properties().category()); - Assertions.assertEquals("fmtdaaygdvwvgp", model.properties().endpoints().get(0).domainName()); - Assertions.assertEquals(976430532, model.properties().endpoints().get(0).endpointDetails().get(0).port()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnOutboundRuleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnOutboundRuleTests.java deleted file mode 100644 index 28f818b124a0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnOutboundRuleTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FqdnOutboundRule; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import org.junit.jupiter.api.Assertions; - -public final class FqdnOutboundRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FqdnOutboundRule model = BinaryData - .fromString( - "{\"type\":\"FQDN\",\"destination\":\"sfeqbbe\",\"category\":\"Required\",\"status\":\"Active\"}") - .toObject(FqdnOutboundRule.class); - Assertions.assertEquals(RuleCategory.REQUIRED, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - Assertions.assertEquals("sfeqbbe", model.destination()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnOutboundRule model = new FqdnOutboundRule().withCategory(RuleCategory.REQUIRED) - .withStatus(RuleStatus.ACTIVE) - .withDestination("sfeqbbe"); - model = BinaryData.fromObject(model).toObject(FqdnOutboundRule.class); - Assertions.assertEquals(RuleCategory.REQUIRED, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - Assertions.assertEquals("sfeqbbe", model.destination()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GetBlobReferenceSasRequestDtoTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GetBlobReferenceSasRequestDtoTests.java deleted file mode 100644 index 48db3aa77e09..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GetBlobReferenceSasRequestDtoTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasRequestDto; -import org.junit.jupiter.api.Assertions; - -public final class GetBlobReferenceSasRequestDtoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GetBlobReferenceSasRequestDto model = BinaryData.fromString("{\"assetId\":\"lgzurig\",\"blobUri\":\"ecxn\"}") - .toObject(GetBlobReferenceSasRequestDto.class); - Assertions.assertEquals("lgzurig", model.assetId()); - Assertions.assertEquals("ecxn", model.blobUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GetBlobReferenceSasRequestDto model - = new GetBlobReferenceSasRequestDto().withAssetId("lgzurig").withBlobUri("ecxn"); - model = BinaryData.fromObject(model).toObject(GetBlobReferenceSasRequestDto.class); - Assertions.assertEquals("lgzurig", model.assetId()); - Assertions.assertEquals("ecxn", model.blobUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GridSamplingAlgorithmTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GridSamplingAlgorithmTests.java deleted file mode 100644 index dcfaa3f75da8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GridSamplingAlgorithmTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.GridSamplingAlgorithm; - -public final class GridSamplingAlgorithmTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GridSamplingAlgorithm model - = BinaryData.fromString("{\"samplingAlgorithmType\":\"Grid\"}").toObject(GridSamplingAlgorithm.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GridSamplingAlgorithm model = new GridSamplingAlgorithm(); - model = BinaryData.fromObject(model).toObject(GridSamplingAlgorithm.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdAssetReferenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdAssetReferenceTests.java deleted file mode 100644 index 7bde49429902..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdAssetReferenceTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.IdAssetReference; -import org.junit.jupiter.api.Assertions; - -public final class IdAssetReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdAssetReference model - = BinaryData.fromString("{\"referenceType\":\"Id\",\"assetId\":\"jow\"}").toObject(IdAssetReference.class); - Assertions.assertEquals("jow", model.assetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdAssetReference model = new IdAssetReference().withAssetId("jow"); - model = BinaryData.fromObject(model).toObject(IdAssetReference.class); - Assertions.assertEquals("jow", model.assetId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityConfigurationTests.java deleted file mode 100644 index bc70959300eb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityConfigurationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; - -public final class IdentityConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityConfiguration model = BinaryData.fromString("{\"identityType\":\"IdentityConfiguration\"}") - .toObject(IdentityConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityConfiguration model = new IdentityConfiguration(); - model = BinaryData.fromObject(model).toObject(IdentityConfiguration.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityForCmkTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityForCmkTests.java deleted file mode 100644 index 48f754db7dfe..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityForCmkTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.IdentityForCmk; -import org.junit.jupiter.api.Assertions; - -public final class IdentityForCmkTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityForCmk model = BinaryData.fromString("{\"userAssignedIdentity\":\"o\"}").toObject(IdentityForCmk.class); - Assertions.assertEquals("o", model.userAssignedIdentity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityForCmk model = new IdentityForCmk().withUserAssignedIdentity("o"); - model = BinaryData.fromObject(model).toObject(IdentityForCmk.class); - Assertions.assertEquals("o", model.userAssignedIdentity()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationBaseTests.java deleted file mode 100644 index b6f33efdf815..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationBaseTests.java +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageClassificationBase; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageClassificationBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageClassificationBase model = BinaryData.fromString( - "{\"modelSettings\":{\"trainingCropSize\":1122478262,\"validationCropSize\":945558500,\"validationResizeSize\":1406574230,\"weightedLoss\":1632810931,\"amsGradient\":false,\"advancedSettings\":\"zfwugeup\",\"augmentations\":\"necexkgrvfps\",\"beta1\":4.8045993,\"beta2\":81.08034,\"checkpointFrequency\":383318348,\"checkpointRunId\":\"qpdzf\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"cnwawoxc\",\"mode\":\"EvalDownload\",\"description\":\"jqfbifop\"},\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":299031519,\"earlyStoppingPatience\":280683238,\"evaluationFrequency\":182536431,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":1311462683,\"layersToFreeze\":1166812452,\"learningRate\":85.73021,\"learningRateScheduler\":\"Step\",\"modelName\":\"uuugtjig\",\"momentum\":52.275288,\"nesterov\":true,\"numberOfEpochs\":1076686728,\"numberOfWorkers\":1071396721,\"optimizer\":\"Adam\",\"randomSeed\":1057852499,\"stepLRGamma\":86.41818,\"stepLRStepSize\":1698348781,\"trainingBatchSize\":124401453,\"validationBatchSize\":1482539415,\"warmupCosineLRCycles\":69.18967,\"warmupCosineLRWarmupEpochs\":1390476760,\"weightDecay\":69.7827},\"searchSpace\":[{\"trainingCropSize\":\"rpvsgloiovs\",\"validationCropSize\":\"ivqsuvwtenb\",\"validationResizeSize\":\"i\",\"weightedLoss\":\"khcyoaqxuk\",\"amsGradient\":\"cjuftekio\",\"augmentations\":\"nd\",\"beta1\":\"wfhvpxjhxzu\",\"beta2\":\"jzabbwz\",\"distributed\":\"zuaixcdckixspsa\",\"earlyStopping\":\"avkmvyxzerejrkpz\",\"earlyStoppingDelay\":\"yetjxryo\",\"earlyStoppingPatience\":\"ae\",\"evaluationFrequency\":\"whlbecgihzbpem\",\"enableOnnxNormalization\":\"rab\",\"gradientAccumulationStep\":\"rwwxywpj\",\"layersToFreeze\":\"pboxhifppsk\",\"learningRate\":\"s\",\"learningRateScheduler\":\"hhmifjuaj\",\"modelName\":\"wvcmmpeglyuq\",\"momentum\":\"m\",\"nesterov\":\"exbzbqufpnezsjza\",\"numberOfEpochs\":\"ldrorhyogzmsimeh\",\"numberOfWorkers\":\"uuwdhtq\",\"optimizer\":\"yhn\",\"randomSeed\":\"xtnsugisn\",\"stepLRGamma\":\"wnwngh\",\"stepLRStepSize\":\"ovke\",\"trainingBatchSize\":\"micjixxfsf\",\"validationBatchSize\":\"rtnuguefxxijteb\",\"warmupCosineLRCycles\":\"eywetkrhlolmcn\",\"warmupCosineLRWarmupEpochs\":\"pfgsvbbvaqdljnp\",\"weightDecay\":\"l\"},{\"trainingCropSize\":\"rdetawevxehuekdx\",\"validationCropSize\":\"zvdov\",\"validationResizeSize\":\"blerlpr\",\"weightedLoss\":\"qccddcbny\",\"amsGradient\":\"jccxwbp\",\"augmentations\":\"ykdigqzlrznda\",\"beta1\":\"nidmjqmvytg\",\"beta2\":\"qlarhqt\",\"distributed\":\"caz\",\"earlyStopping\":\"d\",\"earlyStoppingDelay\":\"zffzjwztsmp\",\"earlyStoppingPatience\":\"ggr\",\"evaluationFrequency\":\"lgf\",\"enableOnnxNormalization\":\"tig\",\"gradientAccumulationStep\":\"frrkdknczgorywnv\",\"layersToFreeze\":\"tv\",\"learningRate\":\"evdlh\",\"learningRateScheduler\":\"bkarbpyhssr\",\"modelName\":\"kpkpkocmacc\",\"momentum\":\"xxopyi\",\"nesterov\":\"vspeslhwyykgvr\",\"numberOfEpochs\":\"pumdd\",\"numberOfWorkers\":\"ajk\",\"optimizer\":\"yddt\",\"randomSeed\":\"c\",\"stepLRGamma\":\"vafnbfbqvenq\",\"stepLRStepSize\":\"hgko\",\"trainingBatchSize\":\"wzejpecwzvcm\",\"validationBatchSize\":\"wdlu\",\"warmupCosineLRCycles\":\"ypr\",\"warmupCosineLRWarmupEpochs\":\"idwmt\",\"weightDecay\":\"bvtzldzchub\"}],\"limitSettings\":{\"maxTrials\":1777593025,\"timeout\":\"PT78H18M45S\",\"maxConcurrentTrials\":1190773271},\"sweepSettings\":{\"samplingAlgorithm\":\"Bayesian\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":1889059190,\"delayEvaluation\":482125528}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"rbzakpjtcqr\",\"mode\":\"ReadOnlyMount\",\"description\":\"jpsucmxi\"},\"validationDataSize\":94.50327063126527}") - .toObject(ImageClassificationBase.class); - Assertions.assertEquals(1777593025, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT78H18M45S"), model.limitSettings().timeout()); - Assertions.assertEquals(1190773271, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1889059190, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(482125528, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("jpsucmxi", model.validationData().description()); - Assertions.assertEquals("rbzakpjtcqr", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(94.50327063126527D, model.validationDataSize()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("zfwugeup", model.modelSettings().advancedSettings()); - Assertions.assertEquals("necexkgrvfps", model.modelSettings().augmentations()); - Assertions.assertEquals(4.8045993F, model.modelSettings().beta1()); - Assertions.assertEquals(81.08034F, model.modelSettings().beta2()); - Assertions.assertEquals(383318348, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("qpdzf", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("jqfbifop", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("cnwawoxc", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(299031519, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(280683238, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(182536431, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1311462683, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1166812452, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(85.73021F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("uuugtjig", model.modelSettings().modelName()); - Assertions.assertEquals(52.275288F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(1076686728, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1071396721, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(1057852499, model.modelSettings().randomSeed()); - Assertions.assertEquals(86.41818F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1698348781, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(124401453, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1482539415, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(69.18967F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1390476760, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(69.7827F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1122478262, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(945558500, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1406574230, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(1632810931, model.modelSettings().weightedLoss()); - Assertions.assertEquals("cjuftekio", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("nd", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("wfhvpxjhxzu", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("jzabbwz", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("zuaixcdckixspsa", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("avkmvyxzerejrkpz", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("yetjxryo", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("ae", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("whlbecgihzbpem", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("rab", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("rwwxywpj", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("pboxhifppsk", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("s", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("hhmifjuaj", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("wvcmmpeglyuq", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("m", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("exbzbqufpnezsjza", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ldrorhyogzmsimeh", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("uuwdhtq", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("yhn", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("xtnsugisn", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("wnwngh", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("ovke", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("micjixxfsf", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("rtnuguefxxijteb", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("eywetkrhlolmcn", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("pfgsvbbvaqdljnp", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("l", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("rpvsgloiovs", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("ivqsuvwtenb", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("i", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("khcyoaqxuk", model.searchSpace().get(0).weightedLoss()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageClassificationBase model - = new ImageClassificationBase() - .withLimitSettings(new ImageLimitSettings().withMaxTrials(1777593025) - .withTimeout(Duration.parse("PT78H18M45S")) - .withMaxConcurrentTrials(1190773271)) - .withSweepSettings( - new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN) - .withEarlyTermination(new EarlyTerminationPolicy().withEvaluationInterval(1889059190) - .withDelayEvaluation(482125528))) - .withValidationData(new MLTableJobInput().withDescription("jpsucmxi") - .withUri("rbzakpjtcqr") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withValidationDataSize(94.50327063126527D) - .withModelSettings(new ImageModelSettingsClassification().withAmsGradient(false) - .withAdvancedSettings("zfwugeup") - .withAugmentations("necexkgrvfps") - .withBeta1(4.8045993F) - .withBeta2(81.08034F) - .withCheckpointFrequency(383318348) - .withCheckpointRunId("qpdzf") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("jqfbifop") - .withUri("cnwawoxc") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withDistributed(true) - .withEarlyStopping(false) - .withEarlyStoppingDelay(299031519) - .withEarlyStoppingPatience(280683238) - .withEvaluationFrequency(182536431) - .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(1311462683) - .withLayersToFreeze(1166812452) - .withLearningRate(85.73021F) - .withLearningRateScheduler(LearningRateScheduler.STEP) - .withModelName("uuugtjig") - .withMomentum(52.275288F) - .withNesterov(true) - .withNumberOfEpochs(1076686728) - .withNumberOfWorkers(1071396721) - .withOptimizer(StochasticOptimizer.ADAM) - .withRandomSeed(1057852499) - .withStepLRGamma(86.41818F) - .withStepLRStepSize(1698348781) - .withTrainingBatchSize(124401453) - .withValidationBatchSize(1482539415) - .withWarmupCosineLRCycles(69.18967F) - .withWarmupCosineLRWarmupEpochs(1390476760) - .withWeightDecay(69.7827F) - .withTrainingCropSize(1122478262) - .withValidationCropSize(945558500) - .withValidationResizeSize(1406574230) - .withWeightedLoss(1632810931)) - .withSearchSpace(Arrays.asList( - new ImageModelDistributionSettingsClassification().withAmsGradient("cjuftekio") - .withAugmentations("nd") - .withBeta1("wfhvpxjhxzu") - .withBeta2("jzabbwz") - .withDistributed("zuaixcdckixspsa") - .withEarlyStopping("avkmvyxzerejrkpz") - .withEarlyStoppingDelay("yetjxryo") - .withEarlyStoppingPatience("ae") - .withEvaluationFrequency("whlbecgihzbpem") - .withEnableOnnxNormalization("rab") - .withGradientAccumulationStep("rwwxywpj") - .withLayersToFreeze("pboxhifppsk") - .withLearningRate("s") - .withLearningRateScheduler("hhmifjuaj") - .withModelName("wvcmmpeglyuq") - .withMomentum("m") - .withNesterov("exbzbqufpnezsjza") - .withNumberOfEpochs("ldrorhyogzmsimeh") - .withNumberOfWorkers("uuwdhtq") - .withOptimizer("yhn") - .withRandomSeed("xtnsugisn") - .withStepLRGamma("wnwngh") - .withStepLRStepSize("ovke") - .withTrainingBatchSize("micjixxfsf") - .withValidationBatchSize("rtnuguefxxijteb") - .withWarmupCosineLRCycles("eywetkrhlolmcn") - .withWarmupCosineLRWarmupEpochs("pfgsvbbvaqdljnp") - .withWeightDecay("l") - .withTrainingCropSize("rpvsgloiovs") - .withValidationCropSize("ivqsuvwtenb") - .withValidationResizeSize("i") - .withWeightedLoss("khcyoaqxuk"), - new ImageModelDistributionSettingsClassification().withAmsGradient("jccxwbp") - .withAugmentations("ykdigqzlrznda") - .withBeta1("nidmjqmvytg") - .withBeta2("qlarhqt") - .withDistributed("caz") - .withEarlyStopping("d") - .withEarlyStoppingDelay("zffzjwztsmp") - .withEarlyStoppingPatience("ggr") - .withEvaluationFrequency("lgf") - .withEnableOnnxNormalization("tig") - .withGradientAccumulationStep("frrkdknczgorywnv") - .withLayersToFreeze("tv") - .withLearningRate("evdlh") - .withLearningRateScheduler("bkarbpyhssr") - .withModelName("kpkpkocmacc") - .withMomentum("xxopyi") - .withNesterov("vspeslhwyykgvr") - .withNumberOfEpochs("pumdd") - .withNumberOfWorkers("ajk") - .withOptimizer("yddt") - .withRandomSeed("c") - .withStepLRGamma("vafnbfbqvenq") - .withStepLRStepSize("hgko") - .withTrainingBatchSize("wzejpecwzvcm") - .withValidationBatchSize("wdlu") - .withWarmupCosineLRCycles("ypr") - .withWarmupCosineLRWarmupEpochs("idwmt") - .withWeightDecay("bvtzldzchub") - .withTrainingCropSize("rdetawevxehuekdx") - .withValidationCropSize("zvdov") - .withValidationResizeSize("blerlpr") - .withWeightedLoss("qccddcbny"))); - model = BinaryData.fromObject(model).toObject(ImageClassificationBase.class); - Assertions.assertEquals(1777593025, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT78H18M45S"), model.limitSettings().timeout()); - Assertions.assertEquals(1190773271, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1889059190, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(482125528, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("jpsucmxi", model.validationData().description()); - Assertions.assertEquals("rbzakpjtcqr", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(94.50327063126527D, model.validationDataSize()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("zfwugeup", model.modelSettings().advancedSettings()); - Assertions.assertEquals("necexkgrvfps", model.modelSettings().augmentations()); - Assertions.assertEquals(4.8045993F, model.modelSettings().beta1()); - Assertions.assertEquals(81.08034F, model.modelSettings().beta2()); - Assertions.assertEquals(383318348, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("qpdzf", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("jqfbifop", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("cnwawoxc", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(299031519, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(280683238, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(182536431, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1311462683, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1166812452, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(85.73021F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("uuugtjig", model.modelSettings().modelName()); - Assertions.assertEquals(52.275288F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(1076686728, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1071396721, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(1057852499, model.modelSettings().randomSeed()); - Assertions.assertEquals(86.41818F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1698348781, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(124401453, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1482539415, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(69.18967F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1390476760, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(69.7827F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1122478262, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(945558500, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1406574230, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(1632810931, model.modelSettings().weightedLoss()); - Assertions.assertEquals("cjuftekio", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("nd", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("wfhvpxjhxzu", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("jzabbwz", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("zuaixcdckixspsa", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("avkmvyxzerejrkpz", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("yetjxryo", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("ae", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("whlbecgihzbpem", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("rab", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("rwwxywpj", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("pboxhifppsk", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("s", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("hhmifjuaj", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("wvcmmpeglyuq", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("m", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("exbzbqufpnezsjza", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ldrorhyogzmsimeh", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("uuwdhtq", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("yhn", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("xtnsugisn", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("wnwngh", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("ovke", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("micjixxfsf", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("rtnuguefxxijteb", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("eywetkrhlolmcn", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("pfgsvbbvaqdljnp", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("l", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("rpvsgloiovs", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("ivqsuvwtenb", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("i", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("khcyoaqxuk", model.searchSpace().get(0).weightedLoss()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationMultilabelTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationMultilabelTests.java deleted file mode 100644 index 98c86f7c4467..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationMultilabelTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ClassificationMultilabelPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageClassificationMultilabel; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageClassificationMultilabelTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageClassificationMultilabel model = BinaryData.fromString( - "{\"taskType\":\"ImageClassificationMultilabel\",\"primaryMetric\":\"AUCWeighted\",\"modelSettings\":{\"trainingCropSize\":617578345,\"validationCropSize\":102589944,\"validationResizeSize\":1980460749,\"weightedLoss\":1156963756,\"amsGradient\":true,\"advancedSettings\":\"ctcxs\",\"augmentations\":\"bzdxmsynb\",\"beta1\":54.66098,\"beta2\":69.80503,\"checkpointFrequency\":1543500625,\"checkpointRunId\":\"uzmsvzyqrbr\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"hj\",\"mode\":\"EvalDownload\",\"description\":\"i\"},\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":583009502,\"earlyStoppingPatience\":858094139,\"evaluationFrequency\":1286684068,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":47403047,\"layersToFreeze\":1160956769,\"learningRate\":47.12773,\"learningRateScheduler\":\"Step\",\"modelName\":\"boz\",\"momentum\":40.360588,\"nesterov\":true,\"numberOfEpochs\":766236373,\"numberOfWorkers\":2064309702,\"optimizer\":\"None\",\"randomSeed\":26532947,\"stepLRGamma\":11.640281,\"stepLRStepSize\":1577359960,\"trainingBatchSize\":1671141270,\"validationBatchSize\":426588698,\"warmupCosineLRCycles\":4.2323647,\"warmupCosineLRWarmupEpochs\":913521751,\"weightDecay\":38.36152},\"searchSpace\":[{\"trainingCropSize\":\"orgfhjxsawooauff\",\"validationCropSize\":\"fqkmwz\",\"validationResizeSize\":\"q\",\"weightedLoss\":\"ybmrnotoc\",\"amsGradient\":\"zdaiovrb\",\"augmentations\":\"pqphk\",\"beta1\":\"yzadcrxylaypdt\",\"beta2\":\"velffohuriw\",\"distributed\":\"dfrwpsshrm\",\"earlyStopping\":\"cclpct\",\"earlyStoppingDelay\":\"gkscxjfsgmosp\",\"earlyStoppingPatience\":\"bnxsqc\",\"evaluationFrequency\":\"scuyfqlamfbqhsuj\",\"enableOnnxNormalization\":\"fu\",\"gradientAccumulationStep\":\"nxqpwnikxkcajgrb\",\"layersToFreeze\":\"tsvgoocqs\",\"learningRate\":\"mzlpcx\",\"learningRateScheduler\":\"mhxxrqicfzfvwjd\",\"modelName\":\"kvpyeyo\",\"momentum\":\"inmpnqupdkjrzfwk\",\"nesterov\":\"uobdxw\",\"numberOfEpochs\":\"dcclcvqsr\",\"numberOfWorkers\":\"ay\",\"optimizer\":\"vwbzmfxlrymf\",\"randomSeed\":\"lpiywqnpfydrfbg\",\"stepLRGamma\":\"y\",\"stepLRStepSize\":\"yxmkhmqyncgaul\",\"trainingBatchSize\":\"styygjq\",\"validationBatchSize\":\"lmwqg\",\"warmupCosineLRCycles\":\"mqmiwxzfvvzu\",\"warmupCosineLRWarmupEpochs\":\"fgufjnbx\",\"weightDecay\":\"mwdukinhl\"},{\"trainingCropSize\":\"gde\",\"validationCropSize\":\"kzou\",\"validationResizeSize\":\"ewwpz\",\"weightedLoss\":\"wcgldohgcandx\",\"amsGradient\":\"hhtestdqt\",\"augmentations\":\"nckkpljdshv\",\"beta1\":\"k\",\"beta2\":\"ccyijjimhi\",\"distributed\":\"rqnjxmvvsduydwnw\",\"earlyStopping\":\"uhhqldrdymnswxie\",\"earlyStoppingDelay\":\"wqnghxnimvyuj\",\"earlyStoppingPatience\":\"gunnqgypuqt\",\"evaluationFrequency\":\"lque\",\"enableOnnxNormalization\":\"mvyumgmmuebsnzn\",\"gradientAccumulationStep\":\"squfmjxcyoseq\",\"layersToFreeze\":\"zisvbrqgcyjpgaw\",\"learningRate\":\"kwonrzpghl\",\"learningRateScheduler\":\"tbgblxbuibrvjzta\",\"modelName\":\"vs\",\"momentum\":\"jihvfjcqrttjfuq\",\"nesterov\":\"fjewfeqbavdo\",\"numberOfEpochs\":\"wy\",\"numberOfWorkers\":\"fm\",\"optimizer\":\"lvxgwzz\",\"randomSeed\":\"dtlcjgpvcqzv\",\"stepLRGamma\":\"b\",\"stepLRStepSize\":\"wx\",\"trainingBatchSize\":\"xrmx\",\"validationBatchSize\":\"drwynbgovazoym\",\"warmupCosineLRCycles\":\"hhplkhww\",\"warmupCosineLRWarmupEpochs\":\"atveqm\",\"weightDecay\":\"cswzeyxrye\"},{\"trainingCropSize\":\"mhpwbukl\",\"validationCropSize\":\"mfasgtlvhqpoilos\",\"validationResizeSize\":\"emcezevftm\",\"weightedLoss\":\"l\",\"amsGradient\":\"kjyghztms\",\"augmentations\":\"wtpcflcezswwvw\",\"beta1\":\"tdjtvbfpfhru\",\"beta2\":\"syqcjnqswxdowum\",\"distributed\":\"ukrcdiohcl\",\"earlyStopping\":\"dnhfknebwedd\",\"earlyStoppingDelay\":\"yzcwy\",\"earlyStoppingPatience\":\"mkaqldqabnwvpaq\",\"evaluationFrequency\":\"xf\",\"enableOnnxNormalization\":\"igcfddofxnf\",\"gradientAccumulationStep\":\"jyyrqaedw\",\"layersToFreeze\":\"ocytjgoeayokrw\",\"learningRate\":\"ihwpadhedbfobd\",\"learningRateScheduler\":\"vothmkhjaoz\",\"modelName\":\"wfcn\",\"momentum\":\"bpoelhscmyhrhjv\",\"nesterov\":\"fqbokndwp\",\"numberOfEpochs\":\"qwojoev\",\"numberOfWorkers\":\"ufytdxmly\",\"optimizer\":\"lyvapbkrbu\",\"randomSeed\":\"gtdltlcuha\",\"stepLRGamma\":\"ijvaylze\",\"stepLRStepSize\":\"lpsftqkrvm\",\"trainingBatchSize\":\"bvvcpw\",\"validationBatchSize\":\"suspnhmzy\",\"warmupCosineLRCycles\":\"fetev\",\"warmupCosineLRWarmupEpochs\":\"tf\",\"weightDecay\":\"wacycsyotctkhf\"},{\"trainingCropSize\":\"satvcs\",\"validationCropSize\":\"mhnmizhvprhqqw\",\"validationResizeSize\":\"blehhkplo\",\"weightedLoss\":\"gottaksad\",\"amsGradient\":\"ghmmtbtdvucfvvra\",\"augmentations\":\"eurdeewlsuxp\",\"beta1\":\"wkdwjyjiznioroof\",\"beta2\":\"taspmcrei\",\"distributed\":\"ftrnighminuwqxu\",\"earlyStopping\":\"robgwfmsxj\",\"earlyStoppingDelay\":\"ylwx\",\"earlyStoppingPatience\":\"zjow\",\"evaluationFrequency\":\"geerclbl\",\"enableOnnxNormalization\":\"hpwachyeu\",\"gradientAccumulationStep\":\"wmvwryvdi\",\"layersToFreeze\":\"ii\",\"learningRate\":\"pruccwme\",\"learningRateScheduler\":\"txsytrtexegwmrq\",\"modelName\":\"wi\",\"momentum\":\"vycfjncindi\",\"nesterov\":\"q\",\"numberOfEpochs\":\"jwjuriarsb\",\"numberOfWorkers\":\"lanhzcknjxizba\",\"optimizer\":\"ygzkztxfexwacyy\",\"randomSeed\":\"lxppd\",\"stepLRGamma\":\"zkf\",\"stepLRStepSize\":\"uiiu\",\"trainingBatchSize\":\"b\",\"validationBatchSize\":\"cjy\",\"warmupCosineLRCycles\":\"dcizeqqfop\",\"warmupCosineLRWarmupEpochs\":\"opmotdsf\",\"weightDecay\":\"xqlyoazyfbkmvl\"}],\"limitSettings\":{\"maxTrials\":1571107486,\"timeout\":\"PT193H51S\",\"maxConcurrentTrials\":2050591523},\"sweepSettings\":{\"samplingAlgorithm\":\"Bayesian\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":490867132,\"delayEvaluation\":787891741}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"kvhyejth\",\"mode\":\"ReadOnlyMount\",\"description\":\"bpergwlck\"},\"validationDataSize\":60.27486371298584,\"logVerbosity\":\"Error\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"qsokknpug\",\"mode\":\"EvalDownload\",\"description\":\"izcrjix\"},\"targetColumnName\":\"j\"}") - .toObject(ImageClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("izcrjix", model.trainingData().description()); - Assertions.assertEquals("qsokknpug", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("j", model.targetColumnName()); - Assertions.assertEquals(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("ctcxs", model.modelSettings().advancedSettings()); - Assertions.assertEquals("bzdxmsynb", model.modelSettings().augmentations()); - Assertions.assertEquals(54.66098F, model.modelSettings().beta1()); - Assertions.assertEquals(69.80503F, model.modelSettings().beta2()); - Assertions.assertEquals(1543500625, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("uzmsvzyqrbr", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("i", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("hj", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(583009502, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(858094139, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1286684068, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(47403047, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1160956769, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(47.12773F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("boz", model.modelSettings().modelName()); - Assertions.assertEquals(40.360588F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(766236373, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(2064309702, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(26532947, model.modelSettings().randomSeed()); - Assertions.assertEquals(11.640281F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1577359960, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1671141270, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(426588698, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(4.2323647F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(913521751, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(38.36152F, model.modelSettings().weightDecay()); - Assertions.assertEquals(617578345, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(102589944, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1980460749, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(1156963756, model.modelSettings().weightedLoss()); - Assertions.assertEquals("zdaiovrb", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("pqphk", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("yzadcrxylaypdt", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("velffohuriw", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("dfrwpsshrm", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("cclpct", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("gkscxjfsgmosp", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("bnxsqc", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("scuyfqlamfbqhsuj", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("fu", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("nxqpwnikxkcajgrb", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("tsvgoocqs", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("mzlpcx", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("mhxxrqicfzfvwjd", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("kvpyeyo", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("inmpnqupdkjrzfwk", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("uobdxw", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("dcclcvqsr", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("ay", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("vwbzmfxlrymf", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("lpiywqnpfydrfbg", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("y", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yxmkhmqyncgaul", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("styygjq", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("lmwqg", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("mqmiwxzfvvzu", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("fgufjnbx", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("mwdukinhl", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("orgfhjxsawooauff", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("fqkmwz", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("q", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("ybmrnotoc", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(1571107486, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT193H51S"), model.limitSettings().timeout()); - Assertions.assertEquals(2050591523, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(490867132, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(787891741, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("bpergwlck", model.validationData().description()); - Assertions.assertEquals("kvhyejth", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(60.27486371298584D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageClassificationMultilabel model = new ImageClassificationMultilabel().withLogVerbosity(LogVerbosity.ERROR) - .withTrainingData(new MLTableJobInput().withDescription("izcrjix") - .withUri("qsokknpug") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withTargetColumnName("j") - .withPrimaryMetric(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED) - .withModelSettings(new ImageModelSettingsClassification().withAmsGradient(true) - .withAdvancedSettings("ctcxs") - .withAugmentations("bzdxmsynb") - .withBeta1(54.66098F) - .withBeta2(69.80503F) - .withCheckpointFrequency(1543500625) - .withCheckpointRunId("uzmsvzyqrbr") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("i") - .withUri("hj") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withDistributed(true) - .withEarlyStopping(false) - .withEarlyStoppingDelay(583009502) - .withEarlyStoppingPatience(858094139) - .withEvaluationFrequency(1286684068) - .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(47403047) - .withLayersToFreeze(1160956769) - .withLearningRate(47.12773F) - .withLearningRateScheduler(LearningRateScheduler.STEP) - .withModelName("boz") - .withMomentum(40.360588F) - .withNesterov(true) - .withNumberOfEpochs(766236373) - .withNumberOfWorkers(2064309702) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(26532947) - .withStepLRGamma(11.640281F) - .withStepLRStepSize(1577359960) - .withTrainingBatchSize(1671141270) - .withValidationBatchSize(426588698) - .withWarmupCosineLRCycles(4.2323647F) - .withWarmupCosineLRWarmupEpochs(913521751) - .withWeightDecay(38.36152F) - .withTrainingCropSize(617578345) - .withValidationCropSize(102589944) - .withValidationResizeSize(1980460749) - .withWeightedLoss(1156963756)) - .withSearchSpace(Arrays.asList( - new ImageModelDistributionSettingsClassification().withAmsGradient("zdaiovrb") - .withAugmentations("pqphk") - .withBeta1("yzadcrxylaypdt") - .withBeta2("velffohuriw") - .withDistributed("dfrwpsshrm") - .withEarlyStopping("cclpct") - .withEarlyStoppingDelay("gkscxjfsgmosp") - .withEarlyStoppingPatience("bnxsqc") - .withEvaluationFrequency("scuyfqlamfbqhsuj") - .withEnableOnnxNormalization("fu") - .withGradientAccumulationStep("nxqpwnikxkcajgrb") - .withLayersToFreeze("tsvgoocqs") - .withLearningRate("mzlpcx") - .withLearningRateScheduler("mhxxrqicfzfvwjd") - .withModelName("kvpyeyo") - .withMomentum("inmpnqupdkjrzfwk") - .withNesterov("uobdxw") - .withNumberOfEpochs("dcclcvqsr") - .withNumberOfWorkers("ay") - .withOptimizer("vwbzmfxlrymf") - .withRandomSeed("lpiywqnpfydrfbg") - .withStepLRGamma("y") - .withStepLRStepSize("yxmkhmqyncgaul") - .withTrainingBatchSize("styygjq") - .withValidationBatchSize("lmwqg") - .withWarmupCosineLRCycles("mqmiwxzfvvzu") - .withWarmupCosineLRWarmupEpochs("fgufjnbx") - .withWeightDecay("mwdukinhl") - .withTrainingCropSize("orgfhjxsawooauff") - .withValidationCropSize("fqkmwz") - .withValidationResizeSize("q") - .withWeightedLoss("ybmrnotoc"), - new ImageModelDistributionSettingsClassification().withAmsGradient("hhtestdqt") - .withAugmentations("nckkpljdshv") - .withBeta1("k") - .withBeta2("ccyijjimhi") - .withDistributed("rqnjxmvvsduydwnw") - .withEarlyStopping("uhhqldrdymnswxie") - .withEarlyStoppingDelay("wqnghxnimvyuj") - .withEarlyStoppingPatience("gunnqgypuqt") - .withEvaluationFrequency("lque") - .withEnableOnnxNormalization("mvyumgmmuebsnzn") - .withGradientAccumulationStep("squfmjxcyoseq") - .withLayersToFreeze("zisvbrqgcyjpgaw") - .withLearningRate("kwonrzpghl") - .withLearningRateScheduler("tbgblxbuibrvjzta") - .withModelName("vs") - .withMomentum("jihvfjcqrttjfuq") - .withNesterov("fjewfeqbavdo") - .withNumberOfEpochs("wy") - .withNumberOfWorkers("fm") - .withOptimizer("lvxgwzz") - .withRandomSeed("dtlcjgpvcqzv") - .withStepLRGamma("b") - .withStepLRStepSize("wx") - .withTrainingBatchSize("xrmx") - .withValidationBatchSize("drwynbgovazoym") - .withWarmupCosineLRCycles("hhplkhww") - .withWarmupCosineLRWarmupEpochs("atveqm") - .withWeightDecay("cswzeyxrye") - .withTrainingCropSize("gde") - .withValidationCropSize("kzou") - .withValidationResizeSize("ewwpz") - .withWeightedLoss("wcgldohgcandx"), - new ImageModelDistributionSettingsClassification().withAmsGradient("kjyghztms") - .withAugmentations("wtpcflcezswwvw") - .withBeta1("tdjtvbfpfhru") - .withBeta2("syqcjnqswxdowum") - .withDistributed("ukrcdiohcl") - .withEarlyStopping("dnhfknebwedd") - .withEarlyStoppingDelay("yzcwy") - .withEarlyStoppingPatience("mkaqldqabnwvpaq") - .withEvaluationFrequency("xf") - .withEnableOnnxNormalization("igcfddofxnf") - .withGradientAccumulationStep("jyyrqaedw") - .withLayersToFreeze("ocytjgoeayokrw") - .withLearningRate("ihwpadhedbfobd") - .withLearningRateScheduler("vothmkhjaoz") - .withModelName("wfcn") - .withMomentum("bpoelhscmyhrhjv") - .withNesterov("fqbokndwp") - .withNumberOfEpochs("qwojoev") - .withNumberOfWorkers("ufytdxmly") - .withOptimizer("lyvapbkrbu") - .withRandomSeed("gtdltlcuha") - .withStepLRGamma("ijvaylze") - .withStepLRStepSize("lpsftqkrvm") - .withTrainingBatchSize("bvvcpw") - .withValidationBatchSize("suspnhmzy") - .withWarmupCosineLRCycles("fetev") - .withWarmupCosineLRWarmupEpochs("tf") - .withWeightDecay("wacycsyotctkhf") - .withTrainingCropSize("mhpwbukl") - .withValidationCropSize("mfasgtlvhqpoilos") - .withValidationResizeSize("emcezevftm") - .withWeightedLoss("l"), - new ImageModelDistributionSettingsClassification().withAmsGradient("ghmmtbtdvucfvvra") - .withAugmentations("eurdeewlsuxp") - .withBeta1("wkdwjyjiznioroof") - .withBeta2("taspmcrei") - .withDistributed("ftrnighminuwqxu") - .withEarlyStopping("robgwfmsxj") - .withEarlyStoppingDelay("ylwx") - .withEarlyStoppingPatience("zjow") - .withEvaluationFrequency("geerclbl") - .withEnableOnnxNormalization("hpwachyeu") - .withGradientAccumulationStep("wmvwryvdi") - .withLayersToFreeze("ii") - .withLearningRate("pruccwme") - .withLearningRateScheduler("txsytrtexegwmrq") - .withModelName("wi") - .withMomentum("vycfjncindi") - .withNesterov("q") - .withNumberOfEpochs("jwjuriarsb") - .withNumberOfWorkers("lanhzcknjxizba") - .withOptimizer("ygzkztxfexwacyy") - .withRandomSeed("lxppd") - .withStepLRGamma("zkf") - .withStepLRStepSize("uiiu") - .withTrainingBatchSize("b") - .withValidationBatchSize("cjy") - .withWarmupCosineLRCycles("dcizeqqfop") - .withWarmupCosineLRWarmupEpochs("opmotdsf") - .withWeightDecay("xqlyoazyfbkmvl") - .withTrainingCropSize("satvcs") - .withValidationCropSize("mhnmizhvprhqqw") - .withValidationResizeSize("blehhkplo") - .withWeightedLoss("gottaksad"))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(1571107486) - .withTimeout(Duration.parse("PT193H51S")) - .withMaxConcurrentTrials(2050591523)) - .withSweepSettings(new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN) - .withEarlyTermination( - new EarlyTerminationPolicy().withEvaluationInterval(490867132).withDelayEvaluation(787891741))) - .withValidationData(new MLTableJobInput().withDescription("bpergwlck") - .withUri("kvhyejth") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withValidationDataSize(60.27486371298584D); - model = BinaryData.fromObject(model).toObject(ImageClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("izcrjix", model.trainingData().description()); - Assertions.assertEquals("qsokknpug", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("j", model.targetColumnName()); - Assertions.assertEquals(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("ctcxs", model.modelSettings().advancedSettings()); - Assertions.assertEquals("bzdxmsynb", model.modelSettings().augmentations()); - Assertions.assertEquals(54.66098F, model.modelSettings().beta1()); - Assertions.assertEquals(69.80503F, model.modelSettings().beta2()); - Assertions.assertEquals(1543500625, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("uzmsvzyqrbr", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("i", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("hj", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(583009502, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(858094139, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1286684068, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(47403047, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1160956769, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(47.12773F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("boz", model.modelSettings().modelName()); - Assertions.assertEquals(40.360588F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(766236373, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(2064309702, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(26532947, model.modelSettings().randomSeed()); - Assertions.assertEquals(11.640281F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1577359960, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1671141270, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(426588698, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(4.2323647F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(913521751, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(38.36152F, model.modelSettings().weightDecay()); - Assertions.assertEquals(617578345, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(102589944, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1980460749, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(1156963756, model.modelSettings().weightedLoss()); - Assertions.assertEquals("zdaiovrb", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("pqphk", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("yzadcrxylaypdt", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("velffohuriw", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("dfrwpsshrm", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("cclpct", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("gkscxjfsgmosp", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("bnxsqc", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("scuyfqlamfbqhsuj", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("fu", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("nxqpwnikxkcajgrb", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("tsvgoocqs", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("mzlpcx", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("mhxxrqicfzfvwjd", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("kvpyeyo", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("inmpnqupdkjrzfwk", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("uobdxw", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("dcclcvqsr", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("ay", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("vwbzmfxlrymf", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("lpiywqnpfydrfbg", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("y", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yxmkhmqyncgaul", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("styygjq", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("lmwqg", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("mqmiwxzfvvzu", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("fgufjnbx", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("mwdukinhl", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("orgfhjxsawooauff", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("fqkmwz", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("q", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("ybmrnotoc", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(1571107486, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT193H51S"), model.limitSettings().timeout()); - Assertions.assertEquals(2050591523, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(490867132, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(787891741, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("bpergwlck", model.validationData().description()); - Assertions.assertEquals("kvhyejth", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(60.27486371298584D, model.validationDataSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationTests.java deleted file mode 100644 index 4775d08f446f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationTests.java +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ClassificationPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageClassification; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageClassificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageClassification model = BinaryData.fromString( - "{\"taskType\":\"ImageClassification\",\"primaryMetric\":\"AveragePrecisionScoreWeighted\",\"modelSettings\":{\"trainingCropSize\":1833679290,\"validationCropSize\":381440577,\"validationResizeSize\":1189124637,\"weightedLoss\":2517837,\"amsGradient\":true,\"advancedSettings\":\"uarlcjiwgsxfaioc\",\"augmentations\":\"gujjgn\",\"beta1\":54.415714,\"beta2\":11.673647,\"checkpointFrequency\":1680002171,\"checkpointRunId\":\"cbpaefzqsym\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"enjc\",\"mode\":\"EvalDownload\",\"description\":\"mfucrtfod\"},\"distributed\":false,\"earlyStopping\":true,\"earlyStoppingDelay\":1307803742,\"earlyStoppingPatience\":532002430,\"evaluationFrequency\":1547790235,\"enableOnnxNormalization\":false,\"gradientAccumulationStep\":2075191599,\"layersToFreeze\":1027792262,\"learningRate\":20.873022,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"udxdyyrudmahswt\",\"momentum\":75.429596,\"nesterov\":false,\"numberOfEpochs\":1978635992,\"numberOfWorkers\":1173715021,\"optimizer\":\"None\",\"randomSeed\":1829590179,\"stepLRGamma\":37.33512,\"stepLRStepSize\":230541163,\"trainingBatchSize\":1518427810,\"validationBatchSize\":1851126067,\"warmupCosineLRCycles\":98.75179,\"warmupCosineLRWarmupEpochs\":453414511,\"weightDecay\":4.1702747},\"searchSpace\":[{\"trainingCropSize\":\"anx\",\"validationCropSize\":\"muvardlmzjot\",\"validationResizeSize\":\"rmuhcuhtuzlx\",\"weightedLoss\":\"yo\",\"amsGradient\":\"arpfctwrap\",\"augmentations\":\"dojq\",\"beta1\":\"zesi\",\"beta2\":\"ysnjqyowaadc\",\"distributed\":\"azab\",\"earlyStopping\":\"dtsewkaupwhlzyc\",\"earlyStoppingDelay\":\"emgjlm\",\"earlyStoppingPatience\":\"dorsirxxhy\",\"evaluationFrequency\":\"qakofajf\",\"enableOnnxNormalization\":\"prfvmkinwteyrqsh\",\"gradientAccumulationStep\":\"bcejopylbl\",\"layersToFreeze\":\"prrw\",\"learningRate\":\"pimtc\",\"learningRateScheduler\":\"fx\",\"modelName\":\"ytzfsl\",\"momentum\":\"zhqikm\",\"nesterov\":\"bliqemcdiiiskl\",\"numberOfEpochs\":\"nxx\",\"numberOfWorkers\":\"jxvtrkfkgenjqnnp\",\"optimizer\":\"kosnyxigfoujjc\",\"randomSeed\":\"dqmrlhnzkwopsw\",\"stepLRGamma\":\"inxupr\",\"stepLRStepSize\":\"yxwjezb\",\"trainingBatchSize\":\"ployuekdcpvu\",\"validationBatchSize\":\"rsvjmnsvujnjktv\",\"warmupCosineLRCycles\":\"efcjisepkdbxot\",\"warmupCosineLRWarmupEpochs\":\"jampqoclannm\",\"weightDecay\":\"nlsuqbwzstr\"}],\"limitSettings\":{\"maxTrials\":803234002,\"timeout\":\"PT72H6M3S\",\"maxConcurrentTrials\":1698507772},\"sweepSettings\":{\"samplingAlgorithm\":\"Bayesian\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":2016687082,\"delayEvaluation\":336030670}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"nfhoksmmcul\",\"mode\":\"Download\",\"description\":\"cru\"},\"validationDataSize\":67.1284830438322,\"logVerbosity\":\"Warning\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"lsgaojbtqpq\",\"mode\":\"ReadWriteMount\",\"description\":\"tpzp\"},\"targetColumnName\":\"zflmcdsgxcelujis\"}") - .toObject(ImageClassification.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("tpzp", model.trainingData().description()); - Assertions.assertEquals("lsgaojbtqpq", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("zflmcdsgxcelujis", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("uarlcjiwgsxfaioc", model.modelSettings().advancedSettings()); - Assertions.assertEquals("gujjgn", model.modelSettings().augmentations()); - Assertions.assertEquals(54.415714F, model.modelSettings().beta1()); - Assertions.assertEquals(11.673647F, model.modelSettings().beta2()); - Assertions.assertEquals(1680002171, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("cbpaefzqsym", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("mfucrtfod", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("enjc", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1307803742, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(532002430, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1547790235, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(2075191599, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1027792262, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(20.873022F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("udxdyyrudmahswt", model.modelSettings().modelName()); - Assertions.assertEquals(75.429596F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1978635992, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1173715021, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(1829590179, model.modelSettings().randomSeed()); - Assertions.assertEquals(37.33512F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(230541163, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1518427810, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1851126067, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(98.75179F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(453414511, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(4.1702747F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1833679290, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(381440577, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1189124637, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(2517837, model.modelSettings().weightedLoss()); - Assertions.assertEquals("arpfctwrap", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("dojq", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("zesi", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("ysnjqyowaadc", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("azab", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("dtsewkaupwhlzyc", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("emgjlm", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("dorsirxxhy", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("qakofajf", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("prfvmkinwteyrqsh", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("bcejopylbl", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("prrw", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("pimtc", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("fx", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ytzfsl", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("zhqikm", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("bliqemcdiiiskl", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("nxx", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("jxvtrkfkgenjqnnp", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("kosnyxigfoujjc", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("dqmrlhnzkwopsw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("inxupr", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yxwjezb", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("ployuekdcpvu", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("rsvjmnsvujnjktv", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("efcjisepkdbxot", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("jampqoclannm", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("nlsuqbwzstr", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("anx", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("muvardlmzjot", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("rmuhcuhtuzlx", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("yo", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(803234002, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT72H6M3S"), model.limitSettings().timeout()); - Assertions.assertEquals(1698507772, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(2016687082, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(336030670, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("cru", model.validationData().description()); - Assertions.assertEquals("nfhoksmmcul", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(67.1284830438322D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageClassification model - = new ImageClassification().withLogVerbosity(LogVerbosity.WARNING) - .withTrainingData(new MLTableJobInput().withDescription("tpzp") - .withUri("lsgaojbtqpq") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT)) - .withTargetColumnName("zflmcdsgxcelujis") - .withPrimaryMetric(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED) - .withModelSettings(new ImageModelSettingsClassification().withAmsGradient(true) - .withAdvancedSettings("uarlcjiwgsxfaioc") - .withAugmentations("gujjgn") - .withBeta1(54.415714F) - .withBeta2(11.673647F) - .withCheckpointFrequency(1680002171) - .withCheckpointRunId("cbpaefzqsym") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("mfucrtfod") - .withUri("enjc") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withDistributed(false) - .withEarlyStopping(true) - .withEarlyStoppingDelay(1307803742) - .withEarlyStoppingPatience(532002430) - .withEvaluationFrequency(1547790235) - .withEnableOnnxNormalization(false) - .withGradientAccumulationStep(2075191599) - .withLayersToFreeze(1027792262) - .withLearningRate(20.873022F) - .withLearningRateScheduler(LearningRateScheduler.WARMUP_COSINE) - .withModelName("udxdyyrudmahswt") - .withMomentum(75.429596F) - .withNesterov(false) - .withNumberOfEpochs(1978635992) - .withNumberOfWorkers(1173715021) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(1829590179) - .withStepLRGamma(37.33512F) - .withStepLRStepSize(230541163) - .withTrainingBatchSize(1518427810) - .withValidationBatchSize(1851126067) - .withWarmupCosineLRCycles(98.75179F) - .withWarmupCosineLRWarmupEpochs(453414511) - .withWeightDecay(4.1702747F) - .withTrainingCropSize(1833679290) - .withValidationCropSize(381440577) - .withValidationResizeSize(1189124637) - .withWeightedLoss(2517837)) - .withSearchSpace( - Arrays.asList(new ImageModelDistributionSettingsClassification().withAmsGradient("arpfctwrap") - .withAugmentations("dojq") - .withBeta1("zesi") - .withBeta2("ysnjqyowaadc") - .withDistributed("azab") - .withEarlyStopping("dtsewkaupwhlzyc") - .withEarlyStoppingDelay("emgjlm") - .withEarlyStoppingPatience("dorsirxxhy") - .withEvaluationFrequency("qakofajf") - .withEnableOnnxNormalization("prfvmkinwteyrqsh") - .withGradientAccumulationStep("bcejopylbl") - .withLayersToFreeze("prrw") - .withLearningRate("pimtc") - .withLearningRateScheduler("fx") - .withModelName("ytzfsl") - .withMomentum("zhqikm") - .withNesterov("bliqemcdiiiskl") - .withNumberOfEpochs("nxx") - .withNumberOfWorkers("jxvtrkfkgenjqnnp") - .withOptimizer("kosnyxigfoujjc") - .withRandomSeed("dqmrlhnzkwopsw") - .withStepLRGamma("inxupr") - .withStepLRStepSize("yxwjezb") - .withTrainingBatchSize("ployuekdcpvu") - .withValidationBatchSize("rsvjmnsvujnjktv") - .withWarmupCosineLRCycles("efcjisepkdbxot") - .withWarmupCosineLRWarmupEpochs("jampqoclannm") - .withWeightDecay("nlsuqbwzstr") - .withTrainingCropSize("anx") - .withValidationCropSize("muvardlmzjot") - .withValidationResizeSize("rmuhcuhtuzlx") - .withWeightedLoss("yo"))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(803234002) - .withTimeout(Duration.parse("PT72H6M3S")) - .withMaxConcurrentTrials(1698507772)) - .withSweepSettings( - new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN) - .withEarlyTermination(new EarlyTerminationPolicy().withEvaluationInterval(2016687082) - .withDelayEvaluation(336030670))) - .withValidationData(new MLTableJobInput().withDescription("cru") - .withUri("nfhoksmmcul") - .withMode(InputDeliveryMode.DOWNLOAD)) - .withValidationDataSize(67.1284830438322D); - model = BinaryData.fromObject(model).toObject(ImageClassification.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("tpzp", model.trainingData().description()); - Assertions.assertEquals("lsgaojbtqpq", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("zflmcdsgxcelujis", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("uarlcjiwgsxfaioc", model.modelSettings().advancedSettings()); - Assertions.assertEquals("gujjgn", model.modelSettings().augmentations()); - Assertions.assertEquals(54.415714F, model.modelSettings().beta1()); - Assertions.assertEquals(11.673647F, model.modelSettings().beta2()); - Assertions.assertEquals(1680002171, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("cbpaefzqsym", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("mfucrtfod", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("enjc", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1307803742, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(532002430, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1547790235, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(2075191599, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1027792262, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(20.873022F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("udxdyyrudmahswt", model.modelSettings().modelName()); - Assertions.assertEquals(75.429596F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1978635992, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1173715021, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(1829590179, model.modelSettings().randomSeed()); - Assertions.assertEquals(37.33512F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(230541163, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1518427810, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1851126067, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(98.75179F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(453414511, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(4.1702747F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1833679290, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(381440577, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1189124637, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(2517837, model.modelSettings().weightedLoss()); - Assertions.assertEquals("arpfctwrap", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("dojq", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("zesi", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("ysnjqyowaadc", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("azab", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("dtsewkaupwhlzyc", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("emgjlm", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("dorsirxxhy", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("qakofajf", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("prfvmkinwteyrqsh", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("bcejopylbl", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("prrw", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("pimtc", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("fx", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ytzfsl", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("zhqikm", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("bliqemcdiiiskl", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("nxx", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("jxvtrkfkgenjqnnp", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("kosnyxigfoujjc", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("dqmrlhnzkwopsw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("inxupr", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yxwjezb", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("ployuekdcpvu", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("rsvjmnsvujnjktv", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("efcjisepkdbxot", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("jampqoclannm", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("nlsuqbwzstr", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("anx", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("muvardlmzjot", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("rmuhcuhtuzlx", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("yo", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(803234002, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT72H6M3S"), model.limitSettings().timeout()); - Assertions.assertEquals(1698507772, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(2016687082, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(336030670, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("cru", model.validationData().description()); - Assertions.assertEquals("nfhoksmmcul", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(67.1284830438322D, model.validationDataSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInstanceSegmentationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInstanceSegmentationTests.java deleted file mode 100644 index fbe5cb2279dc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInstanceSegmentationTests.java +++ /dev/null @@ -1,394 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageInstanceSegmentation; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.InstanceSegmentationPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.ModelSize; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import com.azure.resourcemanager.machinelearning.models.ValidationMetricType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageInstanceSegmentationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageInstanceSegmentation model = BinaryData.fromString( - "{\"taskType\":\"ImageInstanceSegmentation\",\"primaryMetric\":\"MeanAveragePrecision\",\"modelSettings\":{\"boxDetectionsPerImage\":1534306057,\"boxScoreThreshold\":27.125877,\"imageSize\":509776627,\"maxSize\":1800994072,\"minSize\":1064698713,\"modelSize\":\"Small\",\"multiScale\":false,\"nmsIouThreshold\":73.876884,\"tileGridSize\":\"b\",\"tileOverlapRatio\":98.34619,\"tilePredictionsNmsThreshold\":49.36939,\"validationIouThreshold\":23.7808,\"validationMetricType\":\"None\",\"amsGradient\":false,\"advancedSettings\":\"qddlggbq\",\"augmentations\":\"lgzubak\",\"beta1\":52.478916,\"beta2\":73.25457,\"checkpointFrequency\":44605172,\"checkpointRunId\":\"fnsffetpkmixwew\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"s\",\"mode\":\"Download\",\"description\":\"epnqvxgvohdb\"},\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":469971245,\"earlyStoppingPatience\":1372482998,\"evaluationFrequency\":234642424,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":1882721834,\"layersToFreeze\":342131546,\"learningRate\":8.727491,\"learningRateScheduler\":\"Step\",\"modelName\":\"xqhpjhuboh\",\"momentum\":40.88772,\"nesterov\":false,\"numberOfEpochs\":1117928548,\"numberOfWorkers\":568762031,\"optimizer\":\"Sgd\",\"randomSeed\":32020513,\"stepLRGamma\":86.87302,\"stepLRStepSize\":173984136,\"trainingBatchSize\":212469610,\"validationBatchSize\":775443642,\"warmupCosineLRCycles\":4.8310876,\"warmupCosineLRWarmupEpochs\":1009329595,\"weightDecay\":38.67607},\"searchSpace\":[{\"boxDetectionsPerImage\":\"amqx\",\"boxScoreThreshold\":\"ssanybzzg\",\"imageSize\":\"dfeumyjsvcdh\",\"maxSize\":\"wkhookj\",\"minSize\":\"zxezriwgo\",\"modelSize\":\"apcqksaaapxjh\",\"multiScale\":\"tibenwsd\",\"nmsIouThreshold\":\"vdaahlfrcqklpmvz\",\"tileGridSize\":\"reszyaqgom\",\"tileOverlapRatio\":\"mfggeokfekc\",\"tilePredictionsNmsThreshold\":\"lwkyeahhh\",\"validationIouThreshold\":\"pulnrfcqufmcihp\",\"validationMetricType\":\"owrer\",\"amsGradient\":\"xptch\",\"augmentations\":\"yqqidqimlgbbfjm\",\"beta1\":\"jvxlhmpmh\",\"beta2\":\"t\",\"distributed\":\"phqeofy\",\"earlyStopping\":\"snlow\",\"earlyStoppingDelay\":\"mcqixuanccqvjf\",\"earlyStoppingPatience\":\"fqpmquxpj\",\"evaluationFrequency\":\"faar\",\"enableOnnxNormalization\":\"ci\",\"gradientAccumulationStep\":\"mufzgugrbl\",\"layersToFreeze\":\"l\",\"learningRate\":\"ssnqe\",\"learningRateScheduler\":\"otbptg\",\"modelName\":\"manxx\",\"momentum\":\"qfmdqecvtam\",\"nesterov\":\"zmnobfeww\",\"numberOfEpochs\":\"ibxovu\",\"numberOfWorkers\":\"qjrkbln\",\"optimizer\":\"clwgycv\",\"randomSeed\":\"nzjcyqqzhembtbw\",\"stepLRGamma\":\"lbadp\",\"stepLRStepSize\":\"jdleajvmvvlooubs\",\"trainingBatchSize\":\"ipjeo\",\"validationBatchSize\":\"kgocj\",\"warmupCosineLRCycles\":\"lupfazus\",\"warmupCosineLRWarmupEpochs\":\"dhuslgdwz\",\"weightDecay\":\"dqyxajclgr\"},{\"boxDetectionsPerImage\":\"vqcwyzoqzk\",\"boxScoreThreshold\":\"cwwsj\",\"imageSize\":\"iixepbntqqwwgfgs\",\"maxSize\":\"ilefej\",\"minSize\":\"wrznequ\",\"modelSize\":\"nttwk\",\"multiScale\":\"ajksbs\",\"nmsIouThreshold\":\"gjmqjhgcydijnmcv\",\"tileGridSize\":\"ssfcriqxzixtd\",\"tileOverlapRatio\":\"wmvcdkucpxpyafrw\",\"tilePredictionsNmsThreshold\":\"orogeuv\",\"validationIouThreshold\":\"rspnrsjsem\",\"validationMetricType\":\"ofrsnq\",\"amsGradient\":\"jp\",\"augmentations\":\"exutike\",\"beta1\":\"m\",\"beta2\":\"rpub\",\"distributed\":\"dhvos\",\"earlyStopping\":\"zscueza\",\"earlyStoppingDelay\":\"vdfwgqjhewcffrx\",\"earlyStoppingPatience\":\"ezkhzp\",\"evaluationFrequency\":\"qissen\",\"enableOnnxNormalization\":\"rusyzai\",\"gradientAccumulationStep\":\"psjnpck\",\"layersToFreeze\":\"ujyduonbdawsao\",\"learningRate\":\"vvm\",\"learningRateScheduler\":\"kxjarsbbdddw\",\"modelName\":\"qxa\",\"momentum\":\"xqkdyqjvzvcgrds\",\"nesterov\":\"esfkqqxuhv\",\"numberOfEpochs\":\"lbrouszxac\",\"numberOfWorkers\":\"uk\",\"optimizer\":\"goojjfuk\",\"randomSeed\":\"bc\",\"stepLRGamma\":\"nhgbtzvxxvsbc\",\"stepLRStepSize\":\"fkrfnkcni\",\"trainingBatchSize\":\"swxmfurqm\",\"validationBatchSize\":\"wwp\",\"warmupCosineLRCycles\":\"um\",\"warmupCosineLRWarmupEpochs\":\"ahbqsvnkxm\",\"weightDecay\":\"zuae\"}],\"limitSettings\":{\"maxTrials\":1864326135,\"timeout\":\"PT127H34M59S\",\"maxConcurrentTrials\":645713420},\"sweepSettings\":{\"samplingAlgorithm\":\"Grid\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":1109486386,\"delayEvaluation\":682993372}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"zzmiemqyft\",\"mode\":\"EvalDownload\",\"description\":\"sw\"},\"validationDataSize\":7.272261053343065,\"logVerbosity\":\"Warning\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"ghpakbqyhlsorn\",\"mode\":\"EvalDownload\",\"description\":\"qagkncjmybn\"},\"targetColumnName\":\"vztnjawrhulemm\"}") - .toObject(ImageInstanceSegmentation.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("qagkncjmybn", model.trainingData().description()); - Assertions.assertEquals("ghpakbqyhlsorn", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("vztnjawrhulemm", model.targetColumnName()); - Assertions.assertEquals(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("qddlggbq", model.modelSettings().advancedSettings()); - Assertions.assertEquals("lgzubak", model.modelSettings().augmentations()); - Assertions.assertEquals(52.478916F, model.modelSettings().beta1()); - Assertions.assertEquals(73.25457F, model.modelSettings().beta2()); - Assertions.assertEquals(44605172, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("fnsffetpkmixwew", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("epnqvxgvohdb", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("s", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(469971245, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1372482998, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(234642424, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1882721834, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(342131546, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(8.727491F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("xqhpjhuboh", model.modelSettings().modelName()); - Assertions.assertEquals(40.88772F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1117928548, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(568762031, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.SGD, model.modelSettings().optimizer()); - Assertions.assertEquals(32020513, model.modelSettings().randomSeed()); - Assertions.assertEquals(86.87302F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(173984136, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(212469610, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(775443642, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(4.8310876F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1009329595, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(38.67607F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1534306057, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(27.125877F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(509776627, model.modelSettings().imageSize()); - Assertions.assertEquals(1800994072, model.modelSettings().maxSize()); - Assertions.assertEquals(1064698713, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.SMALL, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(73.876884F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("b", model.modelSettings().tileGridSize()); - Assertions.assertEquals(98.34619F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(49.36939F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(23.7808F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.NONE, model.modelSettings().validationMetricType()); - Assertions.assertEquals("xptch", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("yqqidqimlgbbfjm", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("jvxlhmpmh", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("t", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("phqeofy", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("snlow", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("mcqixuanccqvjf", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("fqpmquxpj", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("faar", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("ci", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("mufzgugrbl", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("l", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("ssnqe", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("otbptg", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("manxx", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("qfmdqecvtam", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("zmnobfeww", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ibxovu", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("qjrkbln", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("clwgycv", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("nzjcyqqzhembtbw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("lbadp", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("jdleajvmvvlooubs", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("ipjeo", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("kgocj", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("lupfazus", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("dhuslgdwz", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("dqyxajclgr", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("amqx", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("ssanybzzg", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("dfeumyjsvcdh", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("wkhookj", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("zxezriwgo", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("apcqksaaapxjh", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("tibenwsd", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("vdaahlfrcqklpmvz", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("reszyaqgom", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("mfggeokfekc", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("lwkyeahhh", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("pulnrfcqufmcihp", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("owrer", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(1864326135, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT127H34M59S"), model.limitSettings().timeout()); - Assertions.assertEquals(645713420, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1109486386, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(682993372, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("sw", model.validationData().description()); - Assertions.assertEquals("zzmiemqyft", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(7.272261053343065D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageInstanceSegmentation model = new ImageInstanceSegmentation().withLogVerbosity(LogVerbosity.WARNING) - .withTrainingData(new MLTableJobInput().withDescription("qagkncjmybn") - .withUri("ghpakbqyhlsorn") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withTargetColumnName("vztnjawrhulemm") - .withPrimaryMetric(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION) - .withModelSettings(new ImageModelSettingsObjectDetection().withAmsGradient(false) - .withAdvancedSettings("qddlggbq") - .withAugmentations("lgzubak") - .withBeta1(52.478916F) - .withBeta2(73.25457F) - .withCheckpointFrequency(44605172) - .withCheckpointRunId("fnsffetpkmixwew") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("epnqvxgvohdb") - .withUri("s") - .withMode(InputDeliveryMode.DOWNLOAD)) - .withDistributed(true) - .withEarlyStopping(false) - .withEarlyStoppingDelay(469971245) - .withEarlyStoppingPatience(1372482998) - .withEvaluationFrequency(234642424) - .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(1882721834) - .withLayersToFreeze(342131546) - .withLearningRate(8.727491F) - .withLearningRateScheduler(LearningRateScheduler.STEP) - .withModelName("xqhpjhuboh") - .withMomentum(40.88772F) - .withNesterov(false) - .withNumberOfEpochs(1117928548) - .withNumberOfWorkers(568762031) - .withOptimizer(StochasticOptimizer.SGD) - .withRandomSeed(32020513) - .withStepLRGamma(86.87302F) - .withStepLRStepSize(173984136) - .withTrainingBatchSize(212469610) - .withValidationBatchSize(775443642) - .withWarmupCosineLRCycles(4.8310876F) - .withWarmupCosineLRWarmupEpochs(1009329595) - .withWeightDecay(38.67607F) - .withBoxDetectionsPerImage(1534306057) - .withBoxScoreThreshold(27.125877F) - .withImageSize(509776627) - .withMaxSize(1800994072) - .withMinSize(1064698713) - .withModelSize(ModelSize.SMALL) - .withMultiScale(false) - .withNmsIouThreshold(73.876884F) - .withTileGridSize("b") - .withTileOverlapRatio(98.34619F) - .withTilePredictionsNmsThreshold(49.36939F) - .withValidationIouThreshold(23.7808F) - .withValidationMetricType(ValidationMetricType.NONE)) - .withSearchSpace(Arrays.asList( - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("xptch") - .withAugmentations("yqqidqimlgbbfjm") - .withBeta1("jvxlhmpmh") - .withBeta2("t") - .withDistributed("phqeofy") - .withEarlyStopping("snlow") - .withEarlyStoppingDelay("mcqixuanccqvjf") - .withEarlyStoppingPatience("fqpmquxpj") - .withEvaluationFrequency("faar") - .withEnableOnnxNormalization("ci") - .withGradientAccumulationStep("mufzgugrbl") - .withLayersToFreeze("l") - .withLearningRate("ssnqe") - .withLearningRateScheduler("otbptg") - .withModelName("manxx") - .withMomentum("qfmdqecvtam") - .withNesterov("zmnobfeww") - .withNumberOfEpochs("ibxovu") - .withNumberOfWorkers("qjrkbln") - .withOptimizer("clwgycv") - .withRandomSeed("nzjcyqqzhembtbw") - .withStepLRGamma("lbadp") - .withStepLRStepSize("jdleajvmvvlooubs") - .withTrainingBatchSize("ipjeo") - .withValidationBatchSize("kgocj") - .withWarmupCosineLRCycles("lupfazus") - .withWarmupCosineLRWarmupEpochs("dhuslgdwz") - .withWeightDecay("dqyxajclgr") - .withBoxDetectionsPerImage("amqx") - .withBoxScoreThreshold("ssanybzzg") - .withImageSize("dfeumyjsvcdh") - .withMaxSize("wkhookj") - .withMinSize("zxezriwgo") - .withModelSize("apcqksaaapxjh") - .withMultiScale("tibenwsd") - .withNmsIouThreshold("vdaahlfrcqklpmvz") - .withTileGridSize("reszyaqgom") - .withTileOverlapRatio("mfggeokfekc") - .withTilePredictionsNmsThreshold("lwkyeahhh") - .withValidationIouThreshold("pulnrfcqufmcihp") - .withValidationMetricType("owrer"), - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("jp") - .withAugmentations("exutike") - .withBeta1("m") - .withBeta2("rpub") - .withDistributed("dhvos") - .withEarlyStopping("zscueza") - .withEarlyStoppingDelay("vdfwgqjhewcffrx") - .withEarlyStoppingPatience("ezkhzp") - .withEvaluationFrequency("qissen") - .withEnableOnnxNormalization("rusyzai") - .withGradientAccumulationStep("psjnpck") - .withLayersToFreeze("ujyduonbdawsao") - .withLearningRate("vvm") - .withLearningRateScheduler("kxjarsbbdddw") - .withModelName("qxa") - .withMomentum("xqkdyqjvzvcgrds") - .withNesterov("esfkqqxuhv") - .withNumberOfEpochs("lbrouszxac") - .withNumberOfWorkers("uk") - .withOptimizer("goojjfuk") - .withRandomSeed("bc") - .withStepLRGamma("nhgbtzvxxvsbc") - .withStepLRStepSize("fkrfnkcni") - .withTrainingBatchSize("swxmfurqm") - .withValidationBatchSize("wwp") - .withWarmupCosineLRCycles("um") - .withWarmupCosineLRWarmupEpochs("ahbqsvnkxm") - .withWeightDecay("zuae") - .withBoxDetectionsPerImage("vqcwyzoqzk") - .withBoxScoreThreshold("cwwsj") - .withImageSize("iixepbntqqwwgfgs") - .withMaxSize("ilefej") - .withMinSize("wrznequ") - .withModelSize("nttwk") - .withMultiScale("ajksbs") - .withNmsIouThreshold("gjmqjhgcydijnmcv") - .withTileGridSize("ssfcriqxzixtd") - .withTileOverlapRatio("wmvcdkucpxpyafrw") - .withTilePredictionsNmsThreshold("orogeuv") - .withValidationIouThreshold("rspnrsjsem") - .withValidationMetricType("ofrsnq"))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(1864326135) - .withTimeout(Duration.parse("PT127H34M59S")) - .withMaxConcurrentTrials(645713420)) - .withSweepSettings(new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.GRID) - .withEarlyTermination( - new EarlyTerminationPolicy().withEvaluationInterval(1109486386).withDelayEvaluation(682993372))) - .withValidationData(new MLTableJobInput().withDescription("sw") - .withUri("zzmiemqyft") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withValidationDataSize(7.272261053343065D); - model = BinaryData.fromObject(model).toObject(ImageInstanceSegmentation.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("qagkncjmybn", model.trainingData().description()); - Assertions.assertEquals("ghpakbqyhlsorn", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("vztnjawrhulemm", model.targetColumnName()); - Assertions.assertEquals(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("qddlggbq", model.modelSettings().advancedSettings()); - Assertions.assertEquals("lgzubak", model.modelSettings().augmentations()); - Assertions.assertEquals(52.478916F, model.modelSettings().beta1()); - Assertions.assertEquals(73.25457F, model.modelSettings().beta2()); - Assertions.assertEquals(44605172, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("fnsffetpkmixwew", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("epnqvxgvohdb", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("s", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(469971245, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1372482998, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(234642424, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1882721834, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(342131546, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(8.727491F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("xqhpjhuboh", model.modelSettings().modelName()); - Assertions.assertEquals(40.88772F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1117928548, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(568762031, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.SGD, model.modelSettings().optimizer()); - Assertions.assertEquals(32020513, model.modelSettings().randomSeed()); - Assertions.assertEquals(86.87302F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(173984136, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(212469610, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(775443642, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(4.8310876F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1009329595, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(38.67607F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1534306057, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(27.125877F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(509776627, model.modelSettings().imageSize()); - Assertions.assertEquals(1800994072, model.modelSettings().maxSize()); - Assertions.assertEquals(1064698713, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.SMALL, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(73.876884F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("b", model.modelSettings().tileGridSize()); - Assertions.assertEquals(98.34619F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(49.36939F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(23.7808F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.NONE, model.modelSettings().validationMetricType()); - Assertions.assertEquals("xptch", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("yqqidqimlgbbfjm", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("jvxlhmpmh", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("t", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("phqeofy", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("snlow", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("mcqixuanccqvjf", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("fqpmquxpj", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("faar", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("ci", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("mufzgugrbl", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("l", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("ssnqe", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("otbptg", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("manxx", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("qfmdqecvtam", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("zmnobfeww", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ibxovu", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("qjrkbln", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("clwgycv", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("nzjcyqqzhembtbw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("lbadp", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("jdleajvmvvlooubs", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("ipjeo", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("kgocj", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("lupfazus", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("dhuslgdwz", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("dqyxajclgr", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("amqx", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("ssanybzzg", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("dfeumyjsvcdh", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("wkhookj", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("zxezriwgo", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("apcqksaaapxjh", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("tibenwsd", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("vdaahlfrcqklpmvz", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("reszyaqgom", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("mfggeokfekc", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("lwkyeahhh", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("pulnrfcqufmcihp", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("owrer", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(1864326135, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT127H34M59S"), model.limitSettings().timeout()); - Assertions.assertEquals(645713420, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1109486386, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(682993372, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("sw", model.validationData().description()); - Assertions.assertEquals("zzmiemqyft", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(7.272261053343065D, model.validationDataSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageLimitSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageLimitSettingsTests.java deleted file mode 100644 index 93834ce195f4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageLimitSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ImageLimitSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageLimitSettings model = BinaryData - .fromString("{\"maxTrials\":1226753892,\"timeout\":\"PT148H19M11S\",\"maxConcurrentTrials\":1388239886}") - .toObject(ImageLimitSettings.class); - Assertions.assertEquals(1226753892, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT148H19M11S"), model.timeout()); - Assertions.assertEquals(1388239886, model.maxConcurrentTrials()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageLimitSettings model = new ImageLimitSettings().withMaxTrials(1226753892) - .withTimeout(Duration.parse("PT148H19M11S")) - .withMaxConcurrentTrials(1388239886); - model = BinaryData.fromObject(model).toObject(ImageLimitSettings.class); - Assertions.assertEquals(1226753892, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT148H19M11S"), model.timeout()); - Assertions.assertEquals(1388239886, model.maxConcurrentTrials()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageMetadataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageMetadataTests.java deleted file mode 100644 index b9ad759562c4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageMetadataTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageMetadata; -import org.junit.jupiter.api.Assertions; - -public final class ImageMetadataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageMetadata model = BinaryData.fromString( - "{\"currentImageVersion\":\"alahovuuwxhm\",\"latestImageVersion\":\"jnhj\",\"isLatestOsImageVersion\":false}") - .toObject(ImageMetadata.class); - Assertions.assertEquals("alahovuuwxhm", model.currentImageVersion()); - Assertions.assertEquals("jnhj", model.latestImageVersion()); - Assertions.assertEquals(false, model.isLatestOsImageVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageMetadata model = new ImageMetadata().withCurrentImageVersion("alahovuuwxhm") - .withLatestImageVersion("jnhj") - .withIsLatestOsImageVersion(false); - model = BinaryData.fromObject(model).toObject(ImageMetadata.class); - Assertions.assertEquals("alahovuuwxhm", model.currentImageVersion()); - Assertions.assertEquals("jnhj", model.latestImageVersion()); - Assertions.assertEquals(false, model.isLatestOsImageVersion()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsClassificationTests.java deleted file mode 100644 index e09043459cf1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsClassificationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelDistributionSettingsClassificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelDistributionSettingsClassification model = BinaryData.fromString( - "{\"trainingCropSize\":\"xmmqmt\",\"validationCropSize\":\"ky\",\"validationResizeSize\":\"exwdonbexf\",\"weightedLoss\":\"daubheeggzgr\",\"amsGradient\":\"tlfozuumrtgjqgac\",\"augmentations\":\"tnsyxzxjm\",\"beta1\":\"nb\",\"beta2\":\"azofm\",\"distributed\":\"vtemaspmanydscdk\",\"earlyStopping\":\"dpwjcbhaahntof\",\"earlyStoppingDelay\":\"fh\",\"earlyStoppingPatience\":\"ixo\",\"evaluationFrequency\":\"kzdfiv\",\"enableOnnxNormalization\":\"jybsrwz\",\"gradientAccumulationStep\":\"rgt\",\"layersToFreeze\":\"hmfppinmgi\",\"learningRate\":\"smkw\",\"learningRateScheduler\":\"gfragjhxerxlobkd\",\"modelName\":\"qhvmmniiqy\",\"momentum\":\"lhjnskbggicnqwl\",\"nesterov\":\"m\",\"numberOfEpochs\":\"blxk\",\"numberOfWorkers\":\"qgvxrktjcjigcw\",\"optimizer\":\"panbqxasevc\",\"randomSeed\":\"fp\",\"stepLRGamma\":\"edyybruholaemwcg\",\"stepLRStepSize\":\"mrimaabsqql\",\"trainingBatchSize\":\"b\",\"validationBatchSize\":\"ow\",\"warmupCosineLRCycles\":\"hdkmbjsmihrijezb\",\"warmupCosineLRWarmupEpochs\":\"jwfcz\",\"weightDecay\":\"kvb\"}") - .toObject(ImageModelDistributionSettingsClassification.class); - Assertions.assertEquals("tlfozuumrtgjqgac", model.amsGradient()); - Assertions.assertEquals("tnsyxzxjm", model.augmentations()); - Assertions.assertEquals("nb", model.beta1()); - Assertions.assertEquals("azofm", model.beta2()); - Assertions.assertEquals("vtemaspmanydscdk", model.distributed()); - Assertions.assertEquals("dpwjcbhaahntof", model.earlyStopping()); - Assertions.assertEquals("fh", model.earlyStoppingDelay()); - Assertions.assertEquals("ixo", model.earlyStoppingPatience()); - Assertions.assertEquals("kzdfiv", model.evaluationFrequency()); - Assertions.assertEquals("jybsrwz", model.enableOnnxNormalization()); - Assertions.assertEquals("rgt", model.gradientAccumulationStep()); - Assertions.assertEquals("hmfppinmgi", model.layersToFreeze()); - Assertions.assertEquals("smkw", model.learningRate()); - Assertions.assertEquals("gfragjhxerxlobkd", model.learningRateScheduler()); - Assertions.assertEquals("qhvmmniiqy", model.modelName()); - Assertions.assertEquals("lhjnskbggicnqwl", model.momentum()); - Assertions.assertEquals("m", model.nesterov()); - Assertions.assertEquals("blxk", model.numberOfEpochs()); - Assertions.assertEquals("qgvxrktjcjigcw", model.numberOfWorkers()); - Assertions.assertEquals("panbqxasevc", model.optimizer()); - Assertions.assertEquals("fp", model.randomSeed()); - Assertions.assertEquals("edyybruholaemwcg", model.stepLRGamma()); - Assertions.assertEquals("mrimaabsqql", model.stepLRStepSize()); - Assertions.assertEquals("b", model.trainingBatchSize()); - Assertions.assertEquals("ow", model.validationBatchSize()); - Assertions.assertEquals("hdkmbjsmihrijezb", model.warmupCosineLRCycles()); - Assertions.assertEquals("jwfcz", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("kvb", model.weightDecay()); - Assertions.assertEquals("xmmqmt", model.trainingCropSize()); - Assertions.assertEquals("ky", model.validationCropSize()); - Assertions.assertEquals("exwdonbexf", model.validationResizeSize()); - Assertions.assertEquals("daubheeggzgr", model.weightedLoss()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelDistributionSettingsClassification model - = new ImageModelDistributionSettingsClassification().withAmsGradient("tlfozuumrtgjqgac") - .withAugmentations("tnsyxzxjm") - .withBeta1("nb") - .withBeta2("azofm") - .withDistributed("vtemaspmanydscdk") - .withEarlyStopping("dpwjcbhaahntof") - .withEarlyStoppingDelay("fh") - .withEarlyStoppingPatience("ixo") - .withEvaluationFrequency("kzdfiv") - .withEnableOnnxNormalization("jybsrwz") - .withGradientAccumulationStep("rgt") - .withLayersToFreeze("hmfppinmgi") - .withLearningRate("smkw") - .withLearningRateScheduler("gfragjhxerxlobkd") - .withModelName("qhvmmniiqy") - .withMomentum("lhjnskbggicnqwl") - .withNesterov("m") - .withNumberOfEpochs("blxk") - .withNumberOfWorkers("qgvxrktjcjigcw") - .withOptimizer("panbqxasevc") - .withRandomSeed("fp") - .withStepLRGamma("edyybruholaemwcg") - .withStepLRStepSize("mrimaabsqql") - .withTrainingBatchSize("b") - .withValidationBatchSize("ow") - .withWarmupCosineLRCycles("hdkmbjsmihrijezb") - .withWarmupCosineLRWarmupEpochs("jwfcz") - .withWeightDecay("kvb") - .withTrainingCropSize("xmmqmt") - .withValidationCropSize("ky") - .withValidationResizeSize("exwdonbexf") - .withWeightedLoss("daubheeggzgr"); - model = BinaryData.fromObject(model).toObject(ImageModelDistributionSettingsClassification.class); - Assertions.assertEquals("tlfozuumrtgjqgac", model.amsGradient()); - Assertions.assertEquals("tnsyxzxjm", model.augmentations()); - Assertions.assertEquals("nb", model.beta1()); - Assertions.assertEquals("azofm", model.beta2()); - Assertions.assertEquals("vtemaspmanydscdk", model.distributed()); - Assertions.assertEquals("dpwjcbhaahntof", model.earlyStopping()); - Assertions.assertEquals("fh", model.earlyStoppingDelay()); - Assertions.assertEquals("ixo", model.earlyStoppingPatience()); - Assertions.assertEquals("kzdfiv", model.evaluationFrequency()); - Assertions.assertEquals("jybsrwz", model.enableOnnxNormalization()); - Assertions.assertEquals("rgt", model.gradientAccumulationStep()); - Assertions.assertEquals("hmfppinmgi", model.layersToFreeze()); - Assertions.assertEquals("smkw", model.learningRate()); - Assertions.assertEquals("gfragjhxerxlobkd", model.learningRateScheduler()); - Assertions.assertEquals("qhvmmniiqy", model.modelName()); - Assertions.assertEquals("lhjnskbggicnqwl", model.momentum()); - Assertions.assertEquals("m", model.nesterov()); - Assertions.assertEquals("blxk", model.numberOfEpochs()); - Assertions.assertEquals("qgvxrktjcjigcw", model.numberOfWorkers()); - Assertions.assertEquals("panbqxasevc", model.optimizer()); - Assertions.assertEquals("fp", model.randomSeed()); - Assertions.assertEquals("edyybruholaemwcg", model.stepLRGamma()); - Assertions.assertEquals("mrimaabsqql", model.stepLRStepSize()); - Assertions.assertEquals("b", model.trainingBatchSize()); - Assertions.assertEquals("ow", model.validationBatchSize()); - Assertions.assertEquals("hdkmbjsmihrijezb", model.warmupCosineLRCycles()); - Assertions.assertEquals("jwfcz", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("kvb", model.weightDecay()); - Assertions.assertEquals("xmmqmt", model.trainingCropSize()); - Assertions.assertEquals("ky", model.validationCropSize()); - Assertions.assertEquals("exwdonbexf", model.validationResizeSize()); - Assertions.assertEquals("daubheeggzgr", model.weightedLoss()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsObjectDetectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsObjectDetectionTests.java deleted file mode 100644 index 6ade9f3cb8cb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsObjectDetectionTests.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelDistributionSettingsObjectDetectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelDistributionSettingsObjectDetection model = BinaryData.fromString( - "{\"boxDetectionsPerImage\":\"wkkfzzetl\",\"boxScoreThreshold\":\"dyxzlvwywjvr\",\"imageSize\":\"qpwwlzpddarc\",\"maxSize\":\"dwhslxebaj\",\"minSize\":\"knmstbdoprwkamp\",\"modelSize\":\"wpbldz\",\"multiScale\":\"udrcycm\",\"nmsIouThreshold\":\"uzymhlhihqknlv\",\"tileGridSize\":\"n\",\"tileOverlapRatio\":\"kopaiildcp\",\"tilePredictionsNmsThreshold\":\"khquxsy\",\"validationIouThreshold\":\"fpgvedrobujnjgyb\",\"validationMetricType\":\"mqx\",\"amsGradient\":\"idullnjgcpskg\",\"augmentations\":\"nytslgsazuqznghx\",\"beta1\":\"yqz\",\"beta2\":\"dkpvnrvzw\",\"distributed\":\"fxsfybntmveho\",\"earlyStopping\":\"lyuvbgtzqzqwe\",\"earlyStoppingDelay\":\"dybnairvhpqsvb\",\"earlyStoppingPatience\":\"ogeatrcnqnvn\",\"evaluationFrequency\":\"rfcs\",\"enableOnnxNormalization\":\"jnkoiz\",\"gradientAccumulationStep\":\"sqbibaa\",\"layersToFreeze\":\"icovj\",\"learningRate\":\"vwrmjx\",\"learningRateScheduler\":\"uod\",\"modelName\":\"czbassqfyylwpp\",\"momentum\":\"gkbzbloas\",\"nesterov\":\"xhqvovdpmht\",\"numberOfEpochs\":\"vsqjs\",\"numberOfWorkers\":\"jnqtaqg\",\"optimizer\":\"bfkceincnrecj\",\"randomSeed\":\"ywevsfgdrmnszdo\",\"stepLRGamma\":\"j\",\"stepLRStepSize\":\"svz\",\"trainingBatchSize\":\"xtcwgh\",\"validationBatchSize\":\"aevhgsulwvg\",\"warmupCosineLRCycles\":\"ufigvfjjuzki\",\"warmupCosineLRWarmupEpochs\":\"ciwuhyzekypy\",\"weightDecay\":\"ljlbzdlby\"}") - .toObject(ImageModelDistributionSettingsObjectDetection.class); - Assertions.assertEquals("idullnjgcpskg", model.amsGradient()); - Assertions.assertEquals("nytslgsazuqznghx", model.augmentations()); - Assertions.assertEquals("yqz", model.beta1()); - Assertions.assertEquals("dkpvnrvzw", model.beta2()); - Assertions.assertEquals("fxsfybntmveho", model.distributed()); - Assertions.assertEquals("lyuvbgtzqzqwe", model.earlyStopping()); - Assertions.assertEquals("dybnairvhpqsvb", model.earlyStoppingDelay()); - Assertions.assertEquals("ogeatrcnqnvn", model.earlyStoppingPatience()); - Assertions.assertEquals("rfcs", model.evaluationFrequency()); - Assertions.assertEquals("jnkoiz", model.enableOnnxNormalization()); - Assertions.assertEquals("sqbibaa", model.gradientAccumulationStep()); - Assertions.assertEquals("icovj", model.layersToFreeze()); - Assertions.assertEquals("vwrmjx", model.learningRate()); - Assertions.assertEquals("uod", model.learningRateScheduler()); - Assertions.assertEquals("czbassqfyylwpp", model.modelName()); - Assertions.assertEquals("gkbzbloas", model.momentum()); - Assertions.assertEquals("xhqvovdpmht", model.nesterov()); - Assertions.assertEquals("vsqjs", model.numberOfEpochs()); - Assertions.assertEquals("jnqtaqg", model.numberOfWorkers()); - Assertions.assertEquals("bfkceincnrecj", model.optimizer()); - Assertions.assertEquals("ywevsfgdrmnszdo", model.randomSeed()); - Assertions.assertEquals("j", model.stepLRGamma()); - Assertions.assertEquals("svz", model.stepLRStepSize()); - Assertions.assertEquals("xtcwgh", model.trainingBatchSize()); - Assertions.assertEquals("aevhgsulwvg", model.validationBatchSize()); - Assertions.assertEquals("ufigvfjjuzki", model.warmupCosineLRCycles()); - Assertions.assertEquals("ciwuhyzekypy", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("ljlbzdlby", model.weightDecay()); - Assertions.assertEquals("wkkfzzetl", model.boxDetectionsPerImage()); - Assertions.assertEquals("dyxzlvwywjvr", model.boxScoreThreshold()); - Assertions.assertEquals("qpwwlzpddarc", model.imageSize()); - Assertions.assertEquals("dwhslxebaj", model.maxSize()); - Assertions.assertEquals("knmstbdoprwkamp", model.minSize()); - Assertions.assertEquals("wpbldz", model.modelSize()); - Assertions.assertEquals("udrcycm", model.multiScale()); - Assertions.assertEquals("uzymhlhihqknlv", model.nmsIouThreshold()); - Assertions.assertEquals("n", model.tileGridSize()); - Assertions.assertEquals("kopaiildcp", model.tileOverlapRatio()); - Assertions.assertEquals("khquxsy", model.tilePredictionsNmsThreshold()); - Assertions.assertEquals("fpgvedrobujnjgyb", model.validationIouThreshold()); - Assertions.assertEquals("mqx", model.validationMetricType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelDistributionSettingsObjectDetection model - = new ImageModelDistributionSettingsObjectDetection().withAmsGradient("idullnjgcpskg") - .withAugmentations("nytslgsazuqznghx") - .withBeta1("yqz") - .withBeta2("dkpvnrvzw") - .withDistributed("fxsfybntmveho") - .withEarlyStopping("lyuvbgtzqzqwe") - .withEarlyStoppingDelay("dybnairvhpqsvb") - .withEarlyStoppingPatience("ogeatrcnqnvn") - .withEvaluationFrequency("rfcs") - .withEnableOnnxNormalization("jnkoiz") - .withGradientAccumulationStep("sqbibaa") - .withLayersToFreeze("icovj") - .withLearningRate("vwrmjx") - .withLearningRateScheduler("uod") - .withModelName("czbassqfyylwpp") - .withMomentum("gkbzbloas") - .withNesterov("xhqvovdpmht") - .withNumberOfEpochs("vsqjs") - .withNumberOfWorkers("jnqtaqg") - .withOptimizer("bfkceincnrecj") - .withRandomSeed("ywevsfgdrmnszdo") - .withStepLRGamma("j") - .withStepLRStepSize("svz") - .withTrainingBatchSize("xtcwgh") - .withValidationBatchSize("aevhgsulwvg") - .withWarmupCosineLRCycles("ufigvfjjuzki") - .withWarmupCosineLRWarmupEpochs("ciwuhyzekypy") - .withWeightDecay("ljlbzdlby") - .withBoxDetectionsPerImage("wkkfzzetl") - .withBoxScoreThreshold("dyxzlvwywjvr") - .withImageSize("qpwwlzpddarc") - .withMaxSize("dwhslxebaj") - .withMinSize("knmstbdoprwkamp") - .withModelSize("wpbldz") - .withMultiScale("udrcycm") - .withNmsIouThreshold("uzymhlhihqknlv") - .withTileGridSize("n") - .withTileOverlapRatio("kopaiildcp") - .withTilePredictionsNmsThreshold("khquxsy") - .withValidationIouThreshold("fpgvedrobujnjgyb") - .withValidationMetricType("mqx"); - model = BinaryData.fromObject(model).toObject(ImageModelDistributionSettingsObjectDetection.class); - Assertions.assertEquals("idullnjgcpskg", model.amsGradient()); - Assertions.assertEquals("nytslgsazuqznghx", model.augmentations()); - Assertions.assertEquals("yqz", model.beta1()); - Assertions.assertEquals("dkpvnrvzw", model.beta2()); - Assertions.assertEquals("fxsfybntmveho", model.distributed()); - Assertions.assertEquals("lyuvbgtzqzqwe", model.earlyStopping()); - Assertions.assertEquals("dybnairvhpqsvb", model.earlyStoppingDelay()); - Assertions.assertEquals("ogeatrcnqnvn", model.earlyStoppingPatience()); - Assertions.assertEquals("rfcs", model.evaluationFrequency()); - Assertions.assertEquals("jnkoiz", model.enableOnnxNormalization()); - Assertions.assertEquals("sqbibaa", model.gradientAccumulationStep()); - Assertions.assertEquals("icovj", model.layersToFreeze()); - Assertions.assertEquals("vwrmjx", model.learningRate()); - Assertions.assertEquals("uod", model.learningRateScheduler()); - Assertions.assertEquals("czbassqfyylwpp", model.modelName()); - Assertions.assertEquals("gkbzbloas", model.momentum()); - Assertions.assertEquals("xhqvovdpmht", model.nesterov()); - Assertions.assertEquals("vsqjs", model.numberOfEpochs()); - Assertions.assertEquals("jnqtaqg", model.numberOfWorkers()); - Assertions.assertEquals("bfkceincnrecj", model.optimizer()); - Assertions.assertEquals("ywevsfgdrmnszdo", model.randomSeed()); - Assertions.assertEquals("j", model.stepLRGamma()); - Assertions.assertEquals("svz", model.stepLRStepSize()); - Assertions.assertEquals("xtcwgh", model.trainingBatchSize()); - Assertions.assertEquals("aevhgsulwvg", model.validationBatchSize()); - Assertions.assertEquals("ufigvfjjuzki", model.warmupCosineLRCycles()); - Assertions.assertEquals("ciwuhyzekypy", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("ljlbzdlby", model.weightDecay()); - Assertions.assertEquals("wkkfzzetl", model.boxDetectionsPerImage()); - Assertions.assertEquals("dyxzlvwywjvr", model.boxScoreThreshold()); - Assertions.assertEquals("qpwwlzpddarc", model.imageSize()); - Assertions.assertEquals("dwhslxebaj", model.maxSize()); - Assertions.assertEquals("knmstbdoprwkamp", model.minSize()); - Assertions.assertEquals("wpbldz", model.modelSize()); - Assertions.assertEquals("udrcycm", model.multiScale()); - Assertions.assertEquals("uzymhlhihqknlv", model.nmsIouThreshold()); - Assertions.assertEquals("n", model.tileGridSize()); - Assertions.assertEquals("kopaiildcp", model.tileOverlapRatio()); - Assertions.assertEquals("khquxsy", model.tilePredictionsNmsThreshold()); - Assertions.assertEquals("fpgvedrobujnjgyb", model.validationIouThreshold()); - Assertions.assertEquals("mqx", model.validationMetricType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsTests.java deleted file mode 100644 index 657137ce3ad8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettings; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelDistributionSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelDistributionSettings model = BinaryData.fromString( - "{\"amsGradient\":\"kbsvbwy\",\"augmentations\":\"ygnbknhjgclxaxwc\",\"beta1\":\"asp\",\"beta2\":\"zkucszghdoaqipmn\",\"distributed\":\"lfrsbzrnmuv\",\"earlyStopping\":\"pu\",\"earlyStoppingDelay\":\"ddtbfmekjcnginxd\",\"earlyStoppingPatience\":\"aoy\",\"evaluationFrequency\":\"fvgyxzmxynofxl\",\"enableOnnxNormalization\":\"xoqxtdnzujsj\",\"gradientAccumulationStep\":\"krpskcjhmm\",\"layersToFreeze\":\"bnivdqtkykp\",\"learningRate\":\"nlsfgnyscac\",\"learningRateScheduler\":\"tbzetxyg\",\"modelName\":\"iceecvjwy\",\"momentum\":\"eoxmpzzw\",\"nesterov\":\"drdvha\",\"numberOfEpochs\":\"kx\",\"numberOfWorkers\":\"vz\",\"optimizer\":\"xmbrygmwibiosiq\",\"randomSeed\":\"kqfdqwdrtx\",\"stepLRGamma\":\"daglmrcok\",\"stepLRStepSize\":\"ert\",\"trainingBatchSize\":\"unzsiywhubym\",\"validationBatchSize\":\"opikzebqnnfywtkq\",\"warmupCosineLRCycles\":\"sdlkhcz\",\"warmupCosineLRWarmupEpochs\":\"pmgfjculojhhylx\",\"weightDecay\":\"vfiyymot\"}") - .toObject(ImageModelDistributionSettings.class); - Assertions.assertEquals("kbsvbwy", model.amsGradient()); - Assertions.assertEquals("ygnbknhjgclxaxwc", model.augmentations()); - Assertions.assertEquals("asp", model.beta1()); - Assertions.assertEquals("zkucszghdoaqipmn", model.beta2()); - Assertions.assertEquals("lfrsbzrnmuv", model.distributed()); - Assertions.assertEquals("pu", model.earlyStopping()); - Assertions.assertEquals("ddtbfmekjcnginxd", model.earlyStoppingDelay()); - Assertions.assertEquals("aoy", model.earlyStoppingPatience()); - Assertions.assertEquals("fvgyxzmxynofxl", model.evaluationFrequency()); - Assertions.assertEquals("xoqxtdnzujsj", model.enableOnnxNormalization()); - Assertions.assertEquals("krpskcjhmm", model.gradientAccumulationStep()); - Assertions.assertEquals("bnivdqtkykp", model.layersToFreeze()); - Assertions.assertEquals("nlsfgnyscac", model.learningRate()); - Assertions.assertEquals("tbzetxyg", model.learningRateScheduler()); - Assertions.assertEquals("iceecvjwy", model.modelName()); - Assertions.assertEquals("eoxmpzzw", model.momentum()); - Assertions.assertEquals("drdvha", model.nesterov()); - Assertions.assertEquals("kx", model.numberOfEpochs()); - Assertions.assertEquals("vz", model.numberOfWorkers()); - Assertions.assertEquals("xmbrygmwibiosiq", model.optimizer()); - Assertions.assertEquals("kqfdqwdrtx", model.randomSeed()); - Assertions.assertEquals("daglmrcok", model.stepLRGamma()); - Assertions.assertEquals("ert", model.stepLRStepSize()); - Assertions.assertEquals("unzsiywhubym", model.trainingBatchSize()); - Assertions.assertEquals("opikzebqnnfywtkq", model.validationBatchSize()); - Assertions.assertEquals("sdlkhcz", model.warmupCosineLRCycles()); - Assertions.assertEquals("pmgfjculojhhylx", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("vfiyymot", model.weightDecay()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelDistributionSettings model = new ImageModelDistributionSettings().withAmsGradient("kbsvbwy") - .withAugmentations("ygnbknhjgclxaxwc") - .withBeta1("asp") - .withBeta2("zkucszghdoaqipmn") - .withDistributed("lfrsbzrnmuv") - .withEarlyStopping("pu") - .withEarlyStoppingDelay("ddtbfmekjcnginxd") - .withEarlyStoppingPatience("aoy") - .withEvaluationFrequency("fvgyxzmxynofxl") - .withEnableOnnxNormalization("xoqxtdnzujsj") - .withGradientAccumulationStep("krpskcjhmm") - .withLayersToFreeze("bnivdqtkykp") - .withLearningRate("nlsfgnyscac") - .withLearningRateScheduler("tbzetxyg") - .withModelName("iceecvjwy") - .withMomentum("eoxmpzzw") - .withNesterov("drdvha") - .withNumberOfEpochs("kx") - .withNumberOfWorkers("vz") - .withOptimizer("xmbrygmwibiosiq") - .withRandomSeed("kqfdqwdrtx") - .withStepLRGamma("daglmrcok") - .withStepLRStepSize("ert") - .withTrainingBatchSize("unzsiywhubym") - .withValidationBatchSize("opikzebqnnfywtkq") - .withWarmupCosineLRCycles("sdlkhcz") - .withWarmupCosineLRWarmupEpochs("pmgfjculojhhylx") - .withWeightDecay("vfiyymot"); - model = BinaryData.fromObject(model).toObject(ImageModelDistributionSettings.class); - Assertions.assertEquals("kbsvbwy", model.amsGradient()); - Assertions.assertEquals("ygnbknhjgclxaxwc", model.augmentations()); - Assertions.assertEquals("asp", model.beta1()); - Assertions.assertEquals("zkucszghdoaqipmn", model.beta2()); - Assertions.assertEquals("lfrsbzrnmuv", model.distributed()); - Assertions.assertEquals("pu", model.earlyStopping()); - Assertions.assertEquals("ddtbfmekjcnginxd", model.earlyStoppingDelay()); - Assertions.assertEquals("aoy", model.earlyStoppingPatience()); - Assertions.assertEquals("fvgyxzmxynofxl", model.evaluationFrequency()); - Assertions.assertEquals("xoqxtdnzujsj", model.enableOnnxNormalization()); - Assertions.assertEquals("krpskcjhmm", model.gradientAccumulationStep()); - Assertions.assertEquals("bnivdqtkykp", model.layersToFreeze()); - Assertions.assertEquals("nlsfgnyscac", model.learningRate()); - Assertions.assertEquals("tbzetxyg", model.learningRateScheduler()); - Assertions.assertEquals("iceecvjwy", model.modelName()); - Assertions.assertEquals("eoxmpzzw", model.momentum()); - Assertions.assertEquals("drdvha", model.nesterov()); - Assertions.assertEquals("kx", model.numberOfEpochs()); - Assertions.assertEquals("vz", model.numberOfWorkers()); - Assertions.assertEquals("xmbrygmwibiosiq", model.optimizer()); - Assertions.assertEquals("kqfdqwdrtx", model.randomSeed()); - Assertions.assertEquals("daglmrcok", model.stepLRGamma()); - Assertions.assertEquals("ert", model.stepLRStepSize()); - Assertions.assertEquals("unzsiywhubym", model.trainingBatchSize()); - Assertions.assertEquals("opikzebqnnfywtkq", model.validationBatchSize()); - Assertions.assertEquals("sdlkhcz", model.warmupCosineLRCycles()); - Assertions.assertEquals("pmgfjculojhhylx", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("vfiyymot", model.weightDecay()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsClassificationTests.java deleted file mode 100644 index 884e95b21684..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsClassificationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelSettingsClassificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelSettingsClassification model = BinaryData.fromString( - "{\"trainingCropSize\":2019850919,\"validationCropSize\":1207062922,\"validationResizeSize\":284324942,\"weightedLoss\":1254415877,\"amsGradient\":true,\"advancedSettings\":\"vscbgngcrusxhir\",\"augmentations\":\"gcvsvkkjbjolpy\",\"beta1\":58.230556,\"beta2\":50.90398,\"checkpointFrequency\":901298308,\"checkpointRunId\":\"advhmli\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"igowxxbhtpsyioqe\",\"mode\":\"ReadOnlyMount\",\"description\":\"qszz\"},\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":958652184,\"earlyStoppingPatience\":1740509933,\"evaluationFrequency\":1046556371,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":321986139,\"layersToFreeze\":1384834321,\"learningRate\":89.54964,\"learningRateScheduler\":\"Step\",\"modelName\":\"ompnbnfgyweojbep\",\"momentum\":27.62385,\"nesterov\":true,\"numberOfEpochs\":810296596,\"numberOfWorkers\":1614250259,\"optimizer\":\"None\",\"randomSeed\":1918105896,\"stepLRGamma\":55.955624,\"stepLRStepSize\":1172060548,\"trainingBatchSize\":2093190507,\"validationBatchSize\":1129435958,\"warmupCosineLRCycles\":27.577805,\"warmupCosineLRWarmupEpochs\":1232186738,\"weightDecay\":96.705475}") - .toObject(ImageModelSettingsClassification.class); - Assertions.assertEquals(true, model.amsGradient()); - Assertions.assertEquals("vscbgngcrusxhir", model.advancedSettings()); - Assertions.assertEquals("gcvsvkkjbjolpy", model.augmentations()); - Assertions.assertEquals(58.230556F, model.beta1()); - Assertions.assertEquals(50.90398F, model.beta2()); - Assertions.assertEquals(901298308, model.checkpointFrequency()); - Assertions.assertEquals("advhmli", model.checkpointRunId()); - Assertions.assertEquals("qszz", model.checkpointModel().description()); - Assertions.assertEquals("igowxxbhtpsyioqe", model.checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(false, model.earlyStopping()); - Assertions.assertEquals(958652184, model.earlyStoppingDelay()); - Assertions.assertEquals(1740509933, model.earlyStoppingPatience()); - Assertions.assertEquals(1046556371, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(321986139, model.gradientAccumulationStep()); - Assertions.assertEquals(1384834321, model.layersToFreeze()); - Assertions.assertEquals(89.54964F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.learningRateScheduler()); - Assertions.assertEquals("ompnbnfgyweojbep", model.modelName()); - Assertions.assertEquals(27.62385F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(810296596, model.numberOfEpochs()); - Assertions.assertEquals(1614250259, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(1918105896, model.randomSeed()); - Assertions.assertEquals(55.955624F, model.stepLRGamma()); - Assertions.assertEquals(1172060548, model.stepLRStepSize()); - Assertions.assertEquals(2093190507, model.trainingBatchSize()); - Assertions.assertEquals(1129435958, model.validationBatchSize()); - Assertions.assertEquals(27.577805F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1232186738, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(96.705475F, model.weightDecay()); - Assertions.assertEquals(2019850919, model.trainingCropSize()); - Assertions.assertEquals(1207062922, model.validationCropSize()); - Assertions.assertEquals(284324942, model.validationResizeSize()); - Assertions.assertEquals(1254415877, model.weightedLoss()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelSettingsClassification model = new ImageModelSettingsClassification().withAmsGradient(true) - .withAdvancedSettings("vscbgngcrusxhir") - .withAugmentations("gcvsvkkjbjolpy") - .withBeta1(58.230556F) - .withBeta2(50.90398F) - .withCheckpointFrequency(901298308) - .withCheckpointRunId("advhmli") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("qszz") - .withUri("igowxxbhtpsyioqe") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withDistributed(true) - .withEarlyStopping(false) - .withEarlyStoppingDelay(958652184) - .withEarlyStoppingPatience(1740509933) - .withEvaluationFrequency(1046556371) - .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(321986139) - .withLayersToFreeze(1384834321) - .withLearningRate(89.54964F) - .withLearningRateScheduler(LearningRateScheduler.STEP) - .withModelName("ompnbnfgyweojbep") - .withMomentum(27.62385F) - .withNesterov(true) - .withNumberOfEpochs(810296596) - .withNumberOfWorkers(1614250259) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(1918105896) - .withStepLRGamma(55.955624F) - .withStepLRStepSize(1172060548) - .withTrainingBatchSize(2093190507) - .withValidationBatchSize(1129435958) - .withWarmupCosineLRCycles(27.577805F) - .withWarmupCosineLRWarmupEpochs(1232186738) - .withWeightDecay(96.705475F) - .withTrainingCropSize(2019850919) - .withValidationCropSize(1207062922) - .withValidationResizeSize(284324942) - .withWeightedLoss(1254415877); - model = BinaryData.fromObject(model).toObject(ImageModelSettingsClassification.class); - Assertions.assertEquals(true, model.amsGradient()); - Assertions.assertEquals("vscbgngcrusxhir", model.advancedSettings()); - Assertions.assertEquals("gcvsvkkjbjolpy", model.augmentations()); - Assertions.assertEquals(58.230556F, model.beta1()); - Assertions.assertEquals(50.90398F, model.beta2()); - Assertions.assertEquals(901298308, model.checkpointFrequency()); - Assertions.assertEquals("advhmli", model.checkpointRunId()); - Assertions.assertEquals("qszz", model.checkpointModel().description()); - Assertions.assertEquals("igowxxbhtpsyioqe", model.checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(false, model.earlyStopping()); - Assertions.assertEquals(958652184, model.earlyStoppingDelay()); - Assertions.assertEquals(1740509933, model.earlyStoppingPatience()); - Assertions.assertEquals(1046556371, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(321986139, model.gradientAccumulationStep()); - Assertions.assertEquals(1384834321, model.layersToFreeze()); - Assertions.assertEquals(89.54964F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.learningRateScheduler()); - Assertions.assertEquals("ompnbnfgyweojbep", model.modelName()); - Assertions.assertEquals(27.62385F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(810296596, model.numberOfEpochs()); - Assertions.assertEquals(1614250259, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(1918105896, model.randomSeed()); - Assertions.assertEquals(55.955624F, model.stepLRGamma()); - Assertions.assertEquals(1172060548, model.stepLRStepSize()); - Assertions.assertEquals(2093190507, model.trainingBatchSize()); - Assertions.assertEquals(1129435958, model.validationBatchSize()); - Assertions.assertEquals(27.577805F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1232186738, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(96.705475F, model.weightDecay()); - Assertions.assertEquals(2019850919, model.trainingCropSize()); - Assertions.assertEquals(1207062922, model.validationCropSize()); - Assertions.assertEquals(284324942, model.validationResizeSize()); - Assertions.assertEquals(1254415877, model.weightedLoss()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsObjectDetectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsObjectDetectionTests.java deleted file mode 100644 index c0ebd36aa184..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsObjectDetectionTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.ModelSize; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import com.azure.resourcemanager.machinelearning.models.ValidationMetricType; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelSettingsObjectDetectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelSettingsObjectDetection model = BinaryData.fromString( - "{\"boxDetectionsPerImage\":838831750,\"boxScoreThreshold\":1.4475048,\"imageSize\":1865047625,\"maxSize\":1873973420,\"minSize\":314456492,\"modelSize\":\"Medium\",\"multiScale\":false,\"nmsIouThreshold\":73.60141,\"tileGridSize\":\"ae\",\"tileOverlapRatio\":38.204247,\"tilePredictionsNmsThreshold\":50.140213,\"validationIouThreshold\":76.77868,\"validationMetricType\":\"Voc\",\"amsGradient\":false,\"advancedSettings\":\"iurni\",\"augmentations\":\"pdyttqmiu\",\"beta1\":79.63432,\"beta2\":48.798817,\"checkpointFrequency\":1957117329,\"checkpointRunId\":\"mhhtuq\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"xynof\",\"mode\":\"EvalMount\",\"description\":\"fixngxeb\"},\"distributed\":true,\"earlyStopping\":true,\"earlyStoppingDelay\":1452325370,\"earlyStoppingPatience\":312132877,\"evaluationFrequency\":216348432,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":2915542,\"layersToFreeze\":1485527211,\"learningRate\":7.0822835,\"learningRateScheduler\":\"None\",\"modelName\":\"jlbsmndafbncuyj\",\"momentum\":57.50032,\"nesterov\":true,\"numberOfEpochs\":529757711,\"numberOfWorkers\":1143101731,\"optimizer\":\"None\",\"randomSeed\":1522797644,\"stepLRGamma\":73.525085,\"stepLRStepSize\":2081472947,\"trainingBatchSize\":1138618692,\"validationBatchSize\":917946265,\"warmupCosineLRCycles\":66.47967,\"warmupCosineLRWarmupEpochs\":1182072687,\"weightDecay\":30.044836}") - .toObject(ImageModelSettingsObjectDetection.class); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("iurni", model.advancedSettings()); - Assertions.assertEquals("pdyttqmiu", model.augmentations()); - Assertions.assertEquals(79.63432F, model.beta1()); - Assertions.assertEquals(48.798817F, model.beta2()); - Assertions.assertEquals(1957117329, model.checkpointFrequency()); - Assertions.assertEquals("mhhtuq", model.checkpointRunId()); - Assertions.assertEquals("fixngxeb", model.checkpointModel().description()); - Assertions.assertEquals("xynof", model.checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(1452325370, model.earlyStoppingDelay()); - Assertions.assertEquals(312132877, model.earlyStoppingPatience()); - Assertions.assertEquals(216348432, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(2915542, model.gradientAccumulationStep()); - Assertions.assertEquals(1485527211, model.layersToFreeze()); - Assertions.assertEquals(7.0822835F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.learningRateScheduler()); - Assertions.assertEquals("jlbsmndafbncuyj", model.modelName()); - Assertions.assertEquals(57.50032F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(529757711, model.numberOfEpochs()); - Assertions.assertEquals(1143101731, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(1522797644, model.randomSeed()); - Assertions.assertEquals(73.525085F, model.stepLRGamma()); - Assertions.assertEquals(2081472947, model.stepLRStepSize()); - Assertions.assertEquals(1138618692, model.trainingBatchSize()); - Assertions.assertEquals(917946265, model.validationBatchSize()); - Assertions.assertEquals(66.47967F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1182072687, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(30.044836F, model.weightDecay()); - Assertions.assertEquals(838831750, model.boxDetectionsPerImage()); - Assertions.assertEquals(1.4475048F, model.boxScoreThreshold()); - Assertions.assertEquals(1865047625, model.imageSize()); - Assertions.assertEquals(1873973420, model.maxSize()); - Assertions.assertEquals(314456492, model.minSize()); - Assertions.assertEquals(ModelSize.MEDIUM, model.modelSize()); - Assertions.assertEquals(false, model.multiScale()); - Assertions.assertEquals(73.60141F, model.nmsIouThreshold()); - Assertions.assertEquals("ae", model.tileGridSize()); - Assertions.assertEquals(38.204247F, model.tileOverlapRatio()); - Assertions.assertEquals(50.140213F, model.tilePredictionsNmsThreshold()); - Assertions.assertEquals(76.77868F, model.validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.validationMetricType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelSettingsObjectDetection model = new ImageModelSettingsObjectDetection().withAmsGradient(false) - .withAdvancedSettings("iurni") - .withAugmentations("pdyttqmiu") - .withBeta1(79.63432F) - .withBeta2(48.798817F) - .withCheckpointFrequency(1957117329) - .withCheckpointRunId("mhhtuq") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("fixngxeb") - .withUri("xynof") - .withMode(InputDeliveryMode.EVAL_MOUNT)) - .withDistributed(true) - .withEarlyStopping(true) - .withEarlyStoppingDelay(1452325370) - .withEarlyStoppingPatience(312132877) - .withEvaluationFrequency(216348432) - .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(2915542) - .withLayersToFreeze(1485527211) - .withLearningRate(7.0822835F) - .withLearningRateScheduler(LearningRateScheduler.NONE) - .withModelName("jlbsmndafbncuyj") - .withMomentum(57.50032F) - .withNesterov(true) - .withNumberOfEpochs(529757711) - .withNumberOfWorkers(1143101731) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(1522797644) - .withStepLRGamma(73.525085F) - .withStepLRStepSize(2081472947) - .withTrainingBatchSize(1138618692) - .withValidationBatchSize(917946265) - .withWarmupCosineLRCycles(66.47967F) - .withWarmupCosineLRWarmupEpochs(1182072687) - .withWeightDecay(30.044836F) - .withBoxDetectionsPerImage(838831750) - .withBoxScoreThreshold(1.4475048F) - .withImageSize(1865047625) - .withMaxSize(1873973420) - .withMinSize(314456492) - .withModelSize(ModelSize.MEDIUM) - .withMultiScale(false) - .withNmsIouThreshold(73.60141F) - .withTileGridSize("ae") - .withTileOverlapRatio(38.204247F) - .withTilePredictionsNmsThreshold(50.140213F) - .withValidationIouThreshold(76.77868F) - .withValidationMetricType(ValidationMetricType.VOC); - model = BinaryData.fromObject(model).toObject(ImageModelSettingsObjectDetection.class); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("iurni", model.advancedSettings()); - Assertions.assertEquals("pdyttqmiu", model.augmentations()); - Assertions.assertEquals(79.63432F, model.beta1()); - Assertions.assertEquals(48.798817F, model.beta2()); - Assertions.assertEquals(1957117329, model.checkpointFrequency()); - Assertions.assertEquals("mhhtuq", model.checkpointRunId()); - Assertions.assertEquals("fixngxeb", model.checkpointModel().description()); - Assertions.assertEquals("xynof", model.checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(1452325370, model.earlyStoppingDelay()); - Assertions.assertEquals(312132877, model.earlyStoppingPatience()); - Assertions.assertEquals(216348432, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(2915542, model.gradientAccumulationStep()); - Assertions.assertEquals(1485527211, model.layersToFreeze()); - Assertions.assertEquals(7.0822835F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.learningRateScheduler()); - Assertions.assertEquals("jlbsmndafbncuyj", model.modelName()); - Assertions.assertEquals(57.50032F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(529757711, model.numberOfEpochs()); - Assertions.assertEquals(1143101731, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(1522797644, model.randomSeed()); - Assertions.assertEquals(73.525085F, model.stepLRGamma()); - Assertions.assertEquals(2081472947, model.stepLRStepSize()); - Assertions.assertEquals(1138618692, model.trainingBatchSize()); - Assertions.assertEquals(917946265, model.validationBatchSize()); - Assertions.assertEquals(66.47967F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1182072687, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(30.044836F, model.weightDecay()); - Assertions.assertEquals(838831750, model.boxDetectionsPerImage()); - Assertions.assertEquals(1.4475048F, model.boxScoreThreshold()); - Assertions.assertEquals(1865047625, model.imageSize()); - Assertions.assertEquals(1873973420, model.maxSize()); - Assertions.assertEquals(314456492, model.minSize()); - Assertions.assertEquals(ModelSize.MEDIUM, model.modelSize()); - Assertions.assertEquals(false, model.multiScale()); - Assertions.assertEquals(73.60141F, model.nmsIouThreshold()); - Assertions.assertEquals("ae", model.tileGridSize()); - Assertions.assertEquals(38.204247F, model.tileOverlapRatio()); - Assertions.assertEquals(50.140213F, model.tilePredictionsNmsThreshold()); - Assertions.assertEquals(76.77868F, model.validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.validationMetricType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsTests.java deleted file mode 100644 index d3ac029e49d1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsTests.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelSettings model = BinaryData.fromString( - "{\"amsGradient\":false,\"advancedSettings\":\"bjepzwhj\",\"augmentations\":\"fdgbggcjxzhbl\",\"beta1\":22.508585,\"beta2\":51.947952,\"checkpointFrequency\":1855309521,\"checkpointRunId\":\"ym\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"bhdosmbngkql\",\"mode\":\"ReadWriteMount\",\"description\":\"uvxdmxexatmd\"},\"distributed\":false,\"earlyStopping\":true,\"earlyStoppingDelay\":307725158,\"earlyStoppingPatience\":1605028001,\"evaluationFrequency\":696774738,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":1911706738,\"layersToFreeze\":10967468,\"learningRate\":8.704895,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"kzsoxz\",\"momentum\":17.274517,\"nesterov\":false,\"numberOfEpochs\":401465476,\"numberOfWorkers\":381354685,\"optimizer\":\"Sgd\",\"randomSeed\":1477736921,\"stepLRGamma\":48.98826,\"stepLRStepSize\":960769540,\"trainingBatchSize\":556171799,\"validationBatchSize\":2147008649,\"warmupCosineLRCycles\":63.310665,\"warmupCosineLRWarmupEpochs\":218469091,\"weightDecay\":33.301514}") - .toObject(ImageModelSettings.class); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("bjepzwhj", model.advancedSettings()); - Assertions.assertEquals("fdgbggcjxzhbl", model.augmentations()); - Assertions.assertEquals(22.508585F, model.beta1()); - Assertions.assertEquals(51.947952F, model.beta2()); - Assertions.assertEquals(1855309521, model.checkpointFrequency()); - Assertions.assertEquals("ym", model.checkpointRunId()); - Assertions.assertEquals("uvxdmxexatmd", model.checkpointModel().description()); - Assertions.assertEquals("bhdosmbngkql", model.checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(false, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(307725158, model.earlyStoppingDelay()); - Assertions.assertEquals(1605028001, model.earlyStoppingPatience()); - Assertions.assertEquals(696774738, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(1911706738, model.gradientAccumulationStep()); - Assertions.assertEquals(10967468, model.layersToFreeze()); - Assertions.assertEquals(8.704895F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); - Assertions.assertEquals("kzsoxz", model.modelName()); - Assertions.assertEquals(17.274517F, model.momentum()); - Assertions.assertEquals(false, model.nesterov()); - Assertions.assertEquals(401465476, model.numberOfEpochs()); - Assertions.assertEquals(381354685, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.SGD, model.optimizer()); - Assertions.assertEquals(1477736921, model.randomSeed()); - Assertions.assertEquals(48.98826F, model.stepLRGamma()); - Assertions.assertEquals(960769540, model.stepLRStepSize()); - Assertions.assertEquals(556171799, model.trainingBatchSize()); - Assertions.assertEquals(2147008649, model.validationBatchSize()); - Assertions.assertEquals(63.310665F, model.warmupCosineLRCycles()); - Assertions.assertEquals(218469091, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(33.301514F, model.weightDecay()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelSettings model = new ImageModelSettings().withAmsGradient(false) - .withAdvancedSettings("bjepzwhj") - .withAugmentations("fdgbggcjxzhbl") - .withBeta1(22.508585F) - .withBeta2(51.947952F) - .withCheckpointFrequency(1855309521) - .withCheckpointRunId("ym") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("uvxdmxexatmd") - .withUri("bhdosmbngkql") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT)) - .withDistributed(false) - .withEarlyStopping(true) - .withEarlyStoppingDelay(307725158) - .withEarlyStoppingPatience(1605028001) - .withEvaluationFrequency(696774738) - .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(1911706738) - .withLayersToFreeze(10967468) - .withLearningRate(8.704895F) - .withLearningRateScheduler(LearningRateScheduler.WARMUP_COSINE) - .withModelName("kzsoxz") - .withMomentum(17.274517F) - .withNesterov(false) - .withNumberOfEpochs(401465476) - .withNumberOfWorkers(381354685) - .withOptimizer(StochasticOptimizer.SGD) - .withRandomSeed(1477736921) - .withStepLRGamma(48.98826F) - .withStepLRStepSize(960769540) - .withTrainingBatchSize(556171799) - .withValidationBatchSize(2147008649) - .withWarmupCosineLRCycles(63.310665F) - .withWarmupCosineLRWarmupEpochs(218469091) - .withWeightDecay(33.301514F); - model = BinaryData.fromObject(model).toObject(ImageModelSettings.class); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("bjepzwhj", model.advancedSettings()); - Assertions.assertEquals("fdgbggcjxzhbl", model.augmentations()); - Assertions.assertEquals(22.508585F, model.beta1()); - Assertions.assertEquals(51.947952F, model.beta2()); - Assertions.assertEquals(1855309521, model.checkpointFrequency()); - Assertions.assertEquals("ym", model.checkpointRunId()); - Assertions.assertEquals("uvxdmxexatmd", model.checkpointModel().description()); - Assertions.assertEquals("bhdosmbngkql", model.checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(false, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(307725158, model.earlyStoppingDelay()); - Assertions.assertEquals(1605028001, model.earlyStoppingPatience()); - Assertions.assertEquals(696774738, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(1911706738, model.gradientAccumulationStep()); - Assertions.assertEquals(10967468, model.layersToFreeze()); - Assertions.assertEquals(8.704895F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); - Assertions.assertEquals("kzsoxz", model.modelName()); - Assertions.assertEquals(17.274517F, model.momentum()); - Assertions.assertEquals(false, model.nesterov()); - Assertions.assertEquals(401465476, model.numberOfEpochs()); - Assertions.assertEquals(381354685, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.SGD, model.optimizer()); - Assertions.assertEquals(1477736921, model.randomSeed()); - Assertions.assertEquals(48.98826F, model.stepLRGamma()); - Assertions.assertEquals(960769540, model.stepLRStepSize()); - Assertions.assertEquals(556171799, model.trainingBatchSize()); - Assertions.assertEquals(2147008649, model.validationBatchSize()); - Assertions.assertEquals(63.310665F, model.warmupCosineLRCycles()); - Assertions.assertEquals(218469091, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(33.301514F, model.weightDecay()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionBaseTests.java deleted file mode 100644 index 50659c8622c7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionBaseTests.java +++ /dev/null @@ -1,456 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageObjectDetectionBase; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.ModelSize; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import com.azure.resourcemanager.machinelearning.models.ValidationMetricType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageObjectDetectionBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageObjectDetectionBase model = BinaryData.fromString( - "{\"modelSettings\":{\"boxDetectionsPerImage\":1628267631,\"boxScoreThreshold\":29.993313,\"imageSize\":1142675426,\"maxSize\":926269302,\"minSize\":1191635799,\"modelSize\":\"ExtraLarge\",\"multiScale\":false,\"nmsIouThreshold\":32.659657,\"tileGridSize\":\"taxjucltjlxsgce\",\"tileOverlapRatio\":78.93754,\"tilePredictionsNmsThreshold\":16.3262,\"validationIouThreshold\":95.671394,\"validationMetricType\":\"Voc\",\"amsGradient\":false,\"advancedSettings\":\"vfjyzufldif\",\"augmentations\":\"vlutggmaacxauhv\",\"beta1\":26.423735,\"beta2\":35.01808,\"checkpointFrequency\":79908941,\"checkpointRunId\":\"qxtoiyygktsrjyxx\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"wfzbkve\",\"mode\":\"ReadWriteMount\",\"description\":\"xphsowbe\"},\"distributed\":true,\"earlyStopping\":true,\"earlyStoppingDelay\":1870801520,\"earlyStoppingPatience\":1858531947,\"evaluationFrequency\":500672005,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":1493541388,\"layersToFreeze\":1056931812,\"learningRate\":71.24121,\"learningRateScheduler\":\"Step\",\"modelName\":\"rafjajvkyxmm\",\"momentum\":42.656822,\"nesterov\":false,\"numberOfEpochs\":1801731269,\"numberOfWorkers\":1139337478,\"optimizer\":\"None\",\"randomSeed\":1799945532,\"stepLRGamma\":31.64695,\"stepLRStepSize\":762243556,\"trainingBatchSize\":250358057,\"validationBatchSize\":403241529,\"warmupCosineLRCycles\":45.694794,\"warmupCosineLRWarmupEpochs\":459919584,\"weightDecay\":87.26493},\"searchSpace\":[{\"boxDetectionsPerImage\":\"yphfxnrpdh\",\"boxScoreThreshold\":\"okyqsfkxfsy\",\"imageSize\":\"ihqbtod\",\"maxSize\":\"yxbvkvwzdmv\",\"minSize\":\"qwcrugyo\",\"modelSize\":\"za\",\"multiScale\":\"jdvvlrhocr\",\"nmsIouThreshold\":\"vxundqzbvbps\",\"tileGridSize\":\"qhxtozfgdkwbkur\",\"tileOverlapRatio\":\"piigf\",\"tilePredictionsNmsThreshold\":\"keutuipjclzjwaq\",\"validationIouThreshold\":\"qydewuwxyllz\",\"validationMetricType\":\"evt\",\"amsGradient\":\"wczochw\",\"augmentations\":\"k\",\"beta1\":\"ynfpkyvnhiysdho\",\"beta2\":\"slhraqkiwlwkff\",\"distributed\":\"qwmwqoguflteat\",\"earlyStopping\":\"gefzj\",\"earlyStoppingDelay\":\"jtqbgysi\",\"earlyStoppingPatience\":\"hnvxwtd\",\"evaluationFrequency\":\"cbjdbtqy\",\"enableOnnxNormalization\":\"xu\",\"gradientAccumulationStep\":\"aujqgbbjv\",\"layersToFreeze\":\"oawh\",\"learningRate\":\"smbcsloygsab\",\"learningRateScheduler\":\"d\",\"modelName\":\"ronsdunr\",\"momentum\":\"vz\",\"nesterov\":\"tqhgz\",\"numberOfEpochs\":\"xtrvfdbqs\",\"numberOfWorkers\":\"qjbvitptpvsffa\",\"optimizer\":\"hpiwrmu\",\"randomSeed\":\"gjw\",\"stepLRGamma\":\"fdwfbwxy\",\"stepLRStepSize\":\"qtmg\",\"trainingBatchSize\":\"pdrmegajr\",\"validationBatchSize\":\"twymzs\",\"warmupCosineLRCycles\":\"qkkge\",\"warmupCosineLRWarmupEpochs\":\"iphgli\",\"weightDecay\":\"qsco\"},{\"boxDetectionsPerImage\":\"kj\",\"boxScoreThreshold\":\"axsqcomji\",\"imageSize\":\"incev\",\"maxSize\":\"kdevpximzii\",\"minSize\":\"eqmduvtvodqxxpqh\",\"modelSize\":\"qibtblmc\",\"multiScale\":\"j\",\"nmsIouThreshold\":\"notdofqvpbqsdqk\",\"tileGridSize\":\"bqsbbmitaf\",\"tileOverlapRatio\":\"zgcxsvqlcquf\",\"tilePredictionsNmsThreshold\":\"amxo\",\"validationIouThreshold\":\"gc\",\"validationMetricType\":\"yutehlkarvtipquk\",\"amsGradient\":\"iknsgo\",\"augmentations\":\"nswhpcek\",\"beta1\":\"vmfnnbbxn\",\"beta2\":\"fkk\",\"distributed\":\"eetxtpwcv\",\"earlyStopping\":\"fwsunjzijaciwmm\",\"earlyStoppingDelay\":\"tqdonbzzs\",\"earlyStoppingPatience\":\"zyviiwsu\",\"evaluationFrequency\":\"zhw\",\"enableOnnxNormalization\":\"uifkzqqhb\",\"gradientAccumulationStep\":\"loilmkfbeo\",\"layersToFreeze\":\"pjpngvyvuo\",\"learningRate\":\"dlpsx\",\"learningRateScheduler\":\"ugfw\",\"modelName\":\"qn\",\"momentum\":\"clo\",\"nesterov\":\"mvswxvjeleif\",\"numberOfEpochs\":\"d\",\"numberOfWorkers\":\"wwulkrybpaevy\",\"optimizer\":\"yjecrqkwakkch\",\"randomSeed\":\"oulborcxuibsdqbd\",\"stepLRGamma\":\"lp\",\"stepLRStepSize\":\"t\",\"trainingBatchSize\":\"wpgweoqhbj\",\"validationBatchSize\":\"qfbleruf\",\"warmupCosineLRCycles\":\"lcshjucihbym\",\"warmupCosineLRWarmupEpochs\":\"vtpnerxvje\",\"weightDecay\":\"ra\"},{\"boxDetectionsPerImage\":\"lhbimyii\",\"boxScoreThreshold\":\"a\",\"imageSize\":\"thtpqgfzdosi\",\"maxSize\":\"d\",\"minSize\":\"vflgzhc\",\"modelSize\":\"gwahcrxo\",\"multiScale\":\"rutvnpccxz\",\"nmsIouThreshold\":\"xpmhzghhhk\",\"tileGridSize\":\"njdtujqzvhnj\",\"tileOverlapRatio\":\"mxnhtm\",\"tilePredictionsNmsThreshold\":\"tqlfxolrwvtl\",\"validationIouThreshold\":\"yfjswequf\",\"validationMetricType\":\"yyopoaytwwgw\",\"amsGradient\":\"b\",\"augmentations\":\"bvufrkwjiemimdtn\",\"beta1\":\"wew\",\"beta2\":\"kreeeddd\",\"distributed\":\"tfquu\",\"earlyStopping\":\"clhsiigeeuw\",\"earlyStoppingDelay\":\"nqyxfedq\",\"earlyStoppingPatience\":\"tdqwynxo\",\"evaluationFrequency\":\"vbzpggpwme\",\"enableOnnxNormalization\":\"bqajejir\",\"gradientAccumulationStep\":\"vrvkgpogplb\",\"layersToFreeze\":\"vlnhx\",\"learningRate\":\"njhina\",\"learningRateScheduler\":\"esbxnepqmjmoplu\",\"modelName\":\"ykkfhsovadkrm\",\"momentum\":\"mwqpdkesjqbzkqm\",\"nesterov\":\"poriwbwggijtspzj\",\"numberOfEpochs\":\"rhikwsbzrhdug\",\"numberOfWorkers\":\"htrgz\",\"optimizer\":\"unjf\",\"randomSeed\":\"jhiycbauseqnczk\",\"stepLRGamma\":\"hvtuwyjsqwzsz\",\"stepLRStepSize\":\"zjg\",\"trainingBatchSize\":\"nkfnyskwwunq\",\"validationBatchSize\":\"za\",\"warmupCosineLRCycles\":\"jmslhi\",\"warmupCosineLRWarmupEpochs\":\"ukvbljpxpr\",\"weightDecay\":\"chyluqa\"},{\"boxDetectionsPerImage\":\"cufjjfxt\",\"boxScoreThreshold\":\"tqdstahhhsa\",\"imageSize\":\"xsri\",\"maxSize\":\"cw\",\"minSize\":\"aesyyefm\",\"modelSize\":\"oqotiiqbgpasrv\",\"multiScale\":\"tistyikjhorlx\",\"nmsIouThreshold\":\"ypk\",\"tileGridSize\":\"nycntr\",\"tileOverlapRatio\":\"xwtdmbqjtsuhqh\",\"tilePredictionsNmsThreshold\":\"xtdyqavfxbqmzxsy\",\"validationIouThreshold\":\"sinpaamihwbghvw\",\"validationMetricType\":\"pbgchcgsfzhb\",\"amsGradient\":\"iys\",\"augmentations\":\"jsdjpg\",\"beta1\":\"ysgwkcfferznzcbi\",\"beta2\":\"veomkhfeqc\",\"distributed\":\"plfpohimgckycjp\",\"earlyStopping\":\"b\",\"earlyStoppingDelay\":\"bznxsuloutnpbm\",\"earlyStoppingPatience\":\"oqohgp\",\"evaluationFrequency\":\"dmwk\",\"enableOnnxNormalization\":\"pfhsldqdza\",\"gradientAccumulationStep\":\"unye\",\"layersToFreeze\":\"yzdsytcikswhcam\",\"learningRate\":\"y\",\"learningRateScheduler\":\"xkcgsfcmvhadr\",\"modelName\":\"atvyrkljqkqws\",\"momentum\":\"tvjkowggxawwdm\",\"nesterov\":\"pnkteiidlbovwb\",\"numberOfEpochs\":\"prgeg\",\"numberOfWorkers\":\"ihkjcnerekyjuls\",\"optimizer\":\"wnqhqlqgpwxtvc\",\"randomSeed\":\"avv\",\"stepLRGamma\":\"xwvegenlrj\",\"stepLRStepSize\":\"mwevguyflnxel\",\"trainingBatchSize\":\"kfzcdetowwezhy\",\"validationBatchSize\":\"di\",\"warmupCosineLRCycles\":\"wqlqacs\",\"warmupCosineLRWarmupEpochs\":\"birtybcelfjn\",\"weightDecay\":\"dnjyhzfax\"}],\"limitSettings\":{\"maxTrials\":2124800129,\"timeout\":\"PT94H33M13S\",\"maxConcurrentTrials\":1476171773},\"sweepSettings\":{\"samplingAlgorithm\":\"Bayesian\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":334216826,\"delayEvaluation\":297072472}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"xsorchazr\",\"mode\":\"Download\",\"description\":\"yhl\"},\"validationDataSize\":53.57251340621531}") - .toObject(ImageObjectDetectionBase.class); - Assertions.assertEquals(2124800129, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT94H33M13S"), model.limitSettings().timeout()); - Assertions.assertEquals(1476171773, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(334216826, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(297072472, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("yhl", model.validationData().description()); - Assertions.assertEquals("xsorchazr", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(53.57251340621531D, model.validationDataSize()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("vfjyzufldif", model.modelSettings().advancedSettings()); - Assertions.assertEquals("vlutggmaacxauhv", model.modelSettings().augmentations()); - Assertions.assertEquals(26.423735F, model.modelSettings().beta1()); - Assertions.assertEquals(35.01808F, model.modelSettings().beta2()); - Assertions.assertEquals(79908941, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("qxtoiyygktsrjyxx", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("xphsowbe", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("wfzbkve", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1870801520, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1858531947, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(500672005, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1493541388, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1056931812, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(71.24121F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("rafjajvkyxmm", model.modelSettings().modelName()); - Assertions.assertEquals(42.656822F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1801731269, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1139337478, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(1799945532, model.modelSettings().randomSeed()); - Assertions.assertEquals(31.64695F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(762243556, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(250358057, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(403241529, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(45.694794F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(459919584, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(87.26493F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1628267631, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(29.993313F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(1142675426, model.modelSettings().imageSize()); - Assertions.assertEquals(926269302, model.modelSettings().maxSize()); - Assertions.assertEquals(1191635799, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.EXTRA_LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(32.659657F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("taxjucltjlxsgce", model.modelSettings().tileGridSize()); - Assertions.assertEquals(78.93754F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(16.3262F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(95.671394F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("wczochw", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("k", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("ynfpkyvnhiysdho", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("slhraqkiwlwkff", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("qwmwqoguflteat", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("gefzj", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("jtqbgysi", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("hnvxwtd", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("cbjdbtqy", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("xu", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("aujqgbbjv", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("oawh", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("smbcsloygsab", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("d", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ronsdunr", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("vz", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("tqhgz", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("xtrvfdbqs", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("qjbvitptpvsffa", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("hpiwrmu", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("gjw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("fdwfbwxy", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("qtmg", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("pdrmegajr", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("twymzs", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("qkkge", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("iphgli", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("qsco", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("yphfxnrpdh", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("okyqsfkxfsy", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("ihqbtod", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("yxbvkvwzdmv", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("qwcrugyo", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("za", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("jdvvlrhocr", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("vxundqzbvbps", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("qhxtozfgdkwbkur", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("piigf", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("keutuipjclzjwaq", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("qydewuwxyllz", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("evt", model.searchSpace().get(0).validationMetricType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageObjectDetectionBase model = new ImageObjectDetectionBase() - .withLimitSettings(new ImageLimitSettings().withMaxTrials(2124800129) - .withTimeout(Duration.parse("PT94H33M13S")) - .withMaxConcurrentTrials(1476171773)) - .withSweepSettings(new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN) - .withEarlyTermination( - new EarlyTerminationPolicy().withEvaluationInterval(334216826).withDelayEvaluation(297072472))) - .withValidationData( - new MLTableJobInput().withDescription("yhl").withUri("xsorchazr").withMode(InputDeliveryMode.DOWNLOAD)) - .withValidationDataSize(53.57251340621531D) - .withModelSettings(new ImageModelSettingsObjectDetection().withAmsGradient(false) - .withAdvancedSettings("vfjyzufldif") - .withAugmentations("vlutggmaacxauhv") - .withBeta1(26.423735F) - .withBeta2(35.01808F) - .withCheckpointFrequency(79908941) - .withCheckpointRunId("qxtoiyygktsrjyxx") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("xphsowbe") - .withUri("wfzbkve") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT)) - .withDistributed(true) - .withEarlyStopping(true) - .withEarlyStoppingDelay(1870801520) - .withEarlyStoppingPatience(1858531947) - .withEvaluationFrequency(500672005) - .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(1493541388) - .withLayersToFreeze(1056931812) - .withLearningRate(71.24121F) - .withLearningRateScheduler(LearningRateScheduler.STEP) - .withModelName("rafjajvkyxmm") - .withMomentum(42.656822F) - .withNesterov(false) - .withNumberOfEpochs(1801731269) - .withNumberOfWorkers(1139337478) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(1799945532) - .withStepLRGamma(31.64695F) - .withStepLRStepSize(762243556) - .withTrainingBatchSize(250358057) - .withValidationBatchSize(403241529) - .withWarmupCosineLRCycles(45.694794F) - .withWarmupCosineLRWarmupEpochs(459919584) - .withWeightDecay(87.26493F) - .withBoxDetectionsPerImage(1628267631) - .withBoxScoreThreshold(29.993313F) - .withImageSize(1142675426) - .withMaxSize(926269302) - .withMinSize(1191635799) - .withModelSize(ModelSize.EXTRA_LARGE) - .withMultiScale(false) - .withNmsIouThreshold(32.659657F) - .withTileGridSize("taxjucltjlxsgce") - .withTileOverlapRatio(78.93754F) - .withTilePredictionsNmsThreshold(16.3262F) - .withValidationIouThreshold(95.671394F) - .withValidationMetricType(ValidationMetricType.VOC)) - .withSearchSpace(Arrays.asList( - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("wczochw") - .withAugmentations("k") - .withBeta1("ynfpkyvnhiysdho") - .withBeta2("slhraqkiwlwkff") - .withDistributed("qwmwqoguflteat") - .withEarlyStopping("gefzj") - .withEarlyStoppingDelay("jtqbgysi") - .withEarlyStoppingPatience("hnvxwtd") - .withEvaluationFrequency("cbjdbtqy") - .withEnableOnnxNormalization("xu") - .withGradientAccumulationStep("aujqgbbjv") - .withLayersToFreeze("oawh") - .withLearningRate("smbcsloygsab") - .withLearningRateScheduler("d") - .withModelName("ronsdunr") - .withMomentum("vz") - .withNesterov("tqhgz") - .withNumberOfEpochs("xtrvfdbqs") - .withNumberOfWorkers("qjbvitptpvsffa") - .withOptimizer("hpiwrmu") - .withRandomSeed("gjw") - .withStepLRGamma("fdwfbwxy") - .withStepLRStepSize("qtmg") - .withTrainingBatchSize("pdrmegajr") - .withValidationBatchSize("twymzs") - .withWarmupCosineLRCycles("qkkge") - .withWarmupCosineLRWarmupEpochs("iphgli") - .withWeightDecay("qsco") - .withBoxDetectionsPerImage("yphfxnrpdh") - .withBoxScoreThreshold("okyqsfkxfsy") - .withImageSize("ihqbtod") - .withMaxSize("yxbvkvwzdmv") - .withMinSize("qwcrugyo") - .withModelSize("za") - .withMultiScale("jdvvlrhocr") - .withNmsIouThreshold("vxundqzbvbps") - .withTileGridSize("qhxtozfgdkwbkur") - .withTileOverlapRatio("piigf") - .withTilePredictionsNmsThreshold("keutuipjclzjwaq") - .withValidationIouThreshold("qydewuwxyllz") - .withValidationMetricType("evt"), - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("iknsgo") - .withAugmentations("nswhpcek") - .withBeta1("vmfnnbbxn") - .withBeta2("fkk") - .withDistributed("eetxtpwcv") - .withEarlyStopping("fwsunjzijaciwmm") - .withEarlyStoppingDelay("tqdonbzzs") - .withEarlyStoppingPatience("zyviiwsu") - .withEvaluationFrequency("zhw") - .withEnableOnnxNormalization("uifkzqqhb") - .withGradientAccumulationStep("loilmkfbeo") - .withLayersToFreeze("pjpngvyvuo") - .withLearningRate("dlpsx") - .withLearningRateScheduler("ugfw") - .withModelName("qn") - .withMomentum("clo") - .withNesterov("mvswxvjeleif") - .withNumberOfEpochs("d") - .withNumberOfWorkers("wwulkrybpaevy") - .withOptimizer("yjecrqkwakkch") - .withRandomSeed("oulborcxuibsdqbd") - .withStepLRGamma("lp") - .withStepLRStepSize("t") - .withTrainingBatchSize("wpgweoqhbj") - .withValidationBatchSize("qfbleruf") - .withWarmupCosineLRCycles("lcshjucihbym") - .withWarmupCosineLRWarmupEpochs("vtpnerxvje") - .withWeightDecay("ra") - .withBoxDetectionsPerImage("kj") - .withBoxScoreThreshold("axsqcomji") - .withImageSize("incev") - .withMaxSize("kdevpximzii") - .withMinSize("eqmduvtvodqxxpqh") - .withModelSize("qibtblmc") - .withMultiScale("j") - .withNmsIouThreshold("notdofqvpbqsdqk") - .withTileGridSize("bqsbbmitaf") - .withTileOverlapRatio("zgcxsvqlcquf") - .withTilePredictionsNmsThreshold("amxo") - .withValidationIouThreshold("gc") - .withValidationMetricType("yutehlkarvtipquk"), - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("b") - .withAugmentations("bvufrkwjiemimdtn") - .withBeta1("wew") - .withBeta2("kreeeddd") - .withDistributed("tfquu") - .withEarlyStopping("clhsiigeeuw") - .withEarlyStoppingDelay("nqyxfedq") - .withEarlyStoppingPatience("tdqwynxo") - .withEvaluationFrequency("vbzpggpwme") - .withEnableOnnxNormalization("bqajejir") - .withGradientAccumulationStep("vrvkgpogplb") - .withLayersToFreeze("vlnhx") - .withLearningRate("njhina") - .withLearningRateScheduler("esbxnepqmjmoplu") - .withModelName("ykkfhsovadkrm") - .withMomentum("mwqpdkesjqbzkqm") - .withNesterov("poriwbwggijtspzj") - .withNumberOfEpochs("rhikwsbzrhdug") - .withNumberOfWorkers("htrgz") - .withOptimizer("unjf") - .withRandomSeed("jhiycbauseqnczk") - .withStepLRGamma("hvtuwyjsqwzsz") - .withStepLRStepSize("zjg") - .withTrainingBatchSize("nkfnyskwwunq") - .withValidationBatchSize("za") - .withWarmupCosineLRCycles("jmslhi") - .withWarmupCosineLRWarmupEpochs("ukvbljpxpr") - .withWeightDecay("chyluqa") - .withBoxDetectionsPerImage("lhbimyii") - .withBoxScoreThreshold("a") - .withImageSize("thtpqgfzdosi") - .withMaxSize("d") - .withMinSize("vflgzhc") - .withModelSize("gwahcrxo") - .withMultiScale("rutvnpccxz") - .withNmsIouThreshold("xpmhzghhhk") - .withTileGridSize("njdtujqzvhnj") - .withTileOverlapRatio("mxnhtm") - .withTilePredictionsNmsThreshold("tqlfxolrwvtl") - .withValidationIouThreshold("yfjswequf") - .withValidationMetricType("yyopoaytwwgw"), - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("iys") - .withAugmentations("jsdjpg") - .withBeta1("ysgwkcfferznzcbi") - .withBeta2("veomkhfeqc") - .withDistributed("plfpohimgckycjp") - .withEarlyStopping("b") - .withEarlyStoppingDelay("bznxsuloutnpbm") - .withEarlyStoppingPatience("oqohgp") - .withEvaluationFrequency("dmwk") - .withEnableOnnxNormalization("pfhsldqdza") - .withGradientAccumulationStep("unye") - .withLayersToFreeze("yzdsytcikswhcam") - .withLearningRate("y") - .withLearningRateScheduler("xkcgsfcmvhadr") - .withModelName("atvyrkljqkqws") - .withMomentum("tvjkowggxawwdm") - .withNesterov("pnkteiidlbovwb") - .withNumberOfEpochs("prgeg") - .withNumberOfWorkers("ihkjcnerekyjuls") - .withOptimizer("wnqhqlqgpwxtvc") - .withRandomSeed("avv") - .withStepLRGamma("xwvegenlrj") - .withStepLRStepSize("mwevguyflnxel") - .withTrainingBatchSize("kfzcdetowwezhy") - .withValidationBatchSize("di") - .withWarmupCosineLRCycles("wqlqacs") - .withWarmupCosineLRWarmupEpochs("birtybcelfjn") - .withWeightDecay("dnjyhzfax") - .withBoxDetectionsPerImage("cufjjfxt") - .withBoxScoreThreshold("tqdstahhhsa") - .withImageSize("xsri") - .withMaxSize("cw") - .withMinSize("aesyyefm") - .withModelSize("oqotiiqbgpasrv") - .withMultiScale("tistyikjhorlx") - .withNmsIouThreshold("ypk") - .withTileGridSize("nycntr") - .withTileOverlapRatio("xwtdmbqjtsuhqh") - .withTilePredictionsNmsThreshold("xtdyqavfxbqmzxsy") - .withValidationIouThreshold("sinpaamihwbghvw") - .withValidationMetricType("pbgchcgsfzhb"))); - model = BinaryData.fromObject(model).toObject(ImageObjectDetectionBase.class); - Assertions.assertEquals(2124800129, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT94H33M13S"), model.limitSettings().timeout()); - Assertions.assertEquals(1476171773, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(334216826, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(297072472, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("yhl", model.validationData().description()); - Assertions.assertEquals("xsorchazr", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(53.57251340621531D, model.validationDataSize()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("vfjyzufldif", model.modelSettings().advancedSettings()); - Assertions.assertEquals("vlutggmaacxauhv", model.modelSettings().augmentations()); - Assertions.assertEquals(26.423735F, model.modelSettings().beta1()); - Assertions.assertEquals(35.01808F, model.modelSettings().beta2()); - Assertions.assertEquals(79908941, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("qxtoiyygktsrjyxx", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("xphsowbe", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("wfzbkve", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1870801520, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1858531947, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(500672005, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1493541388, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1056931812, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(71.24121F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("rafjajvkyxmm", model.modelSettings().modelName()); - Assertions.assertEquals(42.656822F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1801731269, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1139337478, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(1799945532, model.modelSettings().randomSeed()); - Assertions.assertEquals(31.64695F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(762243556, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(250358057, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(403241529, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(45.694794F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(459919584, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(87.26493F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1628267631, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(29.993313F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(1142675426, model.modelSettings().imageSize()); - Assertions.assertEquals(926269302, model.modelSettings().maxSize()); - Assertions.assertEquals(1191635799, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.EXTRA_LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(32.659657F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("taxjucltjlxsgce", model.modelSettings().tileGridSize()); - Assertions.assertEquals(78.93754F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(16.3262F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(95.671394F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("wczochw", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("k", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("ynfpkyvnhiysdho", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("slhraqkiwlwkff", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("qwmwqoguflteat", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("gefzj", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("jtqbgysi", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("hnvxwtd", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("cbjdbtqy", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("xu", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("aujqgbbjv", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("oawh", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("smbcsloygsab", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("d", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ronsdunr", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("vz", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("tqhgz", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("xtrvfdbqs", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("qjbvitptpvsffa", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("hpiwrmu", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("gjw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("fdwfbwxy", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("qtmg", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("pdrmegajr", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("twymzs", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("qkkge", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("iphgli", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("qsco", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("yphfxnrpdh", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("okyqsfkxfsy", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("ihqbtod", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("yxbvkvwzdmv", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("qwcrugyo", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("za", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("jdvvlrhocr", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("vxundqzbvbps", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("qhxtozfgdkwbkur", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("piigf", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("keutuipjclzjwaq", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("qydewuwxyllz", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("evt", model.searchSpace().get(0).validationMetricType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionTests.java deleted file mode 100644 index 79f5b7f4eca3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionTests.java +++ /dev/null @@ -1,353 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.ModelSize; -import com.azure.resourcemanager.machinelearning.models.ObjectDetectionPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import com.azure.resourcemanager.machinelearning.models.ValidationMetricType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageObjectDetectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageObjectDetection model = BinaryData.fromString( - "{\"taskType\":\"ImageObjectDetection\",\"primaryMetric\":\"MeanAveragePrecision\",\"modelSettings\":{\"boxDetectionsPerImage\":710248775,\"boxScoreThreshold\":35.895603,\"imageSize\":422240348,\"maxSize\":1978252606,\"minSize\":623951562,\"modelSize\":\"ExtraLarge\",\"multiScale\":false,\"nmsIouThreshold\":78.472176,\"tileGridSize\":\"sfhshag\",\"tileOverlapRatio\":60.31503,\"tilePredictionsNmsThreshold\":40.6852,\"validationIouThreshold\":80.38389,\"validationMetricType\":\"Voc\",\"amsGradient\":true,\"advancedSettings\":\"ynpmggqgagen\",\"augmentations\":\"bugihcdvfo\",\"beta1\":78.53713,\"beta2\":79.4358,\"checkpointFrequency\":2145428842,\"checkpointRunId\":\"jzsaxzgkqwvde\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"jnaphifk\",\"mode\":\"EvalDownload\",\"description\":\"p\"},\"distributed\":false,\"earlyStopping\":true,\"earlyStoppingDelay\":567285474,\"earlyStoppingPatience\":2035748937,\"evaluationFrequency\":1219115371,\"enableOnnxNormalization\":false,\"gradientAccumulationStep\":1955623996,\"layersToFreeze\":38012767,\"learningRate\":98.00021,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"mskhnkkhbyk\",\"momentum\":82.803696,\"nesterov\":true,\"numberOfEpochs\":1727395180,\"numberOfWorkers\":625230069,\"optimizer\":\"Adam\",\"randomSeed\":870078306,\"stepLRGamma\":37.18851,\"stepLRStepSize\":386873853,\"trainingBatchSize\":1358303870,\"validationBatchSize\":312601450,\"warmupCosineLRCycles\":42.782837,\"warmupCosineLRWarmupEpochs\":1409319523,\"weightDecay\":78.56785},\"searchSpace\":[{\"boxDetectionsPerImage\":\"fuzzlapy\",\"boxScoreThreshold\":\"lvzcgulae\",\"imageSize\":\"iauqsuptessjlw\",\"maxSize\":\"atpvbl\",\"minSize\":\"xgxqayga\",\"modelSize\":\"kvc\",\"multiScale\":\"pvlcjbvyez\",\"nmsIouThreshold\":\"jkqonbw\",\"tileGridSize\":\"ieyozvrcwfpucwnb\",\"tileOverlapRatio\":\"qefgzjvbx\",\"tilePredictionsNmsThreshold\":\"bg\",\"validationIouThreshold\":\"rx\",\"validationMetricType\":\"uc\",\"amsGradient\":\"gvkdlhuduk\",\"augmentations\":\"joafm\",\"beta1\":\"exulvoepknarseia\",\"beta2\":\"sqoacb\",\"distributed\":\"dgsapleqfg\",\"earlyStopping\":\"env\",\"earlyStoppingDelay\":\"glvyakeszsuuvul\",\"earlyStoppingPatience\":\"cwgg\",\"evaluationFrequency\":\"xvlqgfbrve\",\"enableOnnxNormalization\":\"c\",\"gradientAccumulationStep\":\"vphirlzbip\",\"layersToFreeze\":\"nnepkwzzzku\",\"learningRate\":\"uwcjomip\",\"learningRateScheduler\":\"kaujttwykoxv\",\"modelName\":\"ofxxdplrelfk\",\"momentum\":\"ahcbtuxlbp\",\"nesterov\":\"hrfjenrazwefiktl\",\"numberOfEpochs\":\"ashtostjixyzseci\",\"numberOfWorkers\":\"zdwjtacfvvtdpcbp\",\"optimizer\":\"omcsaugbrhfiwltk\",\"randomSeed\":\"su\",\"stepLRGamma\":\"ethklxwhcv\",\"stepLRStepSize\":\"yyhgqokjbmsr\",\"trainingBatchSize\":\"xyxxhwr\",\"validationBatchSize\":\"omaqsyilpzzb\",\"warmupCosineLRCycles\":\"nrz\",\"warmupCosineLRWarmupEpochs\":\"sxagysokli\",\"weightDecay\":\"s\"}],\"limitSettings\":{\"maxTrials\":1698205031,\"timeout\":\"PT29H19M17S\",\"maxConcurrentTrials\":716194367},\"sweepSettings\":{\"samplingAlgorithm\":\"Random\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":1409785,\"delayEvaluation\":962981411}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"cydyllmxv\",\"mode\":\"Download\",\"description\":\"zsyqagqllcbrvaid\"},\"validationDataSize\":69.76448748367842,\"logVerbosity\":\"Critical\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"rrqwfyybpt\",\"mode\":\"EvalDownload\",\"description\":\"nogykugdla\"},\"targetColumnName\":\"avgthkslge\"}") - .toObject(ImageObjectDetection.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("nogykugdla", model.trainingData().description()); - Assertions.assertEquals("rrqwfyybpt", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("avgthkslge", model.targetColumnName()); - Assertions.assertEquals(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("ynpmggqgagen", model.modelSettings().advancedSettings()); - Assertions.assertEquals("bugihcdvfo", model.modelSettings().augmentations()); - Assertions.assertEquals(78.53713F, model.modelSettings().beta1()); - Assertions.assertEquals(79.4358F, model.modelSettings().beta2()); - Assertions.assertEquals(2145428842, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("jzsaxzgkqwvde", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("p", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("jnaphifk", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(567285474, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(2035748937, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1219115371, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1955623996, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(38012767, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(98.00021F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("mskhnkkhbyk", model.modelSettings().modelName()); - Assertions.assertEquals(82.803696F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(1727395180, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(625230069, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(870078306, model.modelSettings().randomSeed()); - Assertions.assertEquals(37.18851F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(386873853, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1358303870, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(312601450, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(42.782837F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1409319523, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(78.56785F, model.modelSettings().weightDecay()); - Assertions.assertEquals(710248775, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(35.895603F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(422240348, model.modelSettings().imageSize()); - Assertions.assertEquals(1978252606, model.modelSettings().maxSize()); - Assertions.assertEquals(623951562, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.EXTRA_LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(78.472176F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("sfhshag", model.modelSettings().tileGridSize()); - Assertions.assertEquals(60.31503F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(40.6852F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(80.38389F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("gvkdlhuduk", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("joafm", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("exulvoepknarseia", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("sqoacb", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("dgsapleqfg", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("env", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("glvyakeszsuuvul", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("cwgg", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("xvlqgfbrve", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("c", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("vphirlzbip", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("nnepkwzzzku", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("uwcjomip", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("kaujttwykoxv", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ofxxdplrelfk", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("ahcbtuxlbp", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("hrfjenrazwefiktl", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ashtostjixyzseci", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("zdwjtacfvvtdpcbp", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("omcsaugbrhfiwltk", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("su", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("ethklxwhcv", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yyhgqokjbmsr", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("xyxxhwr", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("omaqsyilpzzb", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("nrz", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("sxagysokli", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("s", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("fuzzlapy", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("lvzcgulae", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("iauqsuptessjlw", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("atpvbl", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("xgxqayga", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("kvc", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("pvlcjbvyez", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("jkqonbw", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("ieyozvrcwfpucwnb", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("qefgzjvbx", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("bg", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("rx", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("uc", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(1698205031, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT29H19M17S"), model.limitSettings().timeout()); - Assertions.assertEquals(716194367, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1409785, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(962981411, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("zsyqagqllcbrvaid", model.validationData().description()); - Assertions.assertEquals("cydyllmxv", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(69.76448748367842D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageObjectDetection model = new ImageObjectDetection().withLogVerbosity(LogVerbosity.CRITICAL) - .withTrainingData(new MLTableJobInput().withDescription("nogykugdla") - .withUri("rrqwfyybpt") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withTargetColumnName("avgthkslge") - .withPrimaryMetric(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION) - .withModelSettings(new ImageModelSettingsObjectDetection().withAmsGradient(true) - .withAdvancedSettings("ynpmggqgagen") - .withAugmentations("bugihcdvfo") - .withBeta1(78.53713F) - .withBeta2(79.4358F) - .withCheckpointFrequency(2145428842) - .withCheckpointRunId("jzsaxzgkqwvde") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("p") - .withUri("jnaphifk") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withDistributed(false) - .withEarlyStopping(true) - .withEarlyStoppingDelay(567285474) - .withEarlyStoppingPatience(2035748937) - .withEvaluationFrequency(1219115371) - .withEnableOnnxNormalization(false) - .withGradientAccumulationStep(1955623996) - .withLayersToFreeze(38012767) - .withLearningRate(98.00021F) - .withLearningRateScheduler(LearningRateScheduler.WARMUP_COSINE) - .withModelName("mskhnkkhbyk") - .withMomentum(82.803696F) - .withNesterov(true) - .withNumberOfEpochs(1727395180) - .withNumberOfWorkers(625230069) - .withOptimizer(StochasticOptimizer.ADAM) - .withRandomSeed(870078306) - .withStepLRGamma(37.18851F) - .withStepLRStepSize(386873853) - .withTrainingBatchSize(1358303870) - .withValidationBatchSize(312601450) - .withWarmupCosineLRCycles(42.782837F) - .withWarmupCosineLRWarmupEpochs(1409319523) - .withWeightDecay(78.56785F) - .withBoxDetectionsPerImage(710248775) - .withBoxScoreThreshold(35.895603F) - .withImageSize(422240348) - .withMaxSize(1978252606) - .withMinSize(623951562) - .withModelSize(ModelSize.EXTRA_LARGE) - .withMultiScale(false) - .withNmsIouThreshold(78.472176F) - .withTileGridSize("sfhshag") - .withTileOverlapRatio(60.31503F) - .withTilePredictionsNmsThreshold(40.6852F) - .withValidationIouThreshold(80.38389F) - .withValidationMetricType(ValidationMetricType.VOC)) - .withSearchSpace( - Arrays.asList(new ImageModelDistributionSettingsObjectDetection().withAmsGradient("gvkdlhuduk") - .withAugmentations("joafm") - .withBeta1("exulvoepknarseia") - .withBeta2("sqoacb") - .withDistributed("dgsapleqfg") - .withEarlyStopping("env") - .withEarlyStoppingDelay("glvyakeszsuuvul") - .withEarlyStoppingPatience("cwgg") - .withEvaluationFrequency("xvlqgfbrve") - .withEnableOnnxNormalization("c") - .withGradientAccumulationStep("vphirlzbip") - .withLayersToFreeze("nnepkwzzzku") - .withLearningRate("uwcjomip") - .withLearningRateScheduler("kaujttwykoxv") - .withModelName("ofxxdplrelfk") - .withMomentum("ahcbtuxlbp") - .withNesterov("hrfjenrazwefiktl") - .withNumberOfEpochs("ashtostjixyzseci") - .withNumberOfWorkers("zdwjtacfvvtdpcbp") - .withOptimizer("omcsaugbrhfiwltk") - .withRandomSeed("su") - .withStepLRGamma("ethklxwhcv") - .withStepLRStepSize("yyhgqokjbmsr") - .withTrainingBatchSize("xyxxhwr") - .withValidationBatchSize("omaqsyilpzzb") - .withWarmupCosineLRCycles("nrz") - .withWarmupCosineLRWarmupEpochs("sxagysokli") - .withWeightDecay("s") - .withBoxDetectionsPerImage("fuzzlapy") - .withBoxScoreThreshold("lvzcgulae") - .withImageSize("iauqsuptessjlw") - .withMaxSize("atpvbl") - .withMinSize("xgxqayga") - .withModelSize("kvc") - .withMultiScale("pvlcjbvyez") - .withNmsIouThreshold("jkqonbw") - .withTileGridSize("ieyozvrcwfpucwnb") - .withTileOverlapRatio("qefgzjvbx") - .withTilePredictionsNmsThreshold("bg") - .withValidationIouThreshold("rx") - .withValidationMetricType("uc"))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(1698205031) - .withTimeout(Duration.parse("PT29H19M17S")) - .withMaxConcurrentTrials(716194367)) - .withSweepSettings(new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.RANDOM) - .withEarlyTermination( - new EarlyTerminationPolicy().withEvaluationInterval(1409785).withDelayEvaluation(962981411))) - .withValidationData(new MLTableJobInput().withDescription("zsyqagqllcbrvaid") - .withUri("cydyllmxv") - .withMode(InputDeliveryMode.DOWNLOAD)) - .withValidationDataSize(69.76448748367842D); - model = BinaryData.fromObject(model).toObject(ImageObjectDetection.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("nogykugdla", model.trainingData().description()); - Assertions.assertEquals("rrqwfyybpt", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("avgthkslge", model.targetColumnName()); - Assertions.assertEquals(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("ynpmggqgagen", model.modelSettings().advancedSettings()); - Assertions.assertEquals("bugihcdvfo", model.modelSettings().augmentations()); - Assertions.assertEquals(78.53713F, model.modelSettings().beta1()); - Assertions.assertEquals(79.4358F, model.modelSettings().beta2()); - Assertions.assertEquals(2145428842, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("jzsaxzgkqwvde", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("p", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("jnaphifk", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(567285474, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(2035748937, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1219115371, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1955623996, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(38012767, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(98.00021F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("mskhnkkhbyk", model.modelSettings().modelName()); - Assertions.assertEquals(82.803696F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(1727395180, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(625230069, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(870078306, model.modelSettings().randomSeed()); - Assertions.assertEquals(37.18851F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(386873853, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1358303870, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(312601450, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(42.782837F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1409319523, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(78.56785F, model.modelSettings().weightDecay()); - Assertions.assertEquals(710248775, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(35.895603F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(422240348, model.modelSettings().imageSize()); - Assertions.assertEquals(1978252606, model.modelSettings().maxSize()); - Assertions.assertEquals(623951562, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.EXTRA_LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(78.472176F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("sfhshag", model.modelSettings().tileGridSize()); - Assertions.assertEquals(60.31503F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(40.6852F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(80.38389F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("gvkdlhuduk", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("joafm", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("exulvoepknarseia", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("sqoacb", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("dgsapleqfg", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("env", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("glvyakeszsuuvul", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("cwgg", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("xvlqgfbrve", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("c", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("vphirlzbip", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("nnepkwzzzku", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("uwcjomip", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("kaujttwykoxv", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ofxxdplrelfk", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("ahcbtuxlbp", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("hrfjenrazwefiktl", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ashtostjixyzseci", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("zdwjtacfvvtdpcbp", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("omcsaugbrhfiwltk", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("su", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("ethklxwhcv", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yyhgqokjbmsr", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("xyxxhwr", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("omaqsyilpzzb", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("nrz", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("sxagysokli", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("s", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("fuzzlapy", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("lvzcgulae", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("iauqsuptessjlw", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("atpvbl", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("xgxqayga", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("kvc", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("pvlcjbvyez", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("jkqonbw", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("ieyozvrcwfpucwnb", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("qefgzjvbx", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("bg", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("rx", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("uc", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(1698205031, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT29H19M17S"), model.limitSettings().timeout()); - Assertions.assertEquals(716194367, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1409785, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(962981411, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("zsyqagqllcbrvaid", model.validationData().description()); - Assertions.assertEquals("cydyllmxv", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(69.76448748367842D, model.validationDataSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageSweepSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageSweepSettingsTests.java deleted file mode 100644 index 62950c7050e5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageSweepSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import org.junit.jupiter.api.Assertions; - -public final class ImageSweepSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageSweepSettings model = BinaryData.fromString( - "{\"samplingAlgorithm\":\"Grid\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":1821428619,\"delayEvaluation\":232113908}}") - .toObject(ImageSweepSettings.class); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.samplingAlgorithm()); - Assertions.assertEquals(1821428619, model.earlyTermination().evaluationInterval()); - Assertions.assertEquals(232113908, model.earlyTermination().delayEvaluation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageSweepSettings model = new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.GRID) - .withEarlyTermination( - new EarlyTerminationPolicy().withEvaluationInterval(1821428619).withDelayEvaluation(232113908)); - model = BinaryData.fromObject(model).toObject(ImageSweepSettings.class); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.samplingAlgorithm()); - Assertions.assertEquals(1821428619, model.earlyTermination().evaluationInterval()); - Assertions.assertEquals(232113908, model.earlyTermination().delayEvaluation()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageTests.java deleted file mode 100644 index 943123deaa9c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Image; -import com.azure.resourcemanager.machinelearning.models.ImageType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ImageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Image model = BinaryData.fromString( - "{\"type\":\"azureml\",\"reference\":\"zpbgkzc\",\"\":{\"ti\":\"dataiuzvkunhdimju\",\"gofmhxwrjlv\":\"datazkaugpucdocfqpl\"}}") - .toObject(Image.class); - Assertions.assertEquals(ImageType.AZUREML, model.type()); - Assertions.assertEquals("zpbgkzc", model.reference()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Image model - = new Image().withType(ImageType.AZUREML).withReference("zpbgkzc").withAdditionalProperties(mapOf()); - model = BinaryData.fromObject(model).toObject(Image.class); - Assertions.assertEquals(ImageType.AZUREML, model.type()); - Assertions.assertEquals("zpbgkzc", model.reference()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageVerticalTests.java deleted file mode 100644 index a0296ceb7793..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageVerticalTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.ImageVertical; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ImageVerticalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageVertical model = BinaryData.fromString( - "{\"limitSettings\":{\"maxTrials\":1994872439,\"timeout\":\"PT128H24M14S\",\"maxConcurrentTrials\":963869601},\"sweepSettings\":{\"samplingAlgorithm\":\"Random\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":676982942,\"delayEvaluation\":1015925891}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"nirupkqnst\",\"mode\":\"ReadOnlyMount\",\"description\":\"ibjg\"},\"validationDataSize\":70.27294181684461}") - .toObject(ImageVertical.class); - Assertions.assertEquals(1994872439, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT128H24M14S"), model.limitSettings().timeout()); - Assertions.assertEquals(963869601, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(676982942, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(1015925891, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("ibjg", model.validationData().description()); - Assertions.assertEquals("nirupkqnst", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(70.27294181684461D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageVertical model - = new ImageVertical() - .withLimitSettings(new ImageLimitSettings().withMaxTrials(1994872439) - .withTimeout(Duration.parse("PT128H24M14S")) - .withMaxConcurrentTrials(963869601)) - .withSweepSettings( - new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.RANDOM) - .withEarlyTermination(new EarlyTerminationPolicy().withEvaluationInterval(676982942) - .withDelayEvaluation(1015925891))) - .withValidationData(new MLTableJobInput().withDescription("ibjg") - .withUri("nirupkqnst") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withValidationDataSize(70.27294181684461D); - model = BinaryData.fromObject(model).toObject(ImageVertical.class); - Assertions.assertEquals(1994872439, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT128H24M14S"), model.limitSettings().timeout()); - Assertions.assertEquals(963869601, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(676982942, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(1015925891, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("ibjg", model.validationData().description()); - Assertions.assertEquals("nirupkqnst", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(70.27294181684461D, model.validationDataSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IndexColumnTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IndexColumnTests.java deleted file mode 100644 index 315649dc9f16..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IndexColumnTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.IndexColumn; -import org.junit.jupiter.api.Assertions; - -public final class IndexColumnTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IndexColumn model - = BinaryData.fromString("{\"dataType\":\"Boolean\",\"columnName\":\"srsx\"}").toObject(IndexColumn.class); - Assertions.assertEquals(FeatureDataType.BOOLEAN, model.dataType()); - Assertions.assertEquals("srsx", model.columnName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IndexColumn model = new IndexColumn().withDataType(FeatureDataType.BOOLEAN).withColumnName("srsx"); - model = BinaryData.fromObject(model).toObject(IndexColumn.class); - Assertions.assertEquals(FeatureDataType.BOOLEAN, model.dataType()); - Assertions.assertEquals("srsx", model.columnName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceContainerPropertiesTests.java deleted file mode 100644 index 50c06facefb0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceContainerPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.Route; -import org.junit.jupiter.api.Assertions; - -public final class InferenceContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InferenceContainerProperties model = BinaryData.fromString( - "{\"livenessRoute\":{\"path\":\"lnacgcc\",\"port\":682130924},\"readinessRoute\":{\"path\":\"hxkizvytnrzv\",\"port\":349650849},\"scoringRoute\":{\"path\":\"r\",\"port\":2075017284}}") - .toObject(InferenceContainerProperties.class); - Assertions.assertEquals("lnacgcc", model.livenessRoute().path()); - Assertions.assertEquals(682130924, model.livenessRoute().port()); - Assertions.assertEquals("hxkizvytnrzv", model.readinessRoute().path()); - Assertions.assertEquals(349650849, model.readinessRoute().port()); - Assertions.assertEquals("r", model.scoringRoute().path()); - Assertions.assertEquals(2075017284, model.scoringRoute().port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InferenceContainerProperties model - = new InferenceContainerProperties().withLivenessRoute(new Route().withPath("lnacgcc").withPort(682130924)) - .withReadinessRoute(new Route().withPath("hxkizvytnrzv").withPort(349650849)) - .withScoringRoute(new Route().withPath("r").withPort(2075017284)); - model = BinaryData.fromObject(model).toObject(InferenceContainerProperties.class); - Assertions.assertEquals("lnacgcc", model.livenessRoute().path()); - Assertions.assertEquals(682130924, model.livenessRoute().port()); - Assertions.assertEquals("hxkizvytnrzv", model.readinessRoute().path()); - Assertions.assertEquals(349650849, model.readinessRoute().port()); - Assertions.assertEquals("r", model.scoringRoute().path()); - Assertions.assertEquals(2075017284, model.scoringRoute().port()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaResourcesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaResourcesTests.java deleted file mode 100644 index fae7e25b9dbf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaResourcesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class InstanceTypeSchemaResourcesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InstanceTypeSchemaResources model = BinaryData.fromString( - "{\"requests\":{\"mdlgy\":\"mw\",\"gnqfqqdlcvmyol\":\"ixokwtjawhv\",\"nzyzawatuwqko\":\"aymjchtvsnvlaq\",\"wgwima\":\"bczothymgobllms\"},\"limits\":{\"vkhgv\":\"akhtmhobcyanrfvq\",\"ymhcctopuo\":\"ogxkfnaoa\",\"hquhczygxvhajp\":\"yrnskb\"}}") - .toObject(InstanceTypeSchemaResources.class); - Assertions.assertEquals("mw", model.requests().get("mdlgy")); - Assertions.assertEquals("akhtmhobcyanrfvq", model.limits().get("vkhgv")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InstanceTypeSchemaResources model = new InstanceTypeSchemaResources() - .withRequests(mapOf("mdlgy", "mw", "gnqfqqdlcvmyol", "ixokwtjawhv", "nzyzawatuwqko", "aymjchtvsnvlaq", - "wgwima", "bczothymgobllms")) - .withLimits(mapOf("vkhgv", "akhtmhobcyanrfvq", "ymhcctopuo", "ogxkfnaoa", "hquhczygxvhajp", "yrnskb")); - model = BinaryData.fromObject(model).toObject(InstanceTypeSchemaResources.class); - Assertions.assertEquals("mw", model.requests().get("mdlgy")); - Assertions.assertEquals("akhtmhobcyanrfvq", model.limits().get("vkhgv")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaTests.java deleted file mode 100644 index 617c9326a2fa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class InstanceTypeSchemaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InstanceTypeSchema model = BinaryData.fromString( - "{\"nodeSelector\":{\"q\":\"vl\",\"nthbbnkgzukwd\":\"xyrqo\"},\"resources\":{\"requests\":{\"mlfuyfjbp\":\"jthfceyjnc\",\"yjmqrf\":\"iddhlrufzc\"},\"limits\":{\"rsazrhxud\":\"cuselq\",\"jmr\":\"qmdtffi\"}}}") - .toObject(InstanceTypeSchema.class); - Assertions.assertEquals("vl", model.nodeSelector().get("q")); - Assertions.assertEquals("jthfceyjnc", model.resources().requests().get("mlfuyfjbp")); - Assertions.assertEquals("cuselq", model.resources().limits().get("rsazrhxud")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InstanceTypeSchema model - = new InstanceTypeSchema().withNodeSelector(mapOf("q", "vl", "nthbbnkgzukwd", "xyrqo")) - .withResources(new InstanceTypeSchemaResources() - .withRequests(mapOf("mlfuyfjbp", "jthfceyjnc", "yjmqrf", "iddhlrufzc")) - .withLimits(mapOf("rsazrhxud", "cuselq", "jmr", "qmdtffi"))); - model = BinaryData.fromObject(model).toObject(InstanceTypeSchema.class); - Assertions.assertEquals("vl", model.nodeSelector().get("q")); - Assertions.assertEquals("jthfceyjnc", model.resources().requests().get("mlfuyfjbp")); - Assertions.assertEquals("cuselq", model.resources().limits().get("rsazrhxud")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseInnerTests.java deleted file mode 100644 index bc33c602dee3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.Nodes; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobBaseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobBaseInner model = BinaryData.fromString( - "{\"properties\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"agxnvhycvdimw\",\"status\":\"CancelRequested\",\"experimentName\":\"gzgy\",\"services\":{\"auzpjlx\":{\"jobServiceType\":\"rw\",\"port\":1907482272,\"endpoint\":\"ye\",\"status\":\"kdhmeottawjyosx\",\"errorMessage\":\"hnhjtfvpndpmi\",\"properties\":{\"l\":\"nwynudq\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"abnsmj\":{\"jobServiceType\":\"huxiqhzlraymez\",\"port\":161523803,\"endpoint\":\"ihmxrfdsajredn\",\"status\":\"yshtuwgmev\",\"errorMessage\":\"fpwzyifrkgwltx\",\"properties\":{\"r\":\"pxgzdyimsfayor\",\"oge\":\"vk\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"f\":{\"jobServiceType\":\"ynq\",\"port\":1693738620,\"endpoint\":\"qs\",\"status\":\"vwjtqpkevmyltjc\",\"errorMessage\":\"pxklurccl\",\"properties\":{\"gpxvkqmaupxvpi\":\"annnoytzposewx\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"fyzyzeyuub\",\"isArchived\":false,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"l\",\"notificationSetting\":{\"emails\":[\"ith\",\"ygvfltgvdihoyn\"],\"emailOn\":[\"JobCancelled\",\"JobFailed\",\"JobCompleted\",\"JobFailed\"],\"webhooks\":{\"ucpcunnuzdqumoen\":{\"webhookType\":\"Webhook\",\"eventType\":\"cy\"},\"hqhsknd\":{\"webhookType\":\"Webhook\",\"eventType\":\"naie\"},\"anniyopetxivcnr\":{\"webhookType\":\"Webhook\",\"eventType\":\"lqkaadlknwf\"}}},\"description\":\"xnucaephblkwqp\",\"tags\":{\"uzqymtuowog\":\"bqsdtcjbctvi\",\"vbrzcdb\":\"gitsqh\"},\"properties\":{\"rdjyibqb\":\"zndscxmxeatkdbmw\",\"alfihcjmobcancd\":\"aomhjrmkuhmaxl\",\"vaknokzwjj\":\"xxqcwgaxf\",\"tixldzyyfytpqs\":\"r\"}},\"id\":\"ymmpujivy\",\"name\":\"lkjuvsmbmslzoyov\",\"type\":\"zdbpqv\"}") - .toObject(JobBaseInner.class); - Assertions.assertEquals("xnucaephblkwqp", model.properties().description()); - Assertions.assertEquals("bqsdtcjbctvi", model.properties().tags().get("uzqymtuowog")); - Assertions.assertEquals("zndscxmxeatkdbmw", model.properties().properties().get("rdjyibqb")); - Assertions.assertEquals("agxnvhycvdimw", model.properties().displayName()); - Assertions.assertEquals("gzgy", model.properties().experimentName()); - Assertions.assertEquals("rw", model.properties().services().get("auzpjlx").jobServiceType()); - Assertions.assertEquals(1907482272, model.properties().services().get("auzpjlx").port()); - Assertions.assertEquals("ye", model.properties().services().get("auzpjlx").endpoint()); - Assertions.assertEquals("nwynudq", model.properties().services().get("auzpjlx").properties().get("l")); - Assertions.assertEquals("fyzyzeyuub", model.properties().computeId()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("l", model.properties().componentId()); - Assertions.assertEquals("ith", model.properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - model.properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("cy", - model.properties().notificationSetting().webhooks().get("ucpcunnuzdqumoen").eventType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobBaseInner model = new JobBaseInner().withProperties(new JobBaseProperties().withDescription("xnucaephblkwqp") - .withTags(mapOf("uzqymtuowog", "bqsdtcjbctvi", "vbrzcdb", "gitsqh")) - .withProperties(mapOf("rdjyibqb", "zndscxmxeatkdbmw", "alfihcjmobcancd", "aomhjrmkuhmaxl", "vaknokzwjj", - "xxqcwgaxf", "tixldzyyfytpqs", "r")) - .withDisplayName("agxnvhycvdimw") - .withExperimentName("gzgy") - .withServices(mapOf("auzpjlx", - new JobService().withJobServiceType("rw") - .withPort(1907482272) - .withEndpoint("ye") - .withProperties(mapOf("l", "nwynudq")) - .withNodes(new Nodes()), - "abnsmj", - new JobService().withJobServiceType("huxiqhzlraymez") - .withPort(161523803) - .withEndpoint("ihmxrfdsajredn") - .withProperties(mapOf("r", "pxgzdyimsfayor", "oge", "vk")) - .withNodes(new Nodes()), - "f", - new JobService().withJobServiceType("ynq") - .withPort(1693738620) - .withEndpoint("qs") - .withProperties(mapOf("gpxvkqmaupxvpi", "annnoytzposewx")) - .withNodes(new Nodes()))) - .withComputeId("fyzyzeyuub") - .withIsArchived(false) - .withIdentity(new IdentityConfiguration()) - .withComponentId("l") - .withNotificationSetting(new NotificationSetting().withEmails(Arrays.asList("ith", "ygvfltgvdihoyn")) - .withEmailOn( - Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED, EmailNotificationEnableType.JOB_FAILED, - EmailNotificationEnableType.JOB_COMPLETED, EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("ucpcunnuzdqumoen", new Webhook().withEventType("cy"), "hqhsknd", - new Webhook().withEventType("naie"), "anniyopetxivcnr", - new Webhook().withEventType("lqkaadlknwf"))))); - model = BinaryData.fromObject(model).toObject(JobBaseInner.class); - Assertions.assertEquals("xnucaephblkwqp", model.properties().description()); - Assertions.assertEquals("bqsdtcjbctvi", model.properties().tags().get("uzqymtuowog")); - Assertions.assertEquals("zndscxmxeatkdbmw", model.properties().properties().get("rdjyibqb")); - Assertions.assertEquals("agxnvhycvdimw", model.properties().displayName()); - Assertions.assertEquals("gzgy", model.properties().experimentName()); - Assertions.assertEquals("rw", model.properties().services().get("auzpjlx").jobServiceType()); - Assertions.assertEquals(1907482272, model.properties().services().get("auzpjlx").port()); - Assertions.assertEquals("ye", model.properties().services().get("auzpjlx").endpoint()); - Assertions.assertEquals("nwynudq", model.properties().services().get("auzpjlx").properties().get("l")); - Assertions.assertEquals("fyzyzeyuub", model.properties().computeId()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("l", model.properties().componentId()); - Assertions.assertEquals("ith", model.properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - model.properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("cy", - model.properties().notificationSetting().webhooks().get("ucpcunnuzdqumoen").eventType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBasePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBasePropertiesTests.java deleted file mode 100644 index d3c47d6ab966..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBasePropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.Nodes; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobBasePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobBaseProperties model = BinaryData.fromString( - "{\"jobType\":\"JobBaseProperties\",\"displayName\":\"efgv\",\"status\":\"Preparing\",\"experimentName\":\"kcvtl\",\"services\":{\"kalehp\":{\"jobServiceType\":\"skvcuartrhunl\",\"port\":1593194036,\"endpoint\":\"kycndzfqivjreuy\",\"status\":\"bmnwa\",\"errorMessage\":\"tbxoee\",\"properties\":{\"myymvqdbpbhfckdv\":\"lnf\",\"b\":\"zcrcssbzhddubbnq\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"chkhufm\":{\"jobServiceType\":\"awugiqjti\",\"port\":837547009,\"endpoint\":\"dminic\",\"status\":\"eajohiyg\",\"errorMessage\":\"n\",\"properties\":{\"qcs\":\"hpczykmktpvw\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"sruqnmdvha\":{\"jobServiceType\":\"umqy\",\"port\":1595572928,\"endpoint\":\"zulo\",\"status\":\"aeuzanh\",\"errorMessage\":\"nhsenwphpzfng\",\"properties\":{\"fwbeqrkuorh\":\"lidftujwjj\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"vjytiqswbq\",\"isArchived\":false,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"iytxt\",\"notificationSetting\":{\"emails\":[\"vlbpktgdstyou\",\"mbewreswmo\",\"egmmuteyxe\",\"guqigijiitns\"],\"emailOn\":[\"JobFailed\"],\"webhooks\":{\"jwaiuf\":{\"webhookType\":\"Webhook\",\"eventType\":\"ygr\"}}},\"description\":\"raybfueqfr\",\"tags\":{\"ydkygywezskieca\":\"ydgr\",\"ixqcahyhxalybxaw\":\"ygzmxieqvdsmak\",\"jodqhykincn\":\"ijpodtblxpkkwj\"},\"properties\":{\"qodkadppyibngql\":\"ehllizhceum\",\"wrxwhydtl\":\"d\",\"uyem\":\"vvadswzs\"}}") - .toObject(JobBaseProperties.class); - Assertions.assertEquals("raybfueqfr", model.description()); - Assertions.assertEquals("ydgr", model.tags().get("ydkygywezskieca")); - Assertions.assertEquals("ehllizhceum", model.properties().get("qodkadppyibngql")); - Assertions.assertEquals("efgv", model.displayName()); - Assertions.assertEquals("kcvtl", model.experimentName()); - Assertions.assertEquals("skvcuartrhunl", model.services().get("kalehp").jobServiceType()); - Assertions.assertEquals(1593194036, model.services().get("kalehp").port()); - Assertions.assertEquals("kycndzfqivjreuy", model.services().get("kalehp").endpoint()); - Assertions.assertEquals("lnf", model.services().get("kalehp").properties().get("myymvqdbpbhfckdv")); - Assertions.assertEquals("vjytiqswbq", model.computeId()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("iytxt", model.componentId()); - Assertions.assertEquals("vlbpktgdstyou", model.notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("ygr", model.notificationSetting().webhooks().get("jwaiuf").eventType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobBaseProperties model = new JobBaseProperties().withDescription("raybfueqfr") - .withTags( - mapOf("ydkygywezskieca", "ydgr", "ixqcahyhxalybxaw", "ygzmxieqvdsmak", "jodqhykincn", "ijpodtblxpkkwj")) - .withProperties(mapOf("qodkadppyibngql", "ehllizhceum", "wrxwhydtl", "d", "uyem", "vvadswzs")) - .withDisplayName("efgv") - .withExperimentName("kcvtl") - .withServices(mapOf("kalehp", - new JobService().withJobServiceType("skvcuartrhunl") - .withPort(1593194036) - .withEndpoint("kycndzfqivjreuy") - .withProperties(mapOf("myymvqdbpbhfckdv", "lnf", "b", "zcrcssbzhddubbnq")) - .withNodes(new Nodes()), - "chkhufm", - new JobService().withJobServiceType("awugiqjti") - .withPort(837547009) - .withEndpoint("dminic") - .withProperties(mapOf("qcs", "hpczykmktpvw")) - .withNodes(new Nodes()), - "sruqnmdvha", - new JobService().withJobServiceType("umqy") - .withPort(1595572928) - .withEndpoint("zulo") - .withProperties(mapOf("fwbeqrkuorh", "lidftujwjj")) - .withNodes(new Nodes()))) - .withComputeId("vjytiqswbq") - .withIsArchived(false) - .withIdentity(new IdentityConfiguration()) - .withComponentId("iytxt") - .withNotificationSetting(new NotificationSetting() - .withEmails(Arrays.asList("vlbpktgdstyou", "mbewreswmo", "egmmuteyxe", "guqigijiitns")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("jwaiuf", new Webhook().withEventType("ygr")))); - model = BinaryData.fromObject(model).toObject(JobBaseProperties.class); - Assertions.assertEquals("raybfueqfr", model.description()); - Assertions.assertEquals("ydgr", model.tags().get("ydkygywezskieca")); - Assertions.assertEquals("ehllizhceum", model.properties().get("qodkadppyibngql")); - Assertions.assertEquals("efgv", model.displayName()); - Assertions.assertEquals("kcvtl", model.experimentName()); - Assertions.assertEquals("skvcuartrhunl", model.services().get("kalehp").jobServiceType()); - Assertions.assertEquals(1593194036, model.services().get("kalehp").port()); - Assertions.assertEquals("kycndzfqivjreuy", model.services().get("kalehp").endpoint()); - Assertions.assertEquals("lnf", model.services().get("kalehp").properties().get("myymvqdbpbhfckdv")); - Assertions.assertEquals("vjytiqswbq", model.computeId()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("iytxt", model.componentId()); - Assertions.assertEquals("vlbpktgdstyou", model.notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("ygr", model.notificationSetting().webhooks().get("jwaiuf").eventType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseResourceArmPaginatedResultTests.java deleted file mode 100644 index ae19cb7ea066..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobBaseResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.Nodes; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobBaseResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobBaseResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"bjazejwwviy\",\"status\":\"Completed\",\"experimentName\":\"uhbrnnhjxsq\",\"services\":{\"umtggmuwdchozfn\":{\"jobServiceType\":\"kbiwetpozyc\",\"port\":1973801888,\"endpoint\":\"yhgfsetzle\",\"status\":\"sfledyn\",\"errorMessage\":\"pziuwfbzkkdtnh\",\"properties\":{\"pkpbafvafhlbylcc\":\"cljse\",\"fwrsofpltdbmair\":\"evxrhyz\",\"pqigtuujwouhd\":\"hvhfnracw\",\"bvitvqkjya\":\"wsigrbjbxsj\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"exlvxnoakiz\",\"isArchived\":false,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"naqln\",\"notificationSetting\":{\"emails\":[\"uyxlykwphvxzcw\",\"hmpejtlkexaonw\"],\"emailOn\":[\"JobFailed\"],\"webhooks\":{\"rxhxkn\":{\"webhookType\":\"Webhook\"}}},\"description\":\"crmmkyupijuby\",\"tags\":{\"em\":\"kakfqfr\"},\"properties\":{\"dxphlk\":\"dudxjascowvfdjk\",\"dkz\":\"snmgzvyfi\",\"uqwqulsutrjbhxyk\":\"qnwsithuqolyah\"}},\"id\":\"y\",\"name\":\"ezvqq\",\"type\":\"g\"},{\"properties\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"ftbcvexreuquow\",\"status\":\"Preparing\",\"experimentName\":\"fwhreagkhyxv\",\"services\":{\"l\":{\"jobServiceType\":\"bczsulmdgglmepjp\",\"port\":1660253828,\"endpoint\":\"kgsangpszng\",\"status\":\"p\",\"errorMessage\":\"lkvec\",\"properties\":{\"foknubnoitp\":\"cngoadyedmzrg\",\"rgdg\":\"pz\",\"we\":\"vcoqraswugyxpqi\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"ckbbcc\":{\"jobServiceType\":\"skbuhzaca\",\"port\":149181411,\"endpoint\":\"tco\",\"status\":\"ujpdsxzak\",\"errorMessage\":\"jkmvbi\",\"properties\":{\"bemyeji\":\"ofqcvovjufycsjm\",\"rtudawlpjfel\":\"iuxegth\",\"bgqnz\":\"erppt\",\"ialwc\":\"nhii\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"iua\":{\"jobServiceType\":\"zpraoxn\",\"port\":606416580,\"endpoint\":\"a\",\"status\":\"gftipwc\",\"errorMessage\":\"yubhiqdx\",\"properties\":{\"gbylbuig\":\"npnuhzafccnuhi\",\"dlbnbqxvhcsy\":\"xvatvcr\",\"xdndsbdweaderzm\":\"zlwxaeaovur\",\"ttmvmmagoaqylkjz\":\"ntopa\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"cgm\",\"isArchived\":true,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"inzcpdltkrlgj\",\"notificationSetting\":{\"emails\":[\"rvcqguefzhomphe\",\"durelyujl\",\"youmpc\"],\"emailOn\":[\"JobCompleted\",\"JobCancelled\",\"JobCompleted\",\"JobCompleted\"],\"webhooks\":{\"ptajbrzmq\":{\"webhookType\":\"Webhook\"},\"ucycijo\":{\"webhookType\":\"Webhook\"}}},\"description\":\"xiutgjcyzyzj\",\"tags\":{\"fwwvuatbwbqam\":\"qjbtxjeaoqaqbzgy\"},\"properties\":{\"pkcvmwf\":\"liys\",\"pmywbormcq\":\"uxx\",\"mcsmyqwixvcp\":\"iciijqpkzfbojx\"}},\"id\":\"kwywzwofalic\",\"name\":\"duoiqt\",\"type\":\"mt\"}],\"nextLink\":\"sknxrwzawnvsbcf\"}") - .toObject(JobBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("crmmkyupijuby", model.value().get(0).properties().description()); - Assertions.assertEquals("kakfqfr", model.value().get(0).properties().tags().get("em")); - Assertions.assertEquals("dudxjascowvfdjk", model.value().get(0).properties().properties().get("dxphlk")); - Assertions.assertEquals("bjazejwwviy", model.value().get(0).properties().displayName()); - Assertions.assertEquals("uhbrnnhjxsq", model.value().get(0).properties().experimentName()); - Assertions.assertEquals("kbiwetpozyc", - model.value().get(0).properties().services().get("umtggmuwdchozfn").jobServiceType()); - Assertions.assertEquals(1973801888, model.value().get(0).properties().services().get("umtggmuwdchozfn").port()); - Assertions.assertEquals("yhgfsetzle", - model.value().get(0).properties().services().get("umtggmuwdchozfn").endpoint()); - Assertions.assertEquals("cljse", - model.value().get(0).properties().services().get("umtggmuwdchozfn").properties().get("pkpbafvafhlbylcc")); - Assertions.assertEquals("exlvxnoakiz", model.value().get(0).properties().computeId()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("naqln", model.value().get(0).properties().componentId()); - Assertions.assertEquals("uyxlykwphvxzcw", - model.value().get(0).properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, - model.value().get(0).properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("sknxrwzawnvsbcf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobBaseResourceArmPaginatedResult model = new JobBaseResourceArmPaginatedResult() - .withValue(Arrays.asList( - new JobBaseInner().withProperties(new JobBaseProperties().withDescription("crmmkyupijuby") - .withTags(mapOf("em", "kakfqfr")) - .withProperties( - mapOf("dxphlk", "dudxjascowvfdjk", "dkz", "snmgzvyfi", "uqwqulsutrjbhxyk", "qnwsithuqolyah")) - .withDisplayName("bjazejwwviy") - .withExperimentName("uhbrnnhjxsq") - .withServices(mapOf("umtggmuwdchozfn", - new JobService().withJobServiceType("kbiwetpozyc") - .withPort(1973801888) - .withEndpoint("yhgfsetzle") - .withProperties(mapOf("pkpbafvafhlbylcc", "cljse", "fwrsofpltdbmair", "evxrhyz", - "pqigtuujwouhd", "hvhfnracw", "bvitvqkjya", "wsigrbjbxsj")) - .withNodes(new Nodes()))) - .withComputeId("exlvxnoakiz") - .withIsArchived(false) - .withIdentity(new IdentityConfiguration()) - .withComponentId("naqln") - .withNotificationSetting(new NotificationSetting() - .withEmails(Arrays.asList("uyxlykwphvxzcw", "hmpejtlkexaonw")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("rxhxkn", new Webhook())))), - new JobBaseInner().withProperties(new JobBaseProperties().withDescription("xiutgjcyzyzj") - .withTags(mapOf("fwwvuatbwbqam", "qjbtxjeaoqaqbzgy")) - .withProperties(mapOf("pkcvmwf", "liys", "pmywbormcq", "uxx", "mcsmyqwixvcp", "iciijqpkzfbojx")) - .withDisplayName("ftbcvexreuquow") - .withExperimentName("fwhreagkhyxv") - .withServices(mapOf("l", - new JobService().withJobServiceType("bczsulmdgglmepjp") - .withPort(1660253828) - .withEndpoint("kgsangpszng") - .withProperties( - mapOf("foknubnoitp", "cngoadyedmzrg", "rgdg", "pz", "we", "vcoqraswugyxpqi")) - .withNodes(new Nodes()), - "ckbbcc", - new JobService().withJobServiceType("skbuhzaca") - .withPort(149181411) - .withEndpoint("tco") - .withProperties(mapOf("bemyeji", "ofqcvovjufycsjm", "rtudawlpjfel", "iuxegth", "bgqnz", - "erppt", "ialwc", "nhii")) - .withNodes(new Nodes()), - "iua", - new JobService().withJobServiceType("zpraoxn") - .withPort(606416580) - .withEndpoint("a") - .withProperties(mapOf("gbylbuig", "npnuhzafccnuhi", "dlbnbqxvhcsy", "xvatvcr", - "xdndsbdweaderzm", "zlwxaeaovur", "ttmvmmagoaqylkjz", "ntopa")) - .withNodes(new Nodes()))) - .withComputeId("cgm") - .withIsArchived(true) - .withIdentity(new IdentityConfiguration()) - .withComponentId("inzcpdltkrlgj") - .withNotificationSetting( - new NotificationSetting().withEmails(Arrays.asList("rvcqguefzhomphe", "durelyujl", "youmpc")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, - EmailNotificationEnableType.JOB_CANCELLED, EmailNotificationEnableType.JOB_COMPLETED, - EmailNotificationEnableType.JOB_COMPLETED)) - .withWebhooks(mapOf("ptajbrzmq", new Webhook(), "ucycijo", new Webhook())))))) - .withNextLink("sknxrwzawnvsbcf"); - model = BinaryData.fromObject(model).toObject(JobBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("crmmkyupijuby", model.value().get(0).properties().description()); - Assertions.assertEquals("kakfqfr", model.value().get(0).properties().tags().get("em")); - Assertions.assertEquals("dudxjascowvfdjk", model.value().get(0).properties().properties().get("dxphlk")); - Assertions.assertEquals("bjazejwwviy", model.value().get(0).properties().displayName()); - Assertions.assertEquals("uhbrnnhjxsq", model.value().get(0).properties().experimentName()); - Assertions.assertEquals("kbiwetpozyc", - model.value().get(0).properties().services().get("umtggmuwdchozfn").jobServiceType()); - Assertions.assertEquals(1973801888, model.value().get(0).properties().services().get("umtggmuwdchozfn").port()); - Assertions.assertEquals("yhgfsetzle", - model.value().get(0).properties().services().get("umtggmuwdchozfn").endpoint()); - Assertions.assertEquals("cljse", - model.value().get(0).properties().services().get("umtggmuwdchozfn").properties().get("pkpbafvafhlbylcc")); - Assertions.assertEquals("exlvxnoakiz", model.value().get(0).properties().computeId()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("naqln", model.value().get(0).properties().componentId()); - Assertions.assertEquals("uyxlykwphvxzcw", - model.value().get(0).properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, - model.value().get(0).properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("sknxrwzawnvsbcf", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobInputTests.java deleted file mode 100644 index e51367b1c7e8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobInputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobInput; -import org.junit.jupiter.api.Assertions; - -public final class JobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobInput model - = BinaryData.fromString("{\"jobInputType\":\"JobInput\",\"description\":\"c\"}").toObject(JobInput.class); - Assertions.assertEquals("c", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobInput model = new JobInput().withDescription("c"); - model = BinaryData.fromObject(model).toObject(JobInput.class); - Assertions.assertEquals("c", model.description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobLimitsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobLimitsTests.java deleted file mode 100644 index 91ca0dca3536..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobLimitsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobLimits; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class JobLimitsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobLimits model = BinaryData.fromString("{\"jobLimitsType\":\"JobLimits\",\"timeout\":\"PT90H5M41S\"}") - .toObject(JobLimits.class); - Assertions.assertEquals(Duration.parse("PT90H5M41S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobLimits model = new JobLimits().withTimeout(Duration.parse("PT90H5M41S")); - model = BinaryData.fromObject(model).toObject(JobLimits.class); - Assertions.assertEquals(Duration.parse("PT90H5M41S"), model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobOutputTests.java deleted file mode 100644 index cb466915ff1d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobOutputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobOutput; -import org.junit.jupiter.api.Assertions; - -public final class JobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobOutput model = BinaryData.fromString("{\"jobOutputType\":\"JobOutput\",\"description\":\"o\"}") - .toObject(JobOutput.class); - Assertions.assertEquals("o", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobOutput model = new JobOutput().withDescription("o"); - model = BinaryData.fromObject(model).toObject(JobOutput.class); - Assertions.assertEquals("o", model.description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourceConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourceConfigurationTests.java deleted file mode 100644 index a72127c5c662..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourceConfigurationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobResourceConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobResourceConfiguration model = BinaryData.fromString( - "{\"shmSize\":\"ocfkumcfjxoky\",\"dockerArgs\":\"syasvfnkwmygjjek\",\"instanceCount\":713077193,\"instanceType\":\"drugjqyc\",\"properties\":{\"r\":\"dataxkrdtul\",\"tcsubmzoo\":\"datajdkl\",\"hdyslbklglm\":\"datasvobchkxfp\",\"yqshwyqxridtt\":\"datankkw\"}}") - .toObject(JobResourceConfiguration.class); - Assertions.assertEquals(713077193, model.instanceCount()); - Assertions.assertEquals("drugjqyc", model.instanceType()); - Assertions.assertEquals("ocfkumcfjxoky", model.shmSize()); - Assertions.assertEquals("syasvfnkwmygjjek", model.dockerArgs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobResourceConfiguration model = new JobResourceConfiguration().withInstanceCount(713077193) - .withInstanceType("drugjqyc") - .withProperties(mapOf("r", "dataxkrdtul", "tcsubmzoo", "datajdkl", "hdyslbklglm", "datasvobchkxfp", - "yqshwyqxridtt", "datankkw")) - .withShmSize("ocfkumcfjxoky") - .withDockerArgs("syasvfnkwmygjjek"); - model = BinaryData.fromObject(model).toObject(JobResourceConfiguration.class); - Assertions.assertEquals(713077193, model.instanceCount()); - Assertions.assertEquals("drugjqyc", model.instanceType()); - Assertions.assertEquals("ocfkumcfjxoky", model.shmSize()); - Assertions.assertEquals("syasvfnkwmygjjek", model.dockerArgs()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobScheduleActionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobScheduleActionTests.java deleted file mode 100644 index 0f89d727f4c1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobScheduleActionTests.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobScheduleAction; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.Nodes; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobScheduleActionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobScheduleAction model = BinaryData.fromString( - "{\"actionType\":\"CreateJob\",\"jobDefinition\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"fkbzbfbxjblajy\",\"status\":\"Preparing\",\"experimentName\":\"ycsbtoi\",\"services\":{\"rgihlnzffewv\":{\"jobServiceType\":\"jmofs\",\"port\":2075523091,\"endpoint\":\"gnywxu\",\"status\":\"lfj\",\"errorMessage\":\"gwtmszcf\",\"properties\":{\"pagknxma\":\"peqregfur\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"pwwvmbjecfw\":{\"jobServiceType\":\"ycjcgeipqxxsdy\",\"port\":521155711,\"endpoint\":\"ydsmmabh\",\"status\":\"lejqzhpvhxp\",\"errorMessage\":\"djze\",\"properties\":{\"ogtqscj\":\"gf\",\"cuex\":\"vqerqxkomwdzpzl\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"aagwiijcfqiywhxp\":{\"jobServiceType\":\"ghnkfrwxohlydsn\",\"port\":935936431,\"endpoint\":\"hiypbfhmihi\",\"status\":\"qozewbr\",\"errorMessage\":\"jzgkbrauxbo\",\"properties\":{\"uudrizwkwkjxlaac\":\"nnqbjxgjwsreruk\",\"evgb\":\"dikqelssybz\",\"zyjj\":\"rommkiqhypwt\",\"omzq\":\"u\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"kcu\":{\"jobServiceType\":\"apialezaydpuzu\",\"port\":301398329,\"endpoint\":\"fxlie\",\"status\":\"ot\",\"errorMessage\":\"mhssfnwh\",\"properties\":{\"ckn\":\"hh\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"hdgwuzrono\",\"isArchived\":false,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"kdnwy\",\"notificationSetting\":{\"emails\":[\"ikgxkkzz\",\"zdjekebawnx\"],\"emailOn\":[\"JobCompleted\",\"JobFailed\"],\"webhooks\":{\"ulp\":{\"webhookType\":\"Webhook\",\"eventType\":\"irgcjfai\"},\"qnfforxsqtzngxbs\":{\"webhookType\":\"Webhook\",\"eventType\":\"akrxi\"},\"xcmmhipbvskcitly\":{\"webhookType\":\"Webhook\",\"eventType\":\"ewg\"}}},\"description\":\"wfsaa\",\"tags\":{\"c\":\"gb\"},\"properties\":{\"ajklnac\":\"idyli\",\"rjjaojpz\":\"dnxqeonm\"}}}") - .toObject(JobScheduleAction.class); - Assertions.assertEquals("wfsaa", model.jobDefinition().description()); - Assertions.assertEquals("gb", model.jobDefinition().tags().get("c")); - Assertions.assertEquals("idyli", model.jobDefinition().properties().get("ajklnac")); - Assertions.assertEquals("fkbzbfbxjblajy", model.jobDefinition().displayName()); - Assertions.assertEquals("ycsbtoi", model.jobDefinition().experimentName()); - Assertions.assertEquals("jmofs", model.jobDefinition().services().get("rgihlnzffewv").jobServiceType()); - Assertions.assertEquals(2075523091, model.jobDefinition().services().get("rgihlnzffewv").port()); - Assertions.assertEquals("gnywxu", model.jobDefinition().services().get("rgihlnzffewv").endpoint()); - Assertions.assertEquals("peqregfur", - model.jobDefinition().services().get("rgihlnzffewv").properties().get("pagknxma")); - Assertions.assertEquals("hdgwuzrono", model.jobDefinition().computeId()); - Assertions.assertEquals(false, model.jobDefinition().isArchived()); - Assertions.assertEquals("kdnwy", model.jobDefinition().componentId()); - Assertions.assertEquals("ikgxkkzz", model.jobDefinition().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, - model.jobDefinition().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("irgcjfai", - model.jobDefinition().notificationSetting().webhooks().get("ulp").eventType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobScheduleAction model = new JobScheduleAction().withJobDefinition(new JobBaseProperties() - .withDescription("wfsaa") - .withTags(mapOf("c", "gb")) - .withProperties(mapOf("ajklnac", "idyli", "rjjaojpz", "dnxqeonm")) - .withDisplayName("fkbzbfbxjblajy") - .withExperimentName("ycsbtoi") - .withServices(mapOf("rgihlnzffewv", - new JobService().withJobServiceType("jmofs") - .withPort(2075523091) - .withEndpoint("gnywxu") - .withProperties(mapOf("pagknxma", "peqregfur")) - .withNodes(new Nodes()), - "pwwvmbjecfw", - new JobService().withJobServiceType("ycjcgeipqxxsdy") - .withPort(521155711) - .withEndpoint("ydsmmabh") - .withProperties(mapOf("ogtqscj", "gf", "cuex", "vqerqxkomwdzpzl")) - .withNodes(new Nodes()), - "aagwiijcfqiywhxp", - new JobService().withJobServiceType("ghnkfrwxohlydsn") - .withPort(935936431) - .withEndpoint("hiypbfhmihi") - .withProperties(mapOf("uudrizwkwkjxlaac", "nnqbjxgjwsreruk", "evgb", "dikqelssybz", "zyjj", - "rommkiqhypwt", "omzq", "u")) - .withNodes(new Nodes()), - "kcu", - new JobService().withJobServiceType("apialezaydpuzu") - .withPort(301398329) - .withEndpoint("fxlie") - .withProperties(mapOf("ckn", "hh")) - .withNodes(new Nodes()))) - .withComputeId("hdgwuzrono") - .withIsArchived(false) - .withIdentity(new IdentityConfiguration()) - .withComponentId("kdnwy") - .withNotificationSetting(new NotificationSetting().withEmails(Arrays.asList("ikgxkkzz", "zdjekebawnx")) - .withEmailOn( - Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("ulp", new Webhook().withEventType("irgcjfai"), "qnfforxsqtzngxbs", - new Webhook().withEventType("akrxi"), "xcmmhipbvskcitly", new Webhook().withEventType("ewg"))))); - model = BinaryData.fromObject(model).toObject(JobScheduleAction.class); - Assertions.assertEquals("wfsaa", model.jobDefinition().description()); - Assertions.assertEquals("gb", model.jobDefinition().tags().get("c")); - Assertions.assertEquals("idyli", model.jobDefinition().properties().get("ajklnac")); - Assertions.assertEquals("fkbzbfbxjblajy", model.jobDefinition().displayName()); - Assertions.assertEquals("ycsbtoi", model.jobDefinition().experimentName()); - Assertions.assertEquals("jmofs", model.jobDefinition().services().get("rgihlnzffewv").jobServiceType()); - Assertions.assertEquals(2075523091, model.jobDefinition().services().get("rgihlnzffewv").port()); - Assertions.assertEquals("gnywxu", model.jobDefinition().services().get("rgihlnzffewv").endpoint()); - Assertions.assertEquals("peqregfur", - model.jobDefinition().services().get("rgihlnzffewv").properties().get("pagknxma")); - Assertions.assertEquals("hdgwuzrono", model.jobDefinition().computeId()); - Assertions.assertEquals(false, model.jobDefinition().isArchived()); - Assertions.assertEquals("kdnwy", model.jobDefinition().componentId()); - Assertions.assertEquals("ikgxkkzz", model.jobDefinition().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, - model.jobDefinition().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("irgcjfai", - model.jobDefinition().notificationSetting().webhooks().get("ulp").eventType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobServiceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobServiceTests.java deleted file mode 100644 index 467104c1d539..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobServiceTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.Nodes; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobServiceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobService model = BinaryData.fromString( - "{\"jobServiceType\":\"wuowhlxlnwy\",\"port\":1884184924,\"endpoint\":\"vblgmokzk\",\"status\":\"rfowtdvrfmvlih\",\"errorMessage\":\"jdrqcrjidhftu\",\"properties\":{\"kfnjyixhafrat\":\"dxlwyojbfqz\",\"znv\":\"xmbjroum\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}") - .toObject(JobService.class); - Assertions.assertEquals("wuowhlxlnwy", model.jobServiceType()); - Assertions.assertEquals(1884184924, model.port()); - Assertions.assertEquals("vblgmokzk", model.endpoint()); - Assertions.assertEquals("dxlwyojbfqz", model.properties().get("kfnjyixhafrat")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobService model = new JobService().withJobServiceType("wuowhlxlnwy") - .withPort(1884184924) - .withEndpoint("vblgmokzk") - .withProperties(mapOf("kfnjyixhafrat", "dxlwyojbfqz", "znv", "xmbjroum")) - .withNodes(new Nodes()); - model = BinaryData.fromObject(model).toObject(JobService.class); - Assertions.assertEquals("wuowhlxlnwy", model.jobServiceType()); - Assertions.assertEquals(1884184924, model.port()); - Assertions.assertEquals("vblgmokzk", model.endpoint()); - Assertions.assertEquals("dxlwyojbfqz", model.properties().get("kfnjyixhafrat")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelMockTests.java deleted file mode 100644 index 006be11652f0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsCancelMockTests { - @Test - public void testCancel() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.jobs().cancel("bsibzmvd", "yoe", "pothtpaqmfwiesh", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index e4909bcdd5e0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBase; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.Nodes; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.Webhook; -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 reactor.core.publisher.Mono; - -public final class JobsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"fhdfo\",\"status\":\"Provisioning\",\"experimentName\":\"lcfcpzajgq\",\"services\":{\"ebolhyiohcjugd\":{\"jobServiceType\":\"meqhtngrx\",\"port\":1649257125,\"endpoint\":\"sewfbllegezvwuwi\",\"status\":\"msgg\",\"errorMessage\":\"cmazilq\",\"properties\":{\"oqpyb\":\"ip\",\"aqqqtmpgr\":\"ykmdklwbqkmtw\",\"ltwedllp\":\"c\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"ydc\":{\"jobServiceType\":\"ggxszmyxguyk\",\"port\":1274422195,\"endpoint\":\"mwzplcrzdwe\",\"status\":\"vspknxraidjeddn\",\"errorMessage\":\"n\",\"properties\":{\"tnuckojqoxpw\":\"rhcfeqjkacu\",\"doyqbpzxushmltih\":\"hvfdosq\",\"rzpggs\":\"cptvkbcykntdzze\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"mcjjxx\":{\"jobServiceType\":\"neibhztlzbwb\",\"port\":852314155,\"endpoint\":\"spkgk\",\"status\":\"pvbzmyo\",\"errorMessage\":\"xstxsfztlvs\",\"properties\":{\"yfgtwxmjdbzfiac\":\"shhcdlsowyhxwh\",\"mch\":\"wmce\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"rzzxqtcgs\":{\"jobServiceType\":\"dwmjurtnolzio\",\"port\":1365609318,\"endpoint\":\"ukeplfwykr\",\"status\":\"jenpsff\",\"errorMessage\":\"zefajgb\",\"properties\":{\"cevfbiekydk\":\"xpeuahvxfn\",\"yrvdszrizpej\":\"dkzfkneck\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"hzcicitykzyi\",\"isArchived\":true,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"gnfunh\",\"notificationSetting\":{\"emails\":[\"syiwm\",\"pkudhjztbwzjbqzq\"],\"emailOn\":[\"JobCompleted\"],\"webhooks\":{\"lkdsbekvprkwpvx\":{\"webhookType\":\"Webhook\",\"eventType\":\"zdb\"},\"zshfafbeh\":{\"webhookType\":\"Webhook\",\"eventType\":\"qcnv\"},\"eplpfrecri\":{\"webhookType\":\"Webhook\",\"eventType\":\"eiuexkpgrmwdwlr\"}}},\"description\":\"aba\",\"tags\":{\"sgpdbhbdxsjsox\":\"sizao\",\"inlgttvon\":\"uwuungdvvddrcpqu\",\"mitmtkcqixgqxs\":\"rpeli\",\"wqumecqyianjmv\":\"pevthuvupdsafqag\"},\"properties\":{\"xqtgzvzcfmwfogjr\":\"dkqffhux\"}},\"id\":\"tbpnh\",\"name\":\"o\",\"type\":\"lvfzwt\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - JobBase response = manager.jobs() - .define("ecuve") - .withExistingWorkspace("iel", "kymqmgudvy") - .withProperties(new JobBaseProperties().withDescription("mjtxwazyvi") - .withTags(mapOf("rjmwaa", "ebffkgfiyd")) - .withProperties(mapOf("jnaotavwmrfqt", "khptyhziqeo", "cyrwvoohmcw", "gdfecju")) - .withDisplayName("cwdge") - .withExperimentName("rrvjqhoehyirsv") - .withServices(mapOf("pspaxhfuwygssssj", - new JobService().withJobServiceType("xpvqpblqubfpeome") - .withPort(153862409) - .withEndpoint("eamzlqvajztsvc") - .withProperties(mapOf("moigawlojwv", "rbfvehuweuitqeyo", "jmujz", "ovjvjjuypcnbucb")) - .withNodes(new Nodes()), - "dfeyaev", - new JobService().withJobServiceType("fep") - .withPort(405179371) - .withEndpoint("sdvjv") - .withProperties(mapOf("eynxkxqnwcekqsb", "ht", "apzebje", "cad", "jbpzdwhxputka", - "wwgverbywuuvei", "rw", "l")) - .withNodes(new Nodes()), - "mtxjca", - new JobService().withJobServiceType("qfxfiyjzuqgxbo") - .withPort(91105546) - .withEndpoint("dymdypsxkw") - .withProperties(mapOf("vsi", "zclilyoixeeiznqi")) - .withNodes(new Nodes()), - "vncxtnbutytoaini", - new JobService().withJobServiceType("sjuqqtzrnubodgou") - .withPort(1627288021) - .withEndpoint("npgugrjx") - .withProperties(mapOf("bafiqxomevketa", "tipkdb")) - .withNodes(new Nodes()))) - .withComputeId("xhzqgbaqvqe") - .withIsArchived(false) - .withIdentity(new IdentityConfiguration()) - .withComponentId("obkrgryfnbx") - .withNotificationSetting(new NotificationSetting().withEmails(Arrays.asList("yszhxoth", "yifjufzlg")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED)) - .withWebhooks(mapOf("sxyrywdezprycix", new Webhook().withEventType("mnuzyyc"), "k", - new Webhook().withEventType("yamochpwwykfyt"), "oudmcadcojf", - new Webhook().withEventType("dckwqvckh"))))) - .create(); - - Assertions.assertEquals("aba", response.properties().description()); - Assertions.assertEquals("sizao", response.properties().tags().get("sgpdbhbdxsjsox")); - Assertions.assertEquals("dkqffhux", response.properties().properties().get("xqtgzvzcfmwfogjr")); - Assertions.assertEquals("fhdfo", response.properties().displayName()); - Assertions.assertEquals("lcfcpzajgq", response.properties().experimentName()); - Assertions.assertEquals("meqhtngrx", response.properties().services().get("ebolhyiohcjugd").jobServiceType()); - Assertions.assertEquals(1649257125, response.properties().services().get("ebolhyiohcjugd").port()); - Assertions.assertEquals("sewfbllegezvwuwi", response.properties().services().get("ebolhyiohcjugd").endpoint()); - Assertions.assertEquals("ip", response.properties().services().get("ebolhyiohcjugd").properties().get("oqpyb")); - Assertions.assertEquals("hzcicitykzyi", response.properties().computeId()); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals("gnfunh", response.properties().componentId()); - Assertions.assertEquals("syiwm", response.properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, - response.properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("zdb", - response.properties().notificationSetting().webhooks().get("lkdsbekvprkwpvx").eventType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteMockTests.java deleted file mode 100644 index e1ccfcfb3107..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.jobs().delete("gthcdbzoxho", "ogpbogpbwe", "oxlzrijpkbrvm", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsGetWithResponseMockTests.java deleted file mode 100644 index 2c0484df7646..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.JobBase; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"ladohniz\",\"status\":\"Unknown\",\"experimentName\":\"pqiyqvmhtyafcvto\",\"services\":{\"emzvqm\":{\"jobServiceType\":\"m\",\"port\":983563156,\"endpoint\":\"e\",\"status\":\"xqrzsngltlbs\",\"errorMessage\":\"fpl\",\"properties\":{\"jvko\":\"hkwhiorhwuujym\",\"hzng\":\"jgtourrqmch\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"fszxnzjxvdn\":{\"jobServiceType\":\"svxbagccvhnoq\",\"port\":81272000,\"endpoint\":\"pcntqoszrwkkxd\",\"status\":\"uyygdoi\",\"errorMessage\":\"fcnxrbyvbd\",\"properties\":{\"dqxff\":\"tjtzsgen\",\"pnfvzbvtxgsn\":\"jcngjcdyk\",\"hsfgaxuvaej\":\"sqjjcwggjimlcb\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"jckm\":{\"jobServiceType\":\"dlptulwgpdzlfx\",\"port\":1065400664,\"endpoint\":\"gmxynwaofnoiphwa\",\"status\":\"pugxjtuhid\",\"errorMessage\":\"szxmcqenyjwadvf\",\"properties\":{\"mjdphtfpjrbnzb\":\"tymncwj\",\"ima\":\"mrqb\",\"neprhxs\":\"eiq\",\"kto\":\"tusrpjmevszbjn\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"hxxd\",\"isArchived\":true,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"nk\",\"notificationSetting\":{\"emails\":[\"tozxlt\",\"sfxxkgxw\"],\"emailOn\":[\"JobCancelled\",\"JobFailed\",\"JobFailed\"],\"webhooks\":{\"pfhhtfmhmaknp\":{\"webhookType\":\"Webhook\",\"eventType\":\"z\"},\"cnvd\":{\"webhookType\":\"Webhook\",\"eventType\":\"cfvxqrmxcrhz\"},\"rntphyjuedd\":{\"webhookType\":\"Webhook\",\"eventType\":\"iuxx\"},\"axmkuthooaicms\":{\"webhookType\":\"Webhook\",\"eventType\":\"pysmalpjabzssbu\"}}},\"description\":\"wwvb\",\"tags\":{\"i\":\"bivhjryppmmtqx\",\"gqfcoraj\":\"aef\",\"hjseceuvynh\":\"bglkffgyf\",\"xmlsudtbiycepjkl\":\"bzcufxfyzqrs\"},\"properties\":{\"xeyumwlbpyidecff\":\"dsormbvir\",\"sqwjypiosz\":\"hizwqz\",\"dglxppewtlfsw\":\"zsw\",\"vvb\":\"lwnffczwzr\"}},\"id\":\"npriyttiqdcjg\",\"name\":\"mcwmqpcwoe\",\"type\":\"jrfrucpefwdxbp\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - JobBase response = manager.jobs() - .getWithResponse("up", "krqeqjtzaw", "nrvgitzdjixk", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wwvb", response.properties().description()); - Assertions.assertEquals("bivhjryppmmtqx", response.properties().tags().get("i")); - Assertions.assertEquals("dsormbvir", response.properties().properties().get("xeyumwlbpyidecff")); - Assertions.assertEquals("ladohniz", response.properties().displayName()); - Assertions.assertEquals("pqiyqvmhtyafcvto", response.properties().experimentName()); - Assertions.assertEquals("m", response.properties().services().get("emzvqm").jobServiceType()); - Assertions.assertEquals(983563156, response.properties().services().get("emzvqm").port()); - Assertions.assertEquals("e", response.properties().services().get("emzvqm").endpoint()); - Assertions.assertEquals("hkwhiorhwuujym", - response.properties().services().get("emzvqm").properties().get("jvko")); - Assertions.assertEquals("hxxd", response.properties().computeId()); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals("nk", response.properties().componentId()); - Assertions.assertEquals("tozxlt", response.properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - response.properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("z", - response.properties().notificationSetting().webhooks().get("pfhhtfmhmaknp").eventType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsListMockTests.java deleted file mode 100644 index 2b253b644bfb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.JobBase; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"jvzlgclia\",\"status\":\"NotStarted\",\"experimentName\":\"vihy\",\"services\":{\"ka\":{\"jobServiceType\":\"oxexvt\",\"port\":2028703772,\"endpoint\":\"ymgkirfzvtzrq\",\"status\":\"lipmuufsek\",\"errorMessage\":\"pufhwpkpejfszw\",\"properties\":{\"jcnzfajptjhwrnw\":\"swbrsmf\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"afjcdccqjaefrzq\",\"isArchived\":false,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"gidrxdykjchz\",\"notificationSetting\":{\"emails\":[\"pq\",\"pgbssjqjjtcvdz\",\"tsdlp\"],\"emailOn\":[\"JobFailed\",\"JobFailed\",\"JobFailed\"],\"webhooks\":{\"nqfnz\":{\"webhookType\":\"Webhook\",\"eventType\":\"ppnjzbuvmfsfru\"},\"fepsoz\":{\"webhookType\":\"Webhook\",\"eventType\":\"ppnularnupprd\"}}},\"description\":\"xoyan\",\"tags\":{\"taqjhokhi\":\"euewaauxkvruryyq\",\"kikdatbwyarqt\":\"ghpvjqp\",\"pzdgyilwuiklbjl\":\"bjblhefqwirnx\",\"csddplg\":\"bxo\"},\"properties\":{\"oke\":\"via\",\"uosc\":\"cmadyoctmd\"}},\"id\":\"wbestntoeteu\",\"name\":\"gdgbzftsbpef\",\"type\":\"f\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.jobs() - .list("olqqpa", "zpzmojupqlus", "kzdnotgyowis", "fifmitqvypkiqlou", "zbceimsco", ListViewType.ALL, - "naehllwqmraihe", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xoyan", response.iterator().next().properties().description()); - Assertions.assertEquals("euewaauxkvruryyq", response.iterator().next().properties().tags().get("taqjhokhi")); - Assertions.assertEquals("via", response.iterator().next().properties().properties().get("oke")); - Assertions.assertEquals("jvzlgclia", response.iterator().next().properties().displayName()); - Assertions.assertEquals("vihy", response.iterator().next().properties().experimentName()); - Assertions.assertEquals("oxexvt", - response.iterator().next().properties().services().get("ka").jobServiceType()); - Assertions.assertEquals(2028703772, response.iterator().next().properties().services().get("ka").port()); - Assertions.assertEquals("ymgkirfzvtzrq", - response.iterator().next().properties().services().get("ka").endpoint()); - Assertions.assertEquals("swbrsmf", - response.iterator().next().properties().services().get("ka").properties().get("jcnzfajptjhwrnw")); - Assertions.assertEquals("afjcdccqjaefrzq", response.iterator().next().properties().computeId()); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals("gidrxdykjchz", response.iterator().next().properties().componentId()); - Assertions.assertEquals("pq", response.iterator().next().properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, - response.iterator().next().properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("ppnjzbuvmfsfru", - response.iterator().next().properties().notificationSetting().webhooks().get("nqfnz").eventType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesPropertiesTests.java deleted file mode 100644 index 77081f2cc423..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; -import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class KubernetesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KubernetesProperties model = BinaryData.fromString( - "{\"relayConnectionString\":\"od\",\"serviceBusConnectionString\":\"vfsxx\",\"extensionPrincipalId\":\"desqlvg\",\"extensionInstanceReleaseTrain\":\"pwgoljt\",\"vcName\":\"nm\",\"namespace\":\"dobygoogxqapj\",\"defaultInstanceType\":\"azyj\",\"instanceTypes\":{\"qeq\":{\"nodeSelector\":{\"kvibfa\":\"odjnos\"},\"resources\":{\"requests\":{\"ktz\":\"trnzpducdaaktu\",\"wkppnwyytfvp\":\"oimyfpqd\",\"nwhvuldbkkejj\":\"tfjikffffgkuh\",\"xjqifhujjsbc\":\"jigawgaz\"},\"limits\":{\"rhhmojusu\":\"aahzbhuroolkol\",\"ia\":\"gfjzcvaax\",\"xkukm\":\"ahfxwccok\",\"ynuhh\":\"c\"}}}}}") - .toObject(KubernetesProperties.class); - Assertions.assertEquals("od", model.relayConnectionString()); - Assertions.assertEquals("vfsxx", model.serviceBusConnectionString()); - Assertions.assertEquals("desqlvg", model.extensionPrincipalId()); - Assertions.assertEquals("pwgoljt", model.extensionInstanceReleaseTrain()); - Assertions.assertEquals("nm", model.vcName()); - Assertions.assertEquals("dobygoogxqapj", model.namespace()); - Assertions.assertEquals("azyj", model.defaultInstanceType()); - Assertions.assertEquals("odjnos", model.instanceTypes().get("qeq").nodeSelector().get("kvibfa")); - Assertions.assertEquals("trnzpducdaaktu", model.instanceTypes().get("qeq").resources().requests().get("ktz")); - Assertions.assertEquals("aahzbhuroolkol", - model.instanceTypes().get("qeq").resources().limits().get("rhhmojusu")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KubernetesProperties model = new KubernetesProperties().withRelayConnectionString("od") - .withServiceBusConnectionString("vfsxx") - .withExtensionPrincipalId("desqlvg") - .withExtensionInstanceReleaseTrain("pwgoljt") - .withVcName("nm") - .withNamespace("dobygoogxqapj") - .withDefaultInstanceType("azyj") - .withInstanceTypes(mapOf("qeq", new InstanceTypeSchema().withNodeSelector(mapOf("kvibfa", "odjnos")) - .withResources(new InstanceTypeSchemaResources() - .withRequests(mapOf("ktz", "trnzpducdaaktu", "wkppnwyytfvp", "oimyfpqd", "nwhvuldbkkejj", - "tfjikffffgkuh", "xjqifhujjsbc", "jigawgaz")) - .withLimits( - mapOf("rhhmojusu", "aahzbhuroolkol", "ia", "gfjzcvaax", "xkukm", "ahfxwccok", "ynuhh", "c"))))); - model = BinaryData.fromObject(model).toObject(KubernetesProperties.class); - Assertions.assertEquals("od", model.relayConnectionString()); - Assertions.assertEquals("vfsxx", model.serviceBusConnectionString()); - Assertions.assertEquals("desqlvg", model.extensionPrincipalId()); - Assertions.assertEquals("pwgoljt", model.extensionInstanceReleaseTrain()); - Assertions.assertEquals("nm", model.vcName()); - Assertions.assertEquals("dobygoogxqapj", model.namespace()); - Assertions.assertEquals("azyj", model.defaultInstanceType()); - Assertions.assertEquals("odjnos", model.instanceTypes().get("qeq").nodeSelector().get("kvibfa")); - Assertions.assertEquals("trnzpducdaaktu", model.instanceTypes().get("qeq").resources().requests().get("ktz")); - Assertions.assertEquals("aahzbhuroolkol", - model.instanceTypes().get("qeq").resources().limits().get("rhhmojusu")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesSchemaTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesSchemaTests.java deleted file mode 100644 index a2fa559b16a3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesSchemaTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; -import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; -import com.azure.resourcemanager.machinelearning.models.KubernetesSchema; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class KubernetesSchemaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KubernetesSchema model = BinaryData.fromString( - "{\"properties\":{\"relayConnectionString\":\"hjgczetyb\",\"serviceBusConnectionString\":\"gztlcgc\",\"extensionPrincipalId\":\"chfjvmywjzebe\",\"extensionInstanceReleaseTrain\":\"vlbefvwclj\",\"vcName\":\"pylrwoxzgwpsy\",\"namespace\":\"ijeypdvrbkerdkdk\",\"defaultInstanceType\":\"wqwjxil\",\"instanceTypes\":{\"eajbkajlcyizyddc\":{\"nodeSelector\":{\"oisfmnaybdjn\":\"feygzqp\"},\"resources\":{\"requests\":{\"ymulwivqtowl\":\"ntqontwhym\"},\"limits\":{\"j\":\"ycoybajasqubf\",\"htfxcpupuki\":\"ywhjqwmchq\",\"sa\":\"mjzpwdlvwtiwsm\",\"ltassaekewna\":\"nhqnampp\"}}}}}}") - .toObject(KubernetesSchema.class); - Assertions.assertEquals("hjgczetyb", model.properties().relayConnectionString()); - Assertions.assertEquals("gztlcgc", model.properties().serviceBusConnectionString()); - Assertions.assertEquals("chfjvmywjzebe", model.properties().extensionPrincipalId()); - Assertions.assertEquals("vlbefvwclj", model.properties().extensionInstanceReleaseTrain()); - Assertions.assertEquals("pylrwoxzgwpsy", model.properties().vcName()); - Assertions.assertEquals("ijeypdvrbkerdkdk", model.properties().namespace()); - Assertions.assertEquals("wqwjxil", model.properties().defaultInstanceType()); - Assertions.assertEquals("feygzqp", - model.properties().instanceTypes().get("eajbkajlcyizyddc").nodeSelector().get("oisfmnaybdjn")); - Assertions.assertEquals("ntqontwhym", - model.properties().instanceTypes().get("eajbkajlcyizyddc").resources().requests().get("ymulwivqtowl")); - Assertions.assertEquals("ycoybajasqubf", - model.properties().instanceTypes().get("eajbkajlcyizyddc").resources().limits().get("j")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KubernetesSchema model = new KubernetesSchema().withProperties(new KubernetesProperties() - .withRelayConnectionString("hjgczetyb") - .withServiceBusConnectionString("gztlcgc") - .withExtensionPrincipalId("chfjvmywjzebe") - .withExtensionInstanceReleaseTrain("vlbefvwclj") - .withVcName("pylrwoxzgwpsy") - .withNamespace("ijeypdvrbkerdkdk") - .withDefaultInstanceType("wqwjxil") - .withInstanceTypes(mapOf("eajbkajlcyizyddc", - new InstanceTypeSchema().withNodeSelector(mapOf("oisfmnaybdjn", "feygzqp")) - .withResources(new InstanceTypeSchemaResources().withRequests(mapOf("ymulwivqtowl", "ntqontwhym")) - .withLimits(mapOf("j", "ycoybajasqubf", "htfxcpupuki", "ywhjqwmchq", "sa", "mjzpwdlvwtiwsm", - "ltassaekewna", "nhqnampp")))))); - model = BinaryData.fromObject(model).toObject(KubernetesSchema.class); - Assertions.assertEquals("hjgczetyb", model.properties().relayConnectionString()); - Assertions.assertEquals("gztlcgc", model.properties().serviceBusConnectionString()); - Assertions.assertEquals("chfjvmywjzebe", model.properties().extensionPrincipalId()); - Assertions.assertEquals("vlbefvwclj", model.properties().extensionInstanceReleaseTrain()); - Assertions.assertEquals("pylrwoxzgwpsy", model.properties().vcName()); - Assertions.assertEquals("ijeypdvrbkerdkdk", model.properties().namespace()); - Assertions.assertEquals("wqwjxil", model.properties().defaultInstanceType()); - Assertions.assertEquals("feygzqp", - model.properties().instanceTypes().get("eajbkajlcyizyddc").nodeSelector().get("oisfmnaybdjn")); - Assertions.assertEquals("ntqontwhym", - model.properties().instanceTypes().get("eajbkajlcyizyddc").resources().requests().get("ymulwivqtowl")); - Assertions.assertEquals("ycoybajasqubf", - model.properties().instanceTypes().get("eajbkajlcyizyddc").resources().limits().get("j")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LakeHouseArtifactTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LakeHouseArtifactTests.java deleted file mode 100644 index 547174e98ce7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LakeHouseArtifactTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.LakeHouseArtifact; -import org.junit.jupiter.api.Assertions; - -public final class LakeHouseArtifactTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LakeHouseArtifact model = BinaryData.fromString("{\"artifactType\":\"LakeHouse\",\"artifactName\":\"n\"}") - .toObject(LakeHouseArtifact.class); - Assertions.assertEquals("n", model.artifactName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LakeHouseArtifact model = new LakeHouseArtifact().withArtifactName("n"); - model = BinaryData.fromObject(model).toObject(LakeHouseArtifact.class); - Assertions.assertEquals("n", model.artifactName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListAmlUserFeatureResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListAmlUserFeatureResultTests.java deleted file mode 100644 index 78909282b83f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListAmlUserFeatureResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ListAmlUserFeatureResult; - -public final class ListAmlUserFeatureResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListAmlUserFeatureResult model = BinaryData.fromString( - "{\"value\":[{\"id\":\"zczfkiceevs\",\"displayName\":\"xwspcaxikhfjq\",\"description\":\"glcxkxg\"},{\"id\":\"romv\",\"displayName\":\"ysemtmesrfsvpin\",\"description\":\"pat\"},{\"id\":\"diswxspvckojazb\",\"displayName\":\"spftesubzpv\",\"description\":\"dylytcovq\"},{\"id\":\"usrf\",\"displayName\":\"d\",\"description\":\"fxnxml\"}],\"nextLink\":\"uoswkjmdih\"}") - .toObject(ListAmlUserFeatureResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListAmlUserFeatureResult model = new ListAmlUserFeatureResult(); - model = BinaryData.fromObject(model).toObject(ListAmlUserFeatureResult.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListUsagesResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListUsagesResultTests.java deleted file mode 100644 index e82cd847e8c1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListUsagesResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ListUsagesResult; - -public final class ListUsagesResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListUsagesResult model = BinaryData.fromString( - "{\"value\":[{\"id\":\"qn\",\"amlWorkspaceLocation\":\"oczvy\",\"type\":\"qrvkdv\",\"unit\":\"Count\",\"currentValue\":2186677248457800483,\"limit\":135145213418293643,\"name\":{\"value\":\"atkpnp\",\"localizedValue\":\"exxbczwtr\"}},{\"id\":\"iqzbq\",\"amlWorkspaceLocation\":\"sovmyokacspkwl\",\"type\":\"dobpxjmflbvvn\",\"unit\":\"Count\",\"currentValue\":3490424163698610193,\"limit\":8548098953378232008,\"name\":{\"value\":\"uqkhrsajiwku\",\"localizedValue\":\"oskg\"}},{\"id\":\"auu\",\"amlWorkspaceLocation\":\"jmvxie\",\"type\":\"ugidyjrr\",\"unit\":\"Count\",\"currentValue\":7621842593771814376,\"limit\":122532505466115624,\"name\":{\"value\":\"onpc\",\"localizedValue\":\"ocohslkevleg\"}},{\"id\":\"fbuhfmvfaxkffe\",\"amlWorkspaceLocation\":\"th\",\"type\":\"m\",\"unit\":\"Count\",\"currentValue\":9115490458846755949,\"limit\":3938193441578010473,\"name\":{\"value\":\"bzoggigrx\",\"localizedValue\":\"ur\"}}],\"nextLink\":\"xxjnspydptk\"}") - .toObject(ListUsagesResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListUsagesResult model = new ListUsagesResult(); - model = BinaryData.fromObject(model).toObject(ListUsagesResult.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListWorkspaceQuotasTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListWorkspaceQuotasTests.java deleted file mode 100644 index c506122bb15f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListWorkspaceQuotasTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ListWorkspaceQuotas; - -public final class ListWorkspaceQuotasTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListWorkspaceQuotas model = BinaryData.fromString( - "{\"value\":[{\"id\":\"zjancuxr\",\"amlWorkspaceLocation\":\"wbavxbniwdj\",\"type\":\"zt\",\"name\":{\"value\":\"pgn\",\"localizedValue\":\"txhp\"},\"limit\":6965353138700786103,\"unit\":\"Count\"},{\"id\":\"abgl\",\"amlWorkspaceLocation\":\"hxw\",\"type\":\"tyq\",\"name\":{\"value\":\"bbovplwzbhvgyugu\",\"localizedValue\":\"vmkfssxqu\"},\"limit\":2455965823671467627,\"unit\":\"Count\"},{\"id\":\"gsxnkjzkdeslpv\",\"amlWorkspaceLocation\":\"pwiyig\",\"type\":\"pkdwzbai\",\"name\":{\"value\":\"baumnyqupedeoj\",\"localizedValue\":\"bckhsmtxpsi\"},\"limit\":8592172469751933163,\"unit\":\"Count\"}],\"nextLink\":\"esap\"}") - .toObject(ListWorkspaceQuotas.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListWorkspaceQuotas model = new ListWorkspaceQuotas(); - model = BinaryData.fromObject(model).toObject(ListWorkspaceQuotas.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LiteralJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LiteralJobInputTests.java deleted file mode 100644 index 31912a4ddd42..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LiteralJobInputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.LiteralJobInput; -import org.junit.jupiter.api.Assertions; - -public final class LiteralJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LiteralJobInput model = BinaryData - .fromString("{\"jobInputType\":\"literal\",\"value\":\"ntqrcjqpzj\",\"description\":\"pjrrhpgsjbioag\"}") - .toObject(LiteralJobInput.class); - Assertions.assertEquals("pjrrhpgsjbioag", model.description()); - Assertions.assertEquals("ntqrcjqpzj", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LiteralJobInput model = new LiteralJobInput().withDescription("pjrrhpgsjbioag").withValue("ntqrcjqpzj"); - model = BinaryData.fromObject(model).toObject(LiteralJobInput.class); - Assertions.assertEquals("pjrrhpgsjbioag", model.description()); - Assertions.assertEquals("ntqrcjqpzj", model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobInputTests.java deleted file mode 100644 index 5fa57b29c6ea..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobInputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import org.junit.jupiter.api.Assertions; - -public final class MLFlowModelJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MLFlowModelJobInput model = BinaryData.fromString( - "{\"jobInputType\":\"mlflow_model\",\"uri\":\"hximkgfmxpq\",\"mode\":\"ReadWriteMount\",\"description\":\"yriwnto\"}") - .toObject(MLFlowModelJobInput.class); - Assertions.assertEquals("yriwnto", model.description()); - Assertions.assertEquals("hximkgfmxpq", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLFlowModelJobInput model = new MLFlowModelJobInput().withDescription("yriwnto") - .withUri("hximkgfmxpq") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(MLFlowModelJobInput.class); - Assertions.assertEquals("yriwnto", model.description()); - Assertions.assertEquals("hximkgfmxpq", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobOutputTests.java deleted file mode 100644 index a5dc943e5d81..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobOutputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobOutput; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class MLFlowModelJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MLFlowModelJobOutput model = BinaryData - .fromString( - "{\"jobOutputType\":\"mlflow_model\",\"uri\":\"i\",\"mode\":\"Direct\",\"description\":\"dqvao\"}") - .toObject(MLFlowModelJobOutput.class); - Assertions.assertEquals("dqvao", model.description()); - Assertions.assertEquals("i", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.DIRECT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLFlowModelJobOutput model - = new MLFlowModelJobOutput().withDescription("dqvao").withUri("i").withMode(OutputDeliveryMode.DIRECT); - model = BinaryData.fromObject(model).toObject(MLFlowModelJobOutput.class); - Assertions.assertEquals("dqvao", model.description()); - Assertions.assertEquals("i", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.DIRECT, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableDataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableDataTests.java deleted file mode 100644 index 1f88c2e14522..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableDataTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MLTableData; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MLTableDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MLTableData model = BinaryData.fromString( - "{\"dataType\":\"mltable\",\"referencedUris\":[\"xdfsfvkjc\",\"m\"],\"dataUri\":\"rsvxphtjnhptj\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"z\",\"tags\":{\"rgyzcslazp\":\"mydtdtftmizuzjd\",\"teagbgac\":\"kqoyimxpggk\",\"lpbybkisb\":\"qpjuytvude\",\"glpwdjr\":\"ifm\"},\"properties\":{\"ttuhaaax\":\"fshznu\",\"xstowagehxuihwes\":\"dcdjmdkqtxfrmbe\",\"kncypmte\":\"tjaqgbl\",\"hrfbrj\":\"spsaneyvaerpiob\"}}") - .toObject(MLTableData.class); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("mydtdtftmizuzjd", model.tags().get("rgyzcslazp")); - Assertions.assertEquals("fshznu", model.properties().get("ttuhaaax")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals("rsvxphtjnhptj", model.dataUri()); - Assertions.assertEquals("xdfsfvkjc", model.referencedUris().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLTableData model = new MLTableData().withDescription("z") - .withTags(mapOf("rgyzcslazp", "mydtdtftmizuzjd", "teagbgac", "kqoyimxpggk", "lpbybkisb", "qpjuytvude", - "glpwdjr", "ifm")) - .withProperties(mapOf("ttuhaaax", "fshznu", "xstowagehxuihwes", "dcdjmdkqtxfrmbe", "kncypmte", "tjaqgbl", - "hrfbrj", "spsaneyvaerpiob")) - .withIsArchived(false) - .withIsAnonymous(true) - .withDataUri("rsvxphtjnhptj") - .withReferencedUris(Arrays.asList("xdfsfvkjc", "m")); - model = BinaryData.fromObject(model).toObject(MLTableData.class); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("mydtdtftmizuzjd", model.tags().get("rgyzcslazp")); - Assertions.assertEquals("fshznu", model.properties().get("ttuhaaax")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals("rsvxphtjnhptj", model.dataUri()); - Assertions.assertEquals("xdfsfvkjc", model.referencedUris().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobInputTests.java deleted file mode 100644 index 00c211bd2c3b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobInputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import org.junit.jupiter.api.Assertions; - -public final class MLTableJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MLTableJobInput model = BinaryData.fromString( - "{\"jobInputType\":\"mltable\",\"uri\":\"ezefkhkqtwqlepjj\",\"mode\":\"ReadOnlyMount\",\"description\":\"sf\"}") - .toObject(MLTableJobInput.class); - Assertions.assertEquals("sf", model.description()); - Assertions.assertEquals("ezefkhkqtwqlepjj", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLTableJobInput model = new MLTableJobInput().withDescription("sf") - .withUri("ezefkhkqtwqlepjj") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT); - model = BinaryData.fromObject(model).toObject(MLTableJobInput.class); - Assertions.assertEquals("sf", model.description()); - Assertions.assertEquals("ezefkhkqtwqlepjj", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobOutputTests.java deleted file mode 100644 index b2ee04cf7c10..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobOutputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MLTableJobOutput; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class MLTableJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MLTableJobOutput model = BinaryData.fromString( - "{\"jobOutputType\":\"mltable\",\"uri\":\"jwqdmr\",\"mode\":\"Upload\",\"description\":\"lppqcaigazwfwlr\"}") - .toObject(MLTableJobOutput.class); - Assertions.assertEquals("lppqcaigazwfwlr", model.description()); - Assertions.assertEquals("jwqdmr", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLTableJobOutput model = new MLTableJobOutput().withDescription("lppqcaigazwfwlr") - .withUri("jwqdmr") - .withMode(OutputDeliveryMode.UPLOAD); - model = BinaryData.fromObject(model).toObject(MLTableJobOutput.class); - Assertions.assertEquals("lppqcaigazwfwlr", model.description()); - Assertions.assertEquals("jwqdmr", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedComputeIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedComputeIdentityTests.java deleted file mode 100644 index e138e9b9c8fc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedComputeIdentityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedComputeIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedComputeIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedComputeIdentity model = BinaryData.fromString( - "{\"computeIdentityType\":\"ManagedIdentity\",\"identity\":{\"principalId\":\"ac27e7a4-e37a-4a73-ac6d-825782241d27\",\"tenantId\":\"5de2a901-fd71-4a09-b7b2-d28cbd13275f\",\"type\":\"None\",\"userAssignedIdentities\":{\"dtqfdrslzy\":{\"principalId\":\"727491ce-ba18-47e7-afa8-66472129f016\",\"clientId\":\"2a8ed716-1cb0-46ba-a012-8ae6592edc5f\"},\"serwyc\":{\"principalId\":\"742777d7-4b97-40ba-a340-8b5a8bee335a\",\"clientId\":\"b40dff74-a8fa-4431-bb17-ae3570eeaad0\"},\"tjwgetfigwn\":{\"principalId\":\"c693785e-2e1d-4c6c-a356-b522b6ffa031\",\"clientId\":\"232013d3-965d-45cd-97f3-a3c6405ab3a6\"},\"xzizebjr\":{\"principalId\":\"4e9f274b-4fdf-42dd-9e92-23d397371caa\",\"clientId\":\"22074597-d87e-4b5e-9bd9-b53cee169626\"}}}}") - .toObject(ManagedComputeIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedComputeIdentity model = new ManagedComputeIdentity() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("dtqfdrslzy", new UserAssignedIdentity(), "serwyc", new UserAssignedIdentity(), "tjwgetfigwn", - new UserAssignedIdentity(), "xzizebjr", new UserAssignedIdentity()))); - model = BinaryData.fromObject(model).toObject(ManagedComputeIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedIdentityTests.java deleted file mode 100644 index d7dfe57cb2e8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedIdentityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedIdentity; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; - -public final class ManagedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedIdentity model = BinaryData.fromString( - "{\"identityType\":\"Managed\",\"clientId\":\"c1cac5a4-f742-4da9-85fd-d6c1a568ade8\",\"objectId\":\"571ce55d-766a-492c-b0fc-2ed317841bdc\",\"resourceId\":\"stubw\"}") - .toObject(ManagedIdentity.class); - Assertions.assertEquals(UUID.fromString("c1cac5a4-f742-4da9-85fd-d6c1a568ade8"), model.clientId()); - Assertions.assertEquals(UUID.fromString("571ce55d-766a-492c-b0fc-2ed317841bdc"), model.objectId()); - Assertions.assertEquals("stubw", model.resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIdentity model - = new ManagedIdentity().withClientId(UUID.fromString("c1cac5a4-f742-4da9-85fd-d6c1a568ade8")) - .withObjectId(UUID.fromString("571ce55d-766a-492c-b0fc-2ed317841bdc")) - .withResourceId("stubw"); - model = BinaryData.fromObject(model).toObject(ManagedIdentity.class); - Assertions.assertEquals(UUID.fromString("c1cac5a4-f742-4da9-85fd-d6c1a568ade8"), model.clientId()); - Assertions.assertEquals(UUID.fromString("571ce55d-766a-492c-b0fc-2ed317841bdc"), model.objectId()); - Assertions.assertEquals("stubw", model.resourceId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionOptionsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionOptionsTests.java deleted file mode 100644 index fe52d995a98c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionOptionsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions; -import org.junit.jupiter.api.Assertions; - -public final class ManagedNetworkProvisionOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedNetworkProvisionOptions model - = BinaryData.fromString("{\"includeSpark\":true}").toObject(ManagedNetworkProvisionOptions.class); - Assertions.assertEquals(true, model.includeSpark()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedNetworkProvisionOptions model = new ManagedNetworkProvisionOptions().withIncludeSpark(true); - model = BinaryData.fromObject(model).toObject(ManagedNetworkProvisionOptions.class); - Assertions.assertEquals(true, model.includeSpark()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionStatusInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionStatusInnerTests.java deleted file mode 100644 index 2ef9d27faca9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionStatusInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; -import org.junit.jupiter.api.Assertions; - -public final class ManagedNetworkProvisionStatusInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedNetworkProvisionStatusInner model - = BinaryData.fromString("{\"sparkReady\":false,\"status\":\"Inactive\"}") - .toObject(ManagedNetworkProvisionStatusInner.class); - Assertions.assertEquals(false, model.sparkReady()); - Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedNetworkProvisionStatusInner model - = new ManagedNetworkProvisionStatusInner().withSparkReady(false).withStatus(ManagedNetworkStatus.INACTIVE); - model = BinaryData.fromObject(model).toObject(ManagedNetworkProvisionStatusInner.class); - Assertions.assertEquals(false, model.sparkReady()); - Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkMockTests.java deleted file mode 100644 index 7ca93205e6a7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedNetworkProvisionsProvisionManagedNetworkMockTests { - @Test - public void testProvisionManagedNetwork() throws Exception { - String responseStr = "{\"sparkReady\":false,\"status\":\"Inactive\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ManagedNetworkProvisionStatus response = manager.managedNetworkProvisions() - .provisionManagedNetwork("ljzbkdwlfjwxgvtk", "ctvrpeawzzkvf", - new ManagedNetworkProvisionOptions().withIncludeSpark(true), com.azure.core.util.Context.NONE); - - Assertions.assertEquals(false, response.sparkReady()); - Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, response.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsInnerTests.java deleted file mode 100644 index c547f4a752d5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; -import com.azure.resourcemanager.machinelearning.models.IsolationMode; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; -import com.azure.resourcemanager.machinelearning.models.OutboundRule; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedNetworkSettingsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedNetworkSettingsInner model = BinaryData.fromString( - "{\"isolationMode\":\"AllowOnlyApprovedOutbound\",\"networkId\":\"koty\",\"outboundRules\":{\"ndlik\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Inactive\"}},\"status\":{\"sparkReady\":false,\"status\":\"Active\"}}") - .toObject(ManagedNetworkSettingsInner.class); - Assertions.assertEquals(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND, model.isolationMode()); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.outboundRules().get("ndlik").category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.outboundRules().get("ndlik").status()); - Assertions.assertEquals(false, model.status().sparkReady()); - Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.status().status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedNetworkSettingsInner model = new ManagedNetworkSettingsInner() - .withIsolationMode(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND) - .withOutboundRules(mapOf("ndlik", - new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.INACTIVE))) - .withStatus( - new ManagedNetworkProvisionStatusInner().withSparkReady(false).withStatus(ManagedNetworkStatus.ACTIVE)); - model = BinaryData.fromObject(model).toObject(ManagedNetworkSettingsInner.class); - Assertions.assertEquals(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND, model.isolationMode()); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.outboundRules().get("ndlik").category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.outboundRules().get("ndlik").status()); - Assertions.assertEquals(false, model.status().sparkReady()); - Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.status().status()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesCreateOrUpdateMockTests.java deleted file mode 100644 index 7315863af293..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesCreateOrUpdateMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.OutboundRule; -import com.azure.resourcemanager.machinelearning.models.OutboundRuleBasicResource; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedNetworkSettingsRulesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Inactive\"},\"id\":\"akk\",\"name\":\"bjortztkajqhsns\",\"type\":\"jplislx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OutboundRuleBasicResource response = manager.managedNetworkSettingsRules() - .define("crlkorv") - .withExistingWorkspace("ibtvavl", "aqtlocnwmefzvzuz") - .withProperties(new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.INACTIVE)) - .create(); - - Assertions.assertEquals(RuleCategory.DEPENDENCY, response.properties().category()); - Assertions.assertEquals(RuleStatus.INACTIVE, response.properties().status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesDeleteMockTests.java deleted file mode 100644 index aff10ac700ce..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedNetworkSettingsRulesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.managedNetworkSettingsRules() - .delete("lngsfmh", "dxqupyml", "klmnjqzmqynhitr", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesGetWithResponseMockTests.java deleted file mode 100644 index d95f7468c7fd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.OutboundRuleBasicResource; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedNetworkSettingsRulesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Active\"},\"id\":\"nlmdcnutiex\",\"name\":\"izunzbqvioyn\",\"type\":\"tfqhhvvwzprjaaai\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OutboundRuleBasicResource response = manager.managedNetworkSettingsRules() - .getWithResponse("wqgqrbthbfpi", "nrjocogwf", "kywzrqeiad", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(RuleCategory.RECOMMENDED, response.properties().category()); - Assertions.assertEquals(RuleStatus.ACTIVE, response.properties().status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesListMockTests.java deleted file mode 100644 index 65b2e56a4489..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.OutboundRuleBasicResource; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedNetworkSettingsRulesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Inactive\"},\"id\":\"x\",\"name\":\"ocaywmfvuhz\",\"type\":\"olhve\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.managedNetworkSettingsRules().list("hdkubgywadr", "lpdyehj", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(RuleCategory.DEPENDENCY, response.iterator().next().properties().category()); - Assertions.assertEquals(RuleStatus.INACTIVE, response.iterator().next().properties().status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedServiceIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedServiceIdentityTests.java deleted file mode 100644 index 21416ca8b395..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedServiceIdentityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"1d0fdb15-2831-4e0e-a59d-c10c1c336a7c\",\"tenantId\":\"4e5f2ce2-d525-44ab-b1d1-7b0e5316f387\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"dkwt\":{\"principalId\":\"32b7f306-79e8-413a-b464-f34445d25a75\",\"clientId\":\"027bed66-ef57-4b54-9ee5-b18937e924d7\"}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("dkwt", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplacePlanTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplacePlanTests.java deleted file mode 100644 index 06b32cf33b45..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplacePlanTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MarketplacePlan; - -public final class MarketplacePlanTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MarketplacePlan model = BinaryData - .fromString("{\"publisherId\":\"rvxhmtfhocnxzcm\",\"offerId\":\"ngxno\",\"planId\":\"xtdisnjevhd\"}") - .toObject(MarketplacePlan.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MarketplacePlan model = new MarketplacePlan(); - model = BinaryData.fromObject(model).toObject(MarketplacePlan.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionInnerTests.java deleted file mode 100644 index 6715139b4812..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.MarketplaceSubscriptionInner; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties; -import org.junit.jupiter.api.Assertions; - -public final class MarketplaceSubscriptionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MarketplaceSubscriptionInner model = BinaryData.fromString( - "{\"properties\":{\"modelId\":\"cpxdazvd\",\"marketplacePlan\":{\"publisherId\":\"mmkoszudb\",\"offerId\":\"s\",\"planId\":\"rpcaqkiofkbtf\"},\"marketplaceSubscriptionStatus\":\"Unsubscribed\",\"provisioningState\":\"Canceled\"},\"id\":\"l\",\"name\":\"pvcbhhe\",\"type\":\"yq\"}") - .toObject(MarketplaceSubscriptionInner.class); - Assertions.assertEquals("cpxdazvd", model.properties().modelId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MarketplaceSubscriptionInner model = new MarketplaceSubscriptionInner() - .withProperties(new MarketplaceSubscriptionProperties().withModelId("cpxdazvd")); - model = BinaryData.fromObject(model).toObject(MarketplaceSubscriptionInner.class); - Assertions.assertEquals("cpxdazvd", model.properties().modelId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionPropertiesTests.java deleted file mode 100644 index 7cb3e3217304..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties; -import org.junit.jupiter.api.Assertions; - -public final class MarketplaceSubscriptionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MarketplaceSubscriptionProperties model = BinaryData.fromString( - "{\"modelId\":\"wusqx\",\"marketplacePlan\":{\"publisherId\":\"pbrruyu\",\"offerId\":\"tvlmbjwcolbmxlb\",\"planId\":\"tpc\"},\"marketplaceSubscriptionStatus\":\"Subscribed\",\"provisioningState\":\"Deleting\"}") - .toObject(MarketplaceSubscriptionProperties.class); - Assertions.assertEquals("wusqx", model.modelId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MarketplaceSubscriptionProperties model = new MarketplaceSubscriptionProperties().withModelId("wusqx"); - model = BinaryData.fromObject(model).toObject(MarketplaceSubscriptionProperties.class); - Assertions.assertEquals("wusqx", model.modelId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionResourceArmPaginatedResultTests.java deleted file mode 100644 index 5768c128755d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.MarketplaceSubscriptionInner; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionResourceArmPaginatedResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MarketplaceSubscriptionResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MarketplaceSubscriptionResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"modelId\":\"rhuzgfxonjtpu\",\"marketplacePlan\":{\"publisherId\":\"ywpvt\",\"offerId\":\"tzbpdbollgry\",\"planId\":\"iuas\"},\"marketplaceSubscriptionStatus\":\"Suspended\",\"provisioningState\":\"Succeeded\"},\"id\":\"ocnequygdjboqgrm\",\"name\":\"qjkqevadrmmwi\",\"type\":\"awvcmjzkxiid\"},{\"properties\":{\"modelId\":\"scz\",\"marketplacePlan\":{\"publisherId\":\"s\",\"offerId\":\"qiqazugamxzkr\",\"planId\":\"oiisbamnppcce\"},\"marketplaceSubscriptionStatus\":\"Suspended\",\"provisioningState\":\"Deleting\"},\"id\":\"bezaxyfukzxuiz\",\"name\":\"y\",\"type\":\"nepk\"}],\"nextLink\":\"tiarxqiubxduk\"}") - .toObject(MarketplaceSubscriptionResourceArmPaginatedResult.class); - Assertions.assertEquals("rhuzgfxonjtpu", model.value().get(0).properties().modelId()); - Assertions.assertEquals("tiarxqiubxduk", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MarketplaceSubscriptionResourceArmPaginatedResult model - = new MarketplaceSubscriptionResourceArmPaginatedResult() - .withValue(Arrays.asList( - new MarketplaceSubscriptionInner() - .withProperties(new MarketplaceSubscriptionProperties().withModelId("rhuzgfxonjtpu")), - new MarketplaceSubscriptionInner() - .withProperties(new MarketplaceSubscriptionProperties().withModelId("scz")))) - .withNextLink("tiarxqiubxduk"); - model = BinaryData.fromObject(model).toObject(MarketplaceSubscriptionResourceArmPaginatedResult.class); - Assertions.assertEquals("rhuzgfxonjtpu", model.value().get(0).properties().modelId()); - Assertions.assertEquals("tiarxqiubxduk", model.nextLink()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateMockTests.java deleted file mode 100644 index f53826fa955f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscription; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MarketplaceSubscriptionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"modelId\":\"mhenqn\",\"marketplacePlan\":{\"publisherId\":\"mk\",\"offerId\":\"xvexusjfjuphjjue\",\"planId\":\"vjtgpyoat\"},\"marketplaceSubscriptionStatus\":\"Subscribed\",\"provisioningState\":\"Succeeded\"},\"id\":\"qm\",\"name\":\"xjdkvyzilrlfgowv\",\"type\":\"xjqru\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MarketplaceSubscription response = manager.marketplaceSubscriptions() - .define("edzyzbvsjut") - .withExistingWorkspace("ktcr", "ct") - .withProperties(new MarketplaceSubscriptionProperties().withModelId("sysefil")) - .create(); - - Assertions.assertEquals("mhenqn", response.properties().modelId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetWithResponseMockTests.java deleted file mode 100644 index 7d5e2d1b5772..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscription; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MarketplaceSubscriptionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"modelId\":\"nssvrkzslyliog\",\"marketplacePlan\":{\"publisherId\":\"hrmcpbmyghqtth\",\"offerId\":\"blwkqztqrnre\",\"planId\":\"fmnrweevtun\"},\"marketplaceSubscriptionStatus\":\"Unsubscribed\",\"provisioningState\":\"Canceled\"},\"id\":\"vsjfpsyqvgaaymfk\",\"name\":\"xhiwmkljhk\",\"type\":\"xcewzgoxz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MarketplaceSubscription response = manager.marketplaceSubscriptions() - .getWithResponse("a", "bldhcfhw", "ithxna", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("nssvrkzslyliog", response.properties().modelId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListMockTests.java deleted file mode 100644 index 286fcb370eb4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscription; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MarketplaceSubscriptionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"modelId\":\"lmw\",\"marketplacePlan\":{\"publisherId\":\"bkwrvtflotji\",\"offerId\":\"iswi\",\"planId\":\"vnw\"},\"marketplaceSubscriptionStatus\":\"Subscribed\",\"provisioningState\":\"Canceled\"},\"id\":\"ylsl\",\"name\":\"bdtrwkpely\",\"type\":\"lfwmajl\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.marketplaceSubscriptions().list("rmp", "apyq", "esginpixhulf", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lmw", response.iterator().next().properties().modelId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationComputeResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationComputeResourceTests.java deleted file mode 100644 index 3c764ebe79e8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationComputeResourceTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; -import org.junit.jupiter.api.Assertions; - -public final class MaterializationComputeResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaterializationComputeResource model - = BinaryData.fromString("{\"instanceType\":\"emv\"}").toObject(MaterializationComputeResource.class); - Assertions.assertEquals("emv", model.instanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaterializationComputeResource model = new MaterializationComputeResource().withInstanceType("emv"); - model = BinaryData.fromObject(model).toObject(MaterializationComputeResource.class); - Assertions.assertEquals("emv", model.instanceType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationSettingsTests.java deleted file mode 100644 index 5c0769367cf9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationSettingsTests.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; -import com.azure.resourcemanager.machinelearning.models.MaterializationSettings; -import com.azure.resourcemanager.machinelearning.models.MaterializationStoreType; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MaterializationSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaterializationSettings model = BinaryData.fromString( - "{\"storeType\":\"Offline\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Day\",\"interval\":1695764846,\"schedule\":{\"hours\":[448963425,170152558,1340957573,1561402676],\"minutes\":[1767773898,490513850,526112283],\"weekDays\":[\"Thursday\",\"Thursday\"],\"monthDays\":[1412806239,1522988272,495310352,1541316864]},\"endTime\":\"yghs\",\"startTime\":\"cyl\",\"timeZone\":\"gmnsghpxy\"},\"notification\":{\"emails\":[\"rwjjkhvyomacluzv\",\"nqmhrp\",\"pd\"],\"emailOn\":[\"JobCancelled\",\"JobFailed\",\"JobCompleted\"],\"webhooks\":{\"ypobkdqzr\":{\"webhookType\":\"Webhook\",\"eventType\":\"ssffxuifmc\"}}},\"resource\":{\"instanceType\":\"ylollgtrczzydmxz\"},\"sparkConfiguration\":{\"uaurkihcir\":\"p\",\"xnbkkj\":\"defxrdc\",\"nqbpi\":\"nurnnq\",\"gypxrxvbfihwuhvc\":\"xqltgrd\"}}") - .toObject(MaterializationSettings.class); - Assertions.assertEquals(MaterializationStoreType.OFFLINE, model.storeType()); - Assertions.assertEquals("yghs", model.schedule().endTime()); - Assertions.assertEquals("cyl", model.schedule().startTime()); - Assertions.assertEquals("gmnsghpxy", model.schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, model.schedule().frequency()); - Assertions.assertEquals(1695764846, model.schedule().interval()); - Assertions.assertEquals(448963425, model.schedule().schedule().hours().get(0)); - Assertions.assertEquals(1767773898, model.schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, model.schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1412806239, model.schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("rwjjkhvyomacluzv", model.notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, model.notification().emailOn().get(0)); - Assertions.assertEquals("ssffxuifmc", model.notification().webhooks().get("ypobkdqzr").eventType()); - Assertions.assertEquals("ylollgtrczzydmxz", model.resource().instanceType()); - Assertions.assertEquals("p", model.sparkConfiguration().get("uaurkihcir")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaterializationSettings model - = new MaterializationSettings().withStoreType(MaterializationStoreType.OFFLINE) - .withSchedule( - new RecurrenceTrigger().withEndTime("yghs") - .withStartTime("cyl") - .withTimeZone("gmnsghpxy") - .withFrequency(RecurrenceFrequency.DAY) - .withInterval(1695764846) - .withSchedule(new RecurrenceSchedule() - .withHours(Arrays.asList(448963425, 170152558, 1340957573, 1561402676)) - .withMinutes(Arrays.asList(1767773898, 490513850, 526112283)) - .withWeekDays(Arrays.asList(WeekDay.THURSDAY, WeekDay.THURSDAY)) - .withMonthDays(Arrays.asList(1412806239, 1522988272, 495310352, 1541316864)))) - .withNotification( - new NotificationSetting().withEmails(Arrays.asList("rwjjkhvyomacluzv", "nqmhrp", "pd")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED, - EmailNotificationEnableType.JOB_FAILED, EmailNotificationEnableType.JOB_COMPLETED)) - .withWebhooks(mapOf("ypobkdqzr", new Webhook().withEventType("ssffxuifmc")))) - .withResource(new MaterializationComputeResource().withInstanceType("ylollgtrczzydmxz")) - .withSparkConfiguration( - mapOf("uaurkihcir", "p", "xnbkkj", "defxrdc", "nqbpi", "nurnnq", "gypxrxvbfihwuhvc", "xqltgrd")); - model = BinaryData.fromObject(model).toObject(MaterializationSettings.class); - Assertions.assertEquals(MaterializationStoreType.OFFLINE, model.storeType()); - Assertions.assertEquals("yghs", model.schedule().endTime()); - Assertions.assertEquals("cyl", model.schedule().startTime()); - Assertions.assertEquals("gmnsghpxy", model.schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, model.schedule().frequency()); - Assertions.assertEquals(1695764846, model.schedule().interval()); - Assertions.assertEquals(448963425, model.schedule().schedule().hours().get(0)); - Assertions.assertEquals(1767773898, model.schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, model.schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1412806239, model.schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("rwjjkhvyomacluzv", model.notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, model.notification().emailOn().get(0)); - Assertions.assertEquals("ssffxuifmc", model.notification().webhooks().get("ypobkdqzr").eventType()); - Assertions.assertEquals("ylollgtrczzydmxz", model.resource().instanceType()); - Assertions.assertEquals("p", model.sparkConfiguration().get("uaurkihcir")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MedianStoppingPolicyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MedianStoppingPolicyTests.java deleted file mode 100644 index 487617bb3617..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MedianStoppingPolicyTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MedianStoppingPolicy; -import org.junit.jupiter.api.Assertions; - -public final class MedianStoppingPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MedianStoppingPolicy model = BinaryData - .fromString( - "{\"policyType\":\"MedianStopping\",\"evaluationInterval\":146013478,\"delayEvaluation\":808656938}") - .toObject(MedianStoppingPolicy.class); - Assertions.assertEquals(146013478, model.evaluationInterval()); - Assertions.assertEquals(808656938, model.delayEvaluation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MedianStoppingPolicy model - = new MedianStoppingPolicy().withEvaluationInterval(146013478).withDelayEvaluation(808656938); - model = BinaryData.fromObject(model).toObject(MedianStoppingPolicy.class); - Assertions.assertEquals(146013478, model.evaluationInterval()); - Assertions.assertEquals(808656938, model.delayEvaluation()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerInnerTests.java deleted file mode 100644 index 29b6f9291692..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelContainerInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"yrxpdlcgqls\",\"nextVersion\":\"mjqfrddgamquhio\",\"description\":\"sjuivfcdisyir\",\"tags\":{\"xrxzbujrtr\":\"hcz\",\"khgn\":\"qvwre\",\"piqywnc\":\"nzonzl\",\"zehtdhgb\":\"jtszcof\"},\"properties\":{\"zmlovuanash\":\"reljeamur\",\"erbdk\":\"xlpm\"}},\"id\":\"vidizozsdb\",\"name\":\"cxjmonfdgnwncyp\",\"type\":\"uwwltvuqjctz\"}") - .toObject(ModelContainerInner.class); - Assertions.assertEquals("sjuivfcdisyir", model.properties().description()); - Assertions.assertEquals("hcz", model.properties().tags().get("xrxzbujrtr")); - Assertions.assertEquals("reljeamur", model.properties().properties().get("zmlovuanash")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelContainerInner model - = new ModelContainerInner().withProperties(new ModelContainerProperties().withDescription("sjuivfcdisyir") - .withTags(mapOf("xrxzbujrtr", "hcz", "khgn", "qvwre", "piqywnc", "nzonzl", "zehtdhgb", "jtszcof")) - .withProperties(mapOf("zmlovuanash", "reljeamur", "erbdk", "xlpm")) - .withIsArchived(false)); - model = BinaryData.fromObject(model).toObject(ModelContainerInner.class); - Assertions.assertEquals("sjuivfcdisyir", model.properties().description()); - Assertions.assertEquals("hcz", model.properties().tags().get("xrxzbujrtr")); - Assertions.assertEquals("reljeamur", model.properties().properties().get("zmlovuanash")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerPropertiesTests.java deleted file mode 100644 index 99a677855f69..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelContainerProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"zzhmkd\",\"nextVersion\":\"vflyhbxcu\",\"description\":\"hxgsrboldfor\",\"tags\":{\"qpbtuodxes\":\"jlvizbfhfovva\",\"rrwoycqucwyhahn\":\"abbelawumuaslzk\",\"ywuhpsvfuur\":\"mdr\"},\"properties\":{\"xwlalniexzsrzpg\":\"we\",\"wpgdak\":\"pqtybb\"}}") - .toObject(ModelContainerProperties.class); - Assertions.assertEquals("hxgsrboldfor", model.description()); - Assertions.assertEquals("jlvizbfhfovva", model.tags().get("qpbtuodxes")); - Assertions.assertEquals("we", model.properties().get("xwlalniexzsrzpg")); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelContainerProperties model = new ModelContainerProperties().withDescription("hxgsrboldfor") - .withTags(mapOf("qpbtuodxes", "jlvizbfhfovva", "rrwoycqucwyhahn", "abbelawumuaslzk", "ywuhpsvfuur", "mdr")) - .withProperties(mapOf("xwlalniexzsrzpg", "we", "wpgdak", "pqtybb")) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(ModelContainerProperties.class); - Assertions.assertEquals("hxgsrboldfor", model.description()); - Assertions.assertEquals("jlvizbfhfovva", model.tags().get("qpbtuodxes")); - Assertions.assertEquals("we", model.properties().get("xwlalniexzsrzpg")); - Assertions.assertEquals(false, model.isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index 729884d38345..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -import com.azure.resourcemanager.machinelearning.models.ModelContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelContainerResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":true,\"latestVersion\":\"lcdisd\",\"nextVersion\":\"fj\",\"description\":\"svgjrwhryvy\",\"tags\":{\"knfnwmbtmvpdv\":\"dclxgc\"},\"properties\":{\"ihchrphkmcrjdqn\":\"ttzaefed\"}},\"id\":\"fzpbgtgkyl\",\"name\":\"dgh\",\"type\":\"jeuut\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"zhokvbwnhh\",\"nextVersion\":\"lgehg\",\"description\":\"ipifhpfeoajvg\",\"tags\":{\"sr\":\"xjcsheafidltu\",\"h\":\"smkss\",\"egprhptil\":\"iftxfkf\",\"qtgdqohmcwsl\":\"ucb\"},\"properties\":{\"llibphbqzmizak\":\"zetpwbra\",\"jpdn\":\"kan\"}},\"id\":\"ha\",\"name\":\"oylhjlmuoyxprimr\",\"type\":\"opteecj\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"tvasy\",\"nextVersion\":\"xdza\",\"description\":\"weoohguufuzboyj\",\"tags\":{\"jscjpahl\":\"wtzolbaemwmdxmeb\",\"yijddtvqcttad\":\"veabfqxnmwmqtib\"},\"properties\":{\"ieekpndzaa\":\"eukmr\",\"igpibud\":\"mudqmeq\"}},\"id\":\"yxeb\",\"name\":\"ybpmzznrtffyaq\",\"type\":\"tmhheioqa\"}],\"nextLink\":\"v\"}") - .toObject(ModelContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("svgjrwhryvy", model.value().get(0).properties().description()); - Assertions.assertEquals("dclxgc", model.value().get(0).properties().tags().get("knfnwmbtmvpdv")); - Assertions.assertEquals("ttzaefed", model.value().get(0).properties().properties().get("ihchrphkmcrjdqn")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("v", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelContainerResourceArmPaginatedResult model - = new ModelContainerResourceArmPaginatedResult().withValue(Arrays.asList( - new ModelContainerInner().withProperties(new ModelContainerProperties().withDescription("svgjrwhryvy") - .withTags(mapOf("knfnwmbtmvpdv", "dclxgc")) - .withProperties(mapOf("ihchrphkmcrjdqn", "ttzaefed")) - .withIsArchived(true)), - new ModelContainerInner().withProperties(new ModelContainerProperties().withDescription("ipifhpfeoajvg") - .withTags(mapOf("sr", "xjcsheafidltu", "h", "smkss", "egprhptil", "iftxfkf", "qtgdqohmcwsl", "ucb")) - .withProperties(mapOf("llibphbqzmizak", "zetpwbra", "jpdn", "kan")) - .withIsArchived(false)), - new ModelContainerInner() - .withProperties(new ModelContainerProperties().withDescription("weoohguufuzboyj") - .withTags(mapOf("jscjpahl", "wtzolbaemwmdxmeb", "yijddtvqcttad", "veabfqxnmwmqtib")) - .withProperties(mapOf("ieekpndzaa", "eukmr", "igpibud", "mudqmeq")) - .withIsArchived(false)))) - .withNextLink("v"); - model = BinaryData.fromObject(model).toObject(ModelContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("svgjrwhryvy", model.value().get(0).properties().description()); - Assertions.assertEquals("dclxgc", model.value().get(0).properties().tags().get("knfnwmbtmvpdv")); - Assertions.assertEquals("ttzaefed", model.value().get(0).properties().properties().get("ihchrphkmcrjdqn")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("v", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 2a5ca165ff07..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -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 reactor.core.publisher.Mono; - -public final class ModelContainersCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"rwnpwgchlabtt\",\"nextVersion\":\"ittheaxq\",\"description\":\"flnl\",\"tags\":{\"gqtcxyrslegh\":\"csslellfukqurrtc\"},\"properties\":{\"zr\":\"mjjsvym\",\"spjqafsxvqq\":\"yyvlx\",\"vvih\":\"azoblxxksputiz\"}},\"id\":\"sdolodfodokhaog\",\"name\":\"wdhlnarjtuoarj\",\"type\":\"riccuyqtj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ModelContainer response = manager.modelContainers() - .define("xm") - .withExistingWorkspace("jnpatazfyxegkly", "d") - .withProperties(new ModelContainerProperties().withDescription("forgcufi") - .withTags(mapOf("zknybfsoayatq", "roiz", "oggdp", "dzuxpldzkvbebdjs")) - .withProperties(mapOf("ooyxc", "oxlccj", "jhqq", "zzogz")) - .withIsArchived(false)) - .create(); - - Assertions.assertEquals("flnl", response.properties().description()); - Assertions.assertEquals("csslellfukqurrtc", response.properties().tags().get("gqtcxyrslegh")); - Assertions.assertEquals("mjjsvym", response.properties().properties().get("zr")); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteWithResponseMockTests.java deleted file mode 100644 index 674e9ac21035..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ModelContainersDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.modelContainers().deleteWithResponse("gnwwji", "gpwdczzkz", "bpj", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetWithResponseMockTests.java deleted file mode 100644 index 95a9b05b3f6f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ModelContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":true,\"latestVersion\":\"zqhph\",\"nextVersion\":\"jmi\",\"description\":\"vnrj\",\"tags\":{\"lldglzdkxftjre\":\"pbgtzrgyrldo\"},\"properties\":{\"ztghdwrvffjpw\":\"kvbdvlazkxaujjr\",\"cplxid\":\"zlfyftgae\",\"puw\":\"uxzzhldaxvi\"}},\"id\":\"f\",\"name\":\"nwvrbbpgibyzrpq\",\"type\":\"hrdldvxcjj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ModelContainer response = manager.modelContainers() - .getWithResponse("hhiofcnyzqznld", "ngqwmllegucem", "gs", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vnrj", response.properties().description()); - Assertions.assertEquals("pbgtzrgyrldo", response.properties().tags().get("lldglzdkxftjre")); - Assertions.assertEquals("kvbdvlazkxaujjr", response.properties().properties().get("ztghdwrvffjpw")); - Assertions.assertEquals(true, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListMockTests.java deleted file mode 100644 index 761268dd3f51..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ModelContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":false,\"latestVersion\":\"mebmxzwcf\",\"nextVersion\":\"x\",\"description\":\"rppwksixho\",\"tags\":{\"dqttiqwixsdx\":\"ydxjkdsqeay\",\"tvbqhyszflzjzdci\":\"flwfvahbwhrguq\",\"shbkdptcm\":\"xlggrtpayfklb\"},\"properties\":{\"fiykloeqx\":\"nvkhjtrashnf\"}},\"id\":\"pqboubehzipyia\",\"name\":\"suuvo\",\"type\":\"qseoinxkothrn\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.modelContainers() - .list("k", "bqyfecnsqeewf", "wgmkcaya", 659953867, ListViewType.ALL, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("rppwksixho", response.iterator().next().properties().description()); - Assertions.assertEquals("ydxjkdsqeay", response.iterator().next().properties().tags().get("dqttiqwixsdx")); - Assertions.assertEquals("nvkhjtrashnf", response.iterator().next().properties().properties().get("fiykloeqx")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelSettingsTests.java deleted file mode 100644 index 05d7123de90a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ModelSettings; -import org.junit.jupiter.api.Assertions; - -public final class ModelSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelSettings model = BinaryData.fromString("{\"modelId\":\"okatu\"}").toObject(ModelSettings.class); - Assertions.assertEquals("okatu", model.modelId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelSettings model = new ModelSettings().withModelId("okatu"); - model = BinaryData.fromObject(model).toObject(ModelSettings.class); - Assertions.assertEquals("okatu", model.modelId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionInnerTests.java deleted file mode 100644 index 6eca28a3d3dc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelVersionInner model = BinaryData.fromString( - "{\"properties\":{\"flavors\":{\"zcyjtot\":{\"data\":{\"ftpmdtzfjltfv\":\"lgorb\"}}},\"modelType\":\"opv\",\"modelUri\":\"dbzqgqqihed\",\"jobName\":\"qwthmky\",\"provisioningState\":\"Deleting\",\"stage\":\"sihsgqcwdhohsd\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"ufcohdxbz\",\"tags\":{\"qxeysko\":\"muapcvhdbevw\",\"z\":\"qzinkfkbg\",\"vkzqk\":\"owxeqocljmy\"},\"properties\":{\"zrxcczurt\":\"okbzef\",\"pqxbkwvzgnzvdf\":\"e\"}},\"id\":\"d\",\"name\":\"xzmqpnodawop\",\"type\":\"hewjptmcgsbost\"}") - .toObject(ModelVersionInner.class); - Assertions.assertEquals("ufcohdxbz", model.properties().description()); - Assertions.assertEquals("muapcvhdbevw", model.properties().tags().get("qxeysko")); - Assertions.assertEquals("okbzef", model.properties().properties().get("zrxcczurt")); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals("lgorb", model.properties().flavors().get("zcyjtot").data().get("ftpmdtzfjltfv")); - Assertions.assertEquals("opv", model.properties().modelType()); - Assertions.assertEquals("dbzqgqqihed", model.properties().modelUri()); - Assertions.assertEquals("qwthmky", model.properties().jobName()); - Assertions.assertEquals("sihsgqcwdhohsd", model.properties().stage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelVersionInner model - = new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("ufcohdxbz") - .withTags(mapOf("qxeysko", "muapcvhdbevw", "z", "qzinkfkbg", "vkzqk", "owxeqocljmy")) - .withProperties(mapOf("zrxcczurt", "okbzef", "pqxbkwvzgnzvdf", "e")) - .withIsArchived(false) - .withIsAnonymous(false) - .withFlavors(mapOf("zcyjtot", new FlavorData().withData(mapOf("ftpmdtzfjltfv", "lgorb")))) - .withModelType("opv") - .withModelUri("dbzqgqqihed") - .withJobName("qwthmky") - .withStage("sihsgqcwdhohsd")); - model = BinaryData.fromObject(model).toObject(ModelVersionInner.class); - Assertions.assertEquals("ufcohdxbz", model.properties().description()); - Assertions.assertEquals("muapcvhdbevw", model.properties().tags().get("qxeysko")); - Assertions.assertEquals("okbzef", model.properties().properties().get("zrxcczurt")); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals("lgorb", model.properties().flavors().get("zcyjtot").data().get("ftpmdtzfjltfv")); - Assertions.assertEquals("opv", model.properties().modelType()); - Assertions.assertEquals("dbzqgqqihed", model.properties().modelUri()); - Assertions.assertEquals("qwthmky", model.properties().jobName()); - Assertions.assertEquals("sihsgqcwdhohsd", model.properties().stage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionPropertiesTests.java deleted file mode 100644 index 1fd0f7511319..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionPropertiesTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelVersionProperties model = BinaryData.fromString( - "{\"flavors\":{\"neqvcwwyyurmo\":{\"data\":{\"utmzlbiojlvfhrbb\":\"la\"}}},\"modelType\":\"ppr\",\"modelUri\":\"snmokayzej\",\"jobName\":\"lbkpb\",\"provisioningState\":\"Failed\",\"stage\":\"iljhahz\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"bnwieholew\",\"tags\":{\"fqsfa\":\"uubw\",\"wexjkmfxapjwogq\":\"aqtferr\",\"awbzasqb\":\"nobpudcdabtqwpw\"},\"properties\":{\"yexaoguy\":\"jg\",\"ids\":\"i\"}}") - .toObject(ModelVersionProperties.class); - Assertions.assertEquals("bnwieholew", model.description()); - Assertions.assertEquals("uubw", model.tags().get("fqsfa")); - Assertions.assertEquals("jg", model.properties().get("yexaoguy")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("la", model.flavors().get("neqvcwwyyurmo").data().get("utmzlbiojlvfhrbb")); - Assertions.assertEquals("ppr", model.modelType()); - Assertions.assertEquals("snmokayzej", model.modelUri()); - Assertions.assertEquals("lbkpb", model.jobName()); - Assertions.assertEquals("iljhahz", model.stage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelVersionProperties model = new ModelVersionProperties().withDescription("bnwieholew") - .withTags(mapOf("fqsfa", "uubw", "wexjkmfxapjwogq", "aqtferr", "awbzasqb", "nobpudcdabtqwpw")) - .withProperties(mapOf("yexaoguy", "jg", "ids", "i")) - .withIsArchived(true) - .withIsAnonymous(false) - .withFlavors(mapOf("neqvcwwyyurmo", new FlavorData().withData(mapOf("utmzlbiojlvfhrbb", "la")))) - .withModelType("ppr") - .withModelUri("snmokayzej") - .withJobName("lbkpb") - .withStage("iljhahz"); - model = BinaryData.fromObject(model).toObject(ModelVersionProperties.class); - Assertions.assertEquals("bnwieholew", model.description()); - Assertions.assertEquals("uubw", model.tags().get("fqsfa")); - Assertions.assertEquals("jg", model.properties().get("yexaoguy")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("la", model.flavors().get("neqvcwwyyurmo").data().get("utmzlbiojlvfhrbb")); - Assertions.assertEquals("ppr", model.modelType()); - Assertions.assertEquals("snmokayzej", model.modelUri()); - Assertions.assertEquals("lbkpb", model.jobName()); - Assertions.assertEquals("iljhahz", model.stage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionResourceArmPaginatedResultTests.java deleted file mode 100644 index a1c46416a0f1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -import com.azure.resourcemanager.machinelearning.models.ModelVersionResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelVersionResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelVersionResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"flavors\":{\"jjrcgegydc\":{\"data\":{\"ibn\":\"xqnrkcxk\",\"swqrntvlwijp\":\"mysu\",\"uncuw\":\"ttexoqqpwcyyufmh\",\"unqndyfpchrqb\":\"qspkcdqzhlctd\"}}},\"modelType\":\"oxjumvqqo\",\"modelUri\":\"hrraiouaubrj\",\"jobName\":\"oq\",\"provisioningState\":\"Deleting\",\"stage\":\"jrngif\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"ccbiuimzdlyjdfq\",\"tags\":{\"lzo\":\"yoqufdvruz\",\"fnmdxotn\":\"hpc\"},\"properties\":{\"i\":\"gugey\"}},\"id\":\"rkyui\",\"name\":\"absnmfpp\",\"type\":\"ojeevy\"},{\"properties\":{\"flavors\":{\"eglqgleohibetn\":{\"data\":{\"mfg\":\"zfczbg\"}}},\"modelType\":\"ankrrfxee\",\"modelUri\":\"tijv\",\"jobName\":\"vbmqzbqq\",\"provisioningState\":\"Creating\",\"stage\":\"rnwxacevehjkuyxo\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"lt\",\"tags\":{\"nm\":\"yl\"},\"properties\":{\"oqeyhlqhykprl\":\"xirpghriy\",\"mexiitdfuxt\":\"yznuciqd\",\"nlj\":\"asiibmiybnnust\"}},\"id\":\"mgixhcmavmqfou\",\"name\":\"or\",\"type\":\"cgyypro\"}],\"nextLink\":\"ypundmbxhugc\"}") - .toObject(ModelVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("ccbiuimzdlyjdfq", model.value().get(0).properties().description()); - Assertions.assertEquals("yoqufdvruz", model.value().get(0).properties().tags().get("lzo")); - Assertions.assertEquals("gugey", model.value().get(0).properties().properties().get("i")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("xqnrkcxk", - model.value().get(0).properties().flavors().get("jjrcgegydc").data().get("ibn")); - Assertions.assertEquals("oxjumvqqo", model.value().get(0).properties().modelType()); - Assertions.assertEquals("hrraiouaubrj", model.value().get(0).properties().modelUri()); - Assertions.assertEquals("oq", model.value().get(0).properties().jobName()); - Assertions.assertEquals("jrngif", model.value().get(0).properties().stage()); - Assertions.assertEquals("ypundmbxhugc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelVersionResourceArmPaginatedResult model - = new ModelVersionResourceArmPaginatedResult().withValue(Arrays.asList( - new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("ccbiuimzdlyjdfq") - .withTags(mapOf("lzo", "yoqufdvruz", "fnmdxotn", "hpc")) - .withProperties(mapOf("i", "gugey")) - .withIsArchived(false) - .withIsAnonymous(false) - .withFlavors(mapOf("jjrcgegydc", - new FlavorData().withData(mapOf("ibn", "xqnrkcxk", "swqrntvlwijp", "mysu", "uncuw", - "ttexoqqpwcyyufmh", "unqndyfpchrqb", "qspkcdqzhlctd")))) - .withModelType("oxjumvqqo") - .withModelUri("hrraiouaubrj") - .withJobName("oq") - .withStage("jrngif")), - new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("lt") - .withTags(mapOf("nm", "yl")) - .withProperties( - mapOf("oqeyhlqhykprl", "xirpghriy", "mexiitdfuxt", "yznuciqd", "nlj", "asiibmiybnnust")) - .withIsArchived(false) - .withIsAnonymous(false) - .withFlavors(mapOf("eglqgleohibetn", new FlavorData().withData(mapOf("mfg", "zfczbg")))) - .withModelType("ankrrfxee") - .withModelUri("tijv") - .withJobName("vbmqzbqq") - .withStage("rnwxacevehjkuyxo")))) - .withNextLink("ypundmbxhugc"); - model = BinaryData.fromObject(model).toObject(ModelVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("ccbiuimzdlyjdfq", model.value().get(0).properties().description()); - Assertions.assertEquals("yoqufdvruz", model.value().get(0).properties().tags().get("lzo")); - Assertions.assertEquals("gugey", model.value().get(0).properties().properties().get("i")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("xqnrkcxk", - model.value().get(0).properties().flavors().get("jjrcgegydc").data().get("ibn")); - Assertions.assertEquals("oxjumvqqo", model.value().get(0).properties().modelType()); - Assertions.assertEquals("hrraiouaubrj", model.value().get(0).properties().modelUri()); - Assertions.assertEquals("oq", model.value().get(0).properties().jobName()); - Assertions.assertEquals("jrngif", model.value().get(0).properties().stage()); - Assertions.assertEquals("ypundmbxhugc", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 590c09cc3493..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -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 reactor.core.publisher.Mono; - -public final class ModelVersionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"flavors\":{\"eouxpdnl\":{\"data\":{\"eipfotaaqyxk\":\"qztrpj\",\"q\":\"oabcoxqaavjkre\",\"ivianklqclftp\":\"sviysbvo\"}},\"xfspxghwf\":{\"data\":{\"ohnroa\":\"bc\",\"ur\":\"zekg\"}}},\"modelType\":\"uofegrzfsf\",\"modelUri\":\"ookwnz\",\"jobName\":\"jb\",\"provisioningState\":\"Deleting\",\"stage\":\"dlo\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"kkqvmmmw\",\"tags\":{\"mnsmnjitxug\":\"cauegym\",\"ioecmbyoxpv\":\"lbibwodayipgsh\"},\"properties\":{\"okzdshhhdixn\":\"chfuxuqpdde\",\"ywspajakjhv\":\"apzibmstvzzkzv\",\"srvsbkn\":\"ktbnmhxtmzzpau\"}},\"id\":\"uytsaj\",\"name\":\"gvusnwich\",\"type\":\"kwctlsohrtgpv\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ModelVersion response = manager.modelVersions() - .define("wzoup") - .withExistingModel("lllkfjgjl", "fssgieb", "vuscmcegy") - .withProperties(new ModelVersionProperties().withDescription("v") - .withTags(mapOf("cvnhpebuiywkysgq", "jzofyldxkzhvfo", "dnmguifqj", "cbeauvld", "arfumitjaiis", - "oxzxbljpzauug")) - .withProperties(mapOf("y", "fdyb", "rwrylcttvxk", "bgmjrvrsqrjco", "jbl", "gffpvvqwvvnxoqaa", - "tsztxoswvfrym", "qwwtevfeugc")) - .withIsArchived(false) - .withIsAnonymous(false) - .withFlavors(mapOf("sgn", - new FlavorData() - .withData(mapOf("o", "ffvxnis", "zzcdrgtu", "wfdtjpsjwlpcxl", "rolge", "oouocafaxvhjrpb")), - "bnduqgjibrxxiao", - new FlavorData().withData(mapOf("uwd", "tx", "cbwmvp", "rqahlbyjahbzbtlm", "rlazcgwn", "mjyzice")), - "okoxqboz", new FlavorData().withData(mapOf("pugnvhtgwadu", "uhumgw")))) - .withModelType("xzwinrguk") - .withModelUri("bov") - .withJobName("ltqlqufkrnrbnjkc") - .withStage("qlyputawdmd")) - .create(); - - Assertions.assertEquals("kkqvmmmw", response.properties().description()); - Assertions.assertEquals("cauegym", response.properties().tags().get("mnsmnjitxug")); - Assertions.assertEquals("chfuxuqpdde", response.properties().properties().get("okzdshhhdixn")); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("qztrpj", response.properties().flavors().get("eouxpdnl").data().get("eipfotaaqyxk")); - Assertions.assertEquals("uofegrzfsf", response.properties().modelType()); - Assertions.assertEquals("ookwnz", response.properties().modelUri()); - Assertions.assertEquals("jb", response.properties().jobName()); - Assertions.assertEquals("dlo", response.properties().stage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteWithResponseMockTests.java deleted file mode 100644 index 33cd76ac7430..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ModelVersionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.modelVersions() - .deleteWithResponse("bargbmemopypc", "omowucjznnowp", "xuuv", "wsrmegph", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetWithResponseMockTests.java deleted file mode 100644 index e23b28e761e2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ModelVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"flavors\":{\"wcaicd\":{\"data\":{\"aptexzylqhew\":\"suyqvmxnavxzp\",\"wggmitdwolfmfaz\":\"cchexczrmyn\"}},\"nyhivhyujqxyfb\":{\"data\":{\"wohddli\":\"tzf\",\"evuuk\":\"kkosqpliegemtnb\",\"tlrbzqtu\":\"diksncrz\",\"ftohdlpcixpx\":\"gajfa\"}},\"mcivhwwhyej\":{\"data\":{\"ohgcnr\":\"ylayabrdnovuduww\"}},\"dispasxwiicfsbj\":{\"data\":{\"fsqbcfqaqoveqowq\":\"dfcfyzwkmr\"}}},\"modelType\":\"adndowkxq\",\"modelUri\":\"sax\",\"jobName\":\"ieehpvqfifrr\",\"provisioningState\":\"Deleting\",\"stage\":\"gjgyovcpgqiism\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"oykrbk\",\"tags\":{\"mtrhwwdfncquty\":\"cmjkron\",\"mepbmogtfpksk\":\"zhzlvkmirnvdbza\",\"rlyynkgnychu\":\"syoh\",\"oeodgnu\":\"hngwtbhjgli\"},\"properties\":{\"mfixtyavv\":\"fgtw\",\"o\":\"xjqdj\"}},\"id\":\"gegwxjgkrppmvno\",\"name\":\"t\",\"type\":\"qciqawhkdk\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ModelVersion response = manager.modelVersions() - .getWithResponse("j", "fkjd", "lqtqjabwtk", "jytvq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("oykrbk", response.properties().description()); - Assertions.assertEquals("cmjkron", response.properties().tags().get("mtrhwwdfncquty")); - Assertions.assertEquals("fgtw", response.properties().properties().get("mfixtyavv")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals("suyqvmxnavxzp", - response.properties().flavors().get("wcaicd").data().get("aptexzylqhew")); - Assertions.assertEquals("adndowkxq", response.properties().modelType()); - Assertions.assertEquals("sax", response.properties().modelUri()); - Assertions.assertEquals("ieehpvqfifrr", response.properties().jobName()); - Assertions.assertEquals("gjgyovcpgqiism", response.properties().stage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListMockTests.java deleted file mode 100644 index 4644b12b8dd7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ModelVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"flavors\":{\"wqyousqmern\":{\"data\":{\"rhyx\":\"xzqzjv\"}}},\"modelType\":\"plgmem\",\"modelUri\":\"ouwmjxhmkchjdxr\",\"jobName\":\"hukxuq\",\"provisioningState\":\"Succeeded\",\"stage\":\"eqpgadesnesgnxd\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"vsictoqcezmzn\",\"tags\":{\"qbz\":\"qdu\",\"x\":\"yzajdpbnbp\",\"xi\":\"opryutxasnigh\"},\"properties\":{\"ggzqheitty\":\"i\",\"gw\":\"ipfudzntbzg\"}},\"id\":\"wypbqnxpohcrk\",\"name\":\"bajyuegsbuqdp\",\"type\":\"hqeczzutxtidsxre\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.modelVersions() - .list("rzdjgmgfayvbs", "aenvpzd", "zpizgaujv", "uwfy", "xorrceom", 1638949557, "arb", "rkdnoef", 2111895596, - "pjiudnustbmox", "hg", "dnhbhu", ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vsictoqcezmzn", response.iterator().next().properties().description()); - Assertions.assertEquals("qdu", response.iterator().next().properties().tags().get("qbz")); - Assertions.assertEquals("i", response.iterator().next().properties().properties().get("ggzqheitty")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("xzqzjv", - response.iterator().next().properties().flavors().get("wqyousqmern").data().get("rhyx")); - Assertions.assertEquals("plgmem", response.iterator().next().properties().modelType()); - Assertions.assertEquals("ouwmjxhmkchjdxr", response.iterator().next().properties().modelUri()); - Assertions.assertEquals("hukxuq", response.iterator().next().properties().jobName()); - Assertions.assertEquals("eqpgadesnesgnxd", response.iterator().next().properties().stage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishMockTests.java deleted file mode 100644 index 6fed962ed95e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ModelVersionsPublishMockTests { - @Test - public void testPublish() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.modelVersions() - .publish("aqspbdscotidik", "mtmjkfmrjngrjsq", "irha", "hhpcvsdy", - new DestinationAsset().withRegistryName("bydrgxvnmt") - .withDestinationName("uxrdmudwruog") - .withDestinationVersion("hfqcyyc"), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeConfigurationBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeConfigurationBaseTests.java deleted file mode 100644 index a9458a463949..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeConfigurationBaseTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MonitorComputeConfigurationBase; - -public final class MonitorComputeConfigurationBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitorComputeConfigurationBase model - = BinaryData.fromString("{\"computeType\":\"MonitorComputeConfigurationBase\"}") - .toObject(MonitorComputeConfigurationBase.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitorComputeConfigurationBase model = new MonitorComputeConfigurationBase(); - model = BinaryData.fromObject(model).toObject(MonitorComputeConfigurationBase.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeIdentityBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeIdentityBaseTests.java deleted file mode 100644 index 79226c313ce7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeIdentityBaseTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MonitorComputeIdentityBase; - -public final class MonitorComputeIdentityBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitorComputeIdentityBase model - = BinaryData.fromString("{\"computeIdentityType\":\"MonitorComputeIdentityBase\"}") - .toObject(MonitorComputeIdentityBase.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitorComputeIdentityBase model = new MonitorComputeIdentityBase(); - model = BinaryData.fromObject(model).toObject(MonitorComputeIdentityBase.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorDefinitionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorDefinitionTests.java deleted file mode 100644 index aca1e756d025..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorDefinitionTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ModelTaskType; -import com.azure.resourcemanager.machinelearning.models.MonitorComputeConfigurationBase; -import com.azure.resourcemanager.machinelearning.models.MonitorDefinition; -import com.azure.resourcemanager.machinelearning.models.MonitorEmailNotificationSettings; -import com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType; -import com.azure.resourcemanager.machinelearning.models.MonitoringSignalBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringTarget; -import com.azure.resourcemanager.machinelearning.models.MonitorNotificationSettings; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MonitorDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitorDefinition model = BinaryData.fromString( - "{\"monitoringTarget\":{\"modelId\":\"cgdhyhgoq\",\"deploymentId\":\"oyqyxyjrcbqpb\",\"taskType\":\"Classification\"},\"signals\":{\"oeehpmjenvjeatea\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"fwjlof\":\"tdahneaoovtyjzti\",\"uklajvcfoc\":\"ekfsrm\",\"kwxnhwhhnoyrza\":\"hapejov\"}},\"kft\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"olrndwdb\":\"djxldnaryyinzk\",\"xlu\":\"xvzaledoy\"}}},\"computeConfiguration\":{\"computeType\":\"MonitorComputeConfigurationBase\"},\"alertNotificationSettings\":{\"emailNotificationSettings\":{\"emails\":[\"qxmyzkl\",\"oanpohrvm\",\"rqra\",\"a\"]}}}") - .toObject(MonitorDefinition.class); - Assertions.assertEquals("cgdhyhgoq", model.monitoringTarget().modelId()); - Assertions.assertEquals("oyqyxyjrcbqpb", model.monitoringTarget().deploymentId()); - Assertions.assertEquals(ModelTaskType.CLASSIFICATION, model.monitoringTarget().taskType()); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, - model.signals().get("oeehpmjenvjeatea").notificationTypes().get(0)); - Assertions.assertEquals("tdahneaoovtyjzti", model.signals().get("oeehpmjenvjeatea").properties().get("fwjlof")); - Assertions.assertEquals("qxmyzkl", - model.alertNotificationSettings().emailNotificationSettings().emails().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitorDefinition model = new MonitorDefinition() - .withMonitoringTarget(new MonitoringTarget().withModelId("cgdhyhgoq") - .withDeploymentId("oyqyxyjrcbqpb") - .withTaskType(ModelTaskType.CLASSIFICATION)) - .withSignals(mapOf("oeehpmjenvjeatea", - new MonitoringSignalBase() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties( - mapOf("fwjlof", "tdahneaoovtyjzti", "uklajvcfoc", "ekfsrm", "kwxnhwhhnoyrza", "hapejov")), - "kft", - new MonitoringSignalBase() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("olrndwdb", "djxldnaryyinzk", "xlu", "xvzaledoy")))) - .withComputeConfiguration(new MonitorComputeConfigurationBase()) - .withAlertNotificationSettings(new MonitorNotificationSettings().withEmailNotificationSettings( - new MonitorEmailNotificationSettings().withEmails(Arrays.asList("qxmyzkl", "oanpohrvm", "rqra", "a")))); - model = BinaryData.fromObject(model).toObject(MonitorDefinition.class); - Assertions.assertEquals("cgdhyhgoq", model.monitoringTarget().modelId()); - Assertions.assertEquals("oyqyxyjrcbqpb", model.monitoringTarget().deploymentId()); - Assertions.assertEquals(ModelTaskType.CLASSIFICATION, model.monitoringTarget().taskType()); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, - model.signals().get("oeehpmjenvjeatea").notificationTypes().get(0)); - Assertions.assertEquals("tdahneaoovtyjzti", model.signals().get("oeehpmjenvjeatea").properties().get("fwjlof")); - Assertions.assertEquals("qxmyzkl", - model.alertNotificationSettings().emailNotificationSettings().emails().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorEmailNotificationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorEmailNotificationSettingsTests.java deleted file mode 100644 index 2247c0405920..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorEmailNotificationSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MonitorEmailNotificationSettings; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitorEmailNotificationSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitorEmailNotificationSettings model - = BinaryData.fromString("{\"emails\":[\"eu\"]}").toObject(MonitorEmailNotificationSettings.class); - Assertions.assertEquals("eu", model.emails().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitorEmailNotificationSettings model = new MonitorEmailNotificationSettings().withEmails(Arrays.asList("eu")); - model = BinaryData.fromObject(model).toObject(MonitorEmailNotificationSettings.class); - Assertions.assertEquals("eu", model.emails().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorNotificationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorNotificationSettingsTests.java deleted file mode 100644 index d93d473a7f0f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorNotificationSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MonitorEmailNotificationSettings; -import com.azure.resourcemanager.machinelearning.models.MonitorNotificationSettings; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitorNotificationSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitorNotificationSettings model = BinaryData - .fromString("{\"emailNotificationSettings\":{\"emails\":[\"mrjctryldsxeb\",\"hsxrznmgsdaluyc\",\"hefr\"]}}") - .toObject(MonitorNotificationSettings.class); - Assertions.assertEquals("mrjctryldsxeb", model.emailNotificationSettings().emails().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitorNotificationSettings model - = new MonitorNotificationSettings().withEmailNotificationSettings(new MonitorEmailNotificationSettings() - .withEmails(Arrays.asList("mrjctryldsxeb", "hsxrznmgsdaluyc", "hefr"))); - model = BinaryData.fromObject(model).toObject(MonitorNotificationSettings.class); - Assertions.assertEquals("mrjctryldsxeb", model.emailNotificationSettings().emails().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorServerlessSparkComputeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorServerlessSparkComputeTests.java deleted file mode 100644 index f8e05273be15..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorServerlessSparkComputeTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MonitorComputeIdentityBase; -import com.azure.resourcemanager.machinelearning.models.MonitorServerlessSparkCompute; -import org.junit.jupiter.api.Assertions; - -public final class MonitorServerlessSparkComputeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitorServerlessSparkCompute model = BinaryData.fromString( - "{\"computeType\":\"ServerlessSpark\",\"computeIdentity\":{\"computeIdentityType\":\"MonitorComputeIdentityBase\"},\"instanceType\":\"ffcnuestbsliejdn\",\"runtimeVersion\":\"cotelikjiyteh\"}") - .toObject(MonitorServerlessSparkCompute.class); - Assertions.assertEquals("ffcnuestbsliejdn", model.instanceType()); - Assertions.assertEquals("cotelikjiyteh", model.runtimeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitorServerlessSparkCompute model - = new MonitorServerlessSparkCompute().withComputeIdentity(new MonitorComputeIdentityBase()) - .withInstanceType("ffcnuestbsliejdn") - .withRuntimeVersion("cotelikjiyteh"); - model = BinaryData.fromObject(model).toObject(MonitorServerlessSparkCompute.class); - Assertions.assertEquals("ffcnuestbsliejdn", model.instanceType()); - Assertions.assertEquals("cotelikjiyteh", model.runtimeVersion()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringFeatureFilterBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringFeatureFilterBaseTests.java deleted file mode 100644 index 5438736a88af..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringFeatureFilterBaseTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MonitoringFeatureFilterBase; - -public final class MonitoringFeatureFilterBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringFeatureFilterBase model = BinaryData.fromString("{\"filterType\":\"MonitoringFeatureFilterBase\"}") - .toObject(MonitoringFeatureFilterBase.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringFeatureFilterBase model = new MonitoringFeatureFilterBase(); - model = BinaryData.fromObject(model).toObject(MonitoringFeatureFilterBase.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringInputDataBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringInputDataBaseTests.java deleted file mode 100644 index 5eb0a6a10828..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringInputDataBaseTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobInputType; -import com.azure.resourcemanager.machinelearning.models.MonitoringInputDataBase; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringInputDataBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringInputDataBase model = BinaryData.fromString( - "{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"twujjzgx\",\"jobInputType\":\"mlflow_model\",\"uri\":\"qwlxrhg\",\"columns\":{\"bkkteo\":\"vtqqy\",\"vmvm\":\"ejogmkor\",\"osnqliwkmzojfe\":\"ofnqhlbs\"}}") - .toObject(MonitoringInputDataBase.class); - Assertions.assertEquals("twujjzgx", model.dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.jobInputType()); - Assertions.assertEquals("qwlxrhg", model.uri()); - Assertions.assertEquals("vtqqy", model.columns().get("bkkteo")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringInputDataBase model = new MonitoringInputDataBase().withDataContext("twujjzgx") - .withJobInputType(JobInputType.MLFLOW_MODEL) - .withUri("qwlxrhg") - .withColumns(mapOf("bkkteo", "vtqqy", "vmvm", "ejogmkor", "osnqliwkmzojfe", "ofnqhlbs")); - model = BinaryData.fromObject(model).toObject(MonitoringInputDataBase.class); - Assertions.assertEquals("twujjzgx", model.dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.jobInputType()); - Assertions.assertEquals("qwlxrhg", model.uri()); - Assertions.assertEquals("vtqqy", model.columns().get("bkkteo")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringSignalBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringSignalBaseTests.java deleted file mode 100644 index 5307137c38c4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringSignalBaseTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType; -import com.azure.resourcemanager.machinelearning.models.MonitoringSignalBase; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringSignalBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringSignalBase model = BinaryData.fromString( - "{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"nwldfmhljq\":\"igbsfsgsa\"}}") - .toObject(MonitoringSignalBase.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("igbsfsgsa", model.properties().get("nwldfmhljq")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringSignalBase model = new MonitoringSignalBase() - .withNotificationTypes( - Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("nwldfmhljq", "igbsfsgsa")); - model = BinaryData.fromObject(model).toObject(MonitoringSignalBase.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("igbsfsgsa", model.properties().get("nwldfmhljq")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringTargetTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringTargetTests.java deleted file mode 100644 index c5e8a7dc8cdc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringTargetTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ModelTaskType; -import com.azure.resourcemanager.machinelearning.models.MonitoringTarget; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringTargetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringTarget model = BinaryData - .fromString("{\"modelId\":\"vznllaslkskhjqj\",\"deploymentId\":\"baihxjtgzg\",\"taskType\":\"Regression\"}") - .toObject(MonitoringTarget.class); - Assertions.assertEquals("vznllaslkskhjqj", model.modelId()); - Assertions.assertEquals("baihxjtgzg", model.deploymentId()); - Assertions.assertEquals(ModelTaskType.REGRESSION, model.taskType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringTarget model = new MonitoringTarget().withModelId("vznllaslkskhjqj") - .withDeploymentId("baihxjtgzg") - .withTaskType(ModelTaskType.REGRESSION); - model = BinaryData.fromObject(model).toObject(MonitoringTarget.class); - Assertions.assertEquals("vznllaslkskhjqj", model.modelId()); - Assertions.assertEquals("baihxjtgzg", model.deploymentId()); - Assertions.assertEquals(ModelTaskType.REGRESSION, model.taskType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringThresholdTests.java deleted file mode 100644 index 5467444a73c8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringThresholdTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringThreshold model - = BinaryData.fromString("{\"value\":18.738037219976512}").toObject(MonitoringThreshold.class); - Assertions.assertEquals(18.738037219976512D, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringThreshold model = new MonitoringThreshold().withValue(18.738037219976512D); - model = BinaryData.fromObject(model).toObject(MonitoringThreshold.class); - Assertions.assertEquals(18.738037219976512D, model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MpiTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MpiTests.java deleted file mode 100644 index 0965e8f042fe..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MpiTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Mpi; -import org.junit.jupiter.api.Assertions; - -public final class MpiTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Mpi model = BinaryData.fromString("{\"distributionType\":\"Mpi\",\"processCountPerInstance\":2025598947}") - .toObject(Mpi.class); - Assertions.assertEquals(2025598947, model.processCountPerInstance()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Mpi model = new Mpi().withProcessCountPerInstance(2025598947); - model = BinaryData.fromObject(model).toObject(Mpi.class); - Assertions.assertEquals(2025598947, model.processCountPerInstance()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NCrossValidationsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NCrossValidationsTests.java deleted file mode 100644 index f75ca36d9c3f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NCrossValidationsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.NCrossValidations; - -public final class NCrossValidationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NCrossValidations model - = BinaryData.fromString("{\"mode\":\"NCrossValidations\"}").toObject(NCrossValidations.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NCrossValidations model = new NCrossValidations(); - model = BinaryData.fromObject(model).toObject(NCrossValidations.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalFeaturizationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalFeaturizationSettingsTests.java deleted file mode 100644 index bd1df1afe399..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalFeaturizationSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings; -import org.junit.jupiter.api.Assertions; - -public final class NlpVerticalFeaturizationSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NlpVerticalFeaturizationSettings model = BinaryData.fromString("{\"datasetLanguage\":\"svxupqt\"}") - .toObject(NlpVerticalFeaturizationSettings.class); - Assertions.assertEquals("svxupqt", model.datasetLanguage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NlpVerticalFeaturizationSettings model = new NlpVerticalFeaturizationSettings().withDatasetLanguage("svxupqt"); - model = BinaryData.fromObject(model).toObject(NlpVerticalFeaturizationSettings.class); - Assertions.assertEquals("svxupqt", model.datasetLanguage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalLimitSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalLimitSettingsTests.java deleted file mode 100644 index 61989458289b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalLimitSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class NlpVerticalLimitSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NlpVerticalLimitSettings model = BinaryData - .fromString("{\"timeout\":\"PT132H5S\",\"maxTrials\":1475844965,\"maxConcurrentTrials\":2049501339}") - .toObject(NlpVerticalLimitSettings.class); - Assertions.assertEquals(Duration.parse("PT132H5S"), model.timeout()); - Assertions.assertEquals(1475844965, model.maxTrials()); - Assertions.assertEquals(2049501339, model.maxConcurrentTrials()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NlpVerticalLimitSettings model = new NlpVerticalLimitSettings().withTimeout(Duration.parse("PT132H5S")) - .withMaxTrials(1475844965) - .withMaxConcurrentTrials(2049501339); - model = BinaryData.fromObject(model).toObject(NlpVerticalLimitSettings.class); - Assertions.assertEquals(Duration.parse("PT132H5S"), model.timeout()); - Assertions.assertEquals(1475844965, model.maxTrials()); - Assertions.assertEquals(2049501339, model.maxConcurrentTrials()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalTests.java deleted file mode 100644 index 221fc2b0df56..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NlpVertical; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class NlpVerticalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NlpVertical model = BinaryData.fromString( - "{\"limitSettings\":{\"timeout\":\"PT133H10M21S\",\"maxTrials\":730548786,\"maxConcurrentTrials\":450987294},\"featurizationSettings\":{\"datasetLanguage\":\"qlngncrdorctysec\"},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"khxd\",\"mode\":\"ReadOnlyMount\",\"description\":\"tzcvimmwckoz\"}}") - .toObject(NlpVertical.class); - Assertions.assertEquals(Duration.parse("PT133H10M21S"), model.limitSettings().timeout()); - Assertions.assertEquals(730548786, model.limitSettings().maxTrials()); - Assertions.assertEquals(450987294, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("qlngncrdorctysec", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("tzcvimmwckoz", model.validationData().description()); - Assertions.assertEquals("khxd", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NlpVertical model = new NlpVertical() - .withLimitSettings(new NlpVerticalLimitSettings().withTimeout(Duration.parse("PT133H10M21S")) - .withMaxTrials(730548786) - .withMaxConcurrentTrials(450987294)) - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("qlngncrdorctysec")) - .withValidationData(new MLTableJobInput().withDescription("tzcvimmwckoz") - .withUri("khxd") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)); - model = BinaryData.fromObject(model).toObject(NlpVertical.class); - Assertions.assertEquals(Duration.parse("PT133H10M21S"), model.limitSettings().timeout()); - Assertions.assertEquals(730548786, model.limitSettings().maxTrials()); - Assertions.assertEquals(450987294, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("qlngncrdorctysec", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("tzcvimmwckoz", model.validationData().description()); - Assertions.assertEquals("khxd", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodeStateCountsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodeStateCountsTests.java deleted file mode 100644 index 72f14005c0df..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodeStateCountsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.NodeStateCounts; - -public final class NodeStateCountsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NodeStateCounts model = BinaryData.fromString( - "{\"idleNodeCount\":17437062,\"runningNodeCount\":194546120,\"preparingNodeCount\":863569272,\"unusableNodeCount\":765041265,\"leavingNodeCount\":232651506,\"preemptedNodeCount\":1489395185}") - .toObject(NodeStateCounts.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeStateCounts model = new NodeStateCounts(); - model = BinaryData.fromObject(model).toObject(NodeStateCounts.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodesTests.java deleted file mode 100644 index 9fdf16c020f6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodesTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Nodes; - -public final class NodesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Nodes model = BinaryData.fromString("{\"nodesValueType\":\"Nodes\"}").toObject(Nodes.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Nodes model = new Nodes(); - model = BinaryData.fromObject(model).toObject(Nodes.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NoneAuthTypeWorkspaceConnectionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NoneAuthTypeWorkspaceConnectionPropertiesTests.java deleted file mode 100644 index 0e35ff9a396a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NoneAuthTypeWorkspaceConnectionPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NoneAuthTypeWorkspaceConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NoneAuthTypeWorkspaceConnectionProperties model = BinaryData.fromString( - "{\"authType\":\"None\",\"category\":\"AzureSynapseAnalytics\",\"createdByWorkspaceArmId\":\"wf\",\"expiryTime\":\"2021-09-18T05:09:03Z\",\"group\":\"GenericProtocol\",\"isSharedToAll\":true,\"target\":\"lt\",\"metadata\":{\"vazjpwexcd\":\"gexojfccylhtrht\",\"o\":\"zp\",\"pjeuxsp\":\"zzxezmnrkj\",\"bhwbdqufvcgnrgla\":\"lokfpmijpdvzv\"},\"sharedUserList\":[\"yambhb\",\"febzxf\"],\"value\":\"qutibhl\",\"valueFormat\":\"JSON\"}") - .toObject(NoneAuthTypeWorkspaceConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.AZURE_SYNAPSE_ANALYTICS, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T05:09:03Z"), model.expiryTime()); - Assertions.assertEquals(true, model.isSharedToAll()); - Assertions.assertEquals("lt", model.target()); - Assertions.assertEquals("gexojfccylhtrht", model.metadata().get("vazjpwexcd")); - Assertions.assertEquals("yambhb", model.sharedUserList().get(0)); - Assertions.assertEquals("qutibhl", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NoneAuthTypeWorkspaceConnectionProperties model - = new NoneAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.AZURE_SYNAPSE_ANALYTICS) - .withExpiryTime(OffsetDateTime.parse("2021-09-18T05:09:03Z")) - .withIsSharedToAll(true) - .withTarget("lt") - .withMetadata(mapOf("vazjpwexcd", "gexojfccylhtrht", "o", "zp", "pjeuxsp", "zzxezmnrkj", - "bhwbdqufvcgnrgla", "lokfpmijpdvzv")) - .withSharedUserList(Arrays.asList("yambhb", "febzxf")) - .withValue("qutibhl") - .withValueFormat(ValueFormat.JSON); - model = BinaryData.fromObject(model).toObject(NoneAuthTypeWorkspaceConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.AZURE_SYNAPSE_ANALYTICS, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T05:09:03Z"), model.expiryTime()); - Assertions.assertEquals(true, model.isSharedToAll()); - Assertions.assertEquals("lt", model.target()); - Assertions.assertEquals("gexojfccylhtrht", model.metadata().get("vazjpwexcd")); - Assertions.assertEquals("yambhb", model.sharedUserList().get(0)); - Assertions.assertEquals("qutibhl", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NotificationSettingTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NotificationSettingTests.java deleted file mode 100644 index 7a80dacd79f9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NotificationSettingTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NotificationSettingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NotificationSetting model = BinaryData.fromString( - "{\"emails\":[\"nmbscbbx\",\"gdhxi\",\"d\",\"opedbwdpyqyybxub\"],\"emailOn\":[\"JobCancelled\",\"JobCompleted\"],\"webhooks\":{\"qacigeleo\":{\"webhookType\":\"Webhook\",\"eventType\":\"wremjel\"},\"r\":{\"webhookType\":\"Webhook\",\"eventType\":\"bvqvwzkjopwbeo\"},\"qfyiaseqchkr\":{\"webhookType\":\"Webhook\",\"eventType\":\"wzdqybxceakxcpts\"}}}") - .toObject(NotificationSetting.class); - Assertions.assertEquals("nmbscbbx", model.emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, model.emailOn().get(0)); - Assertions.assertEquals("wremjel", model.webhooks().get("qacigeleo").eventType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NotificationSetting model - = new NotificationSetting().withEmails(Arrays.asList("nmbscbbx", "gdhxi", "d", "opedbwdpyqyybxub")) - .withEmailOn( - Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED, EmailNotificationEnableType.JOB_COMPLETED)) - .withWebhooks(mapOf("qacigeleo", new Webhook().withEventType("wremjel"), "r", - new Webhook().withEventType("bvqvwzkjopwbeo"), "qfyiaseqchkr", - new Webhook().withEventType("wzdqybxceakxcpts"))); - model = BinaryData.fromObject(model).toObject(NotificationSetting.class); - Assertions.assertEquals("nmbscbbx", model.emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, model.emailOn().get(0)); - Assertions.assertEquals("wremjel", model.webhooks().get("qacigeleo").eventType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataDriftMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataDriftMetricThresholdTests.java deleted file mode 100644 index eef1a3ef4266..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataDriftMetricThresholdTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import com.azure.resourcemanager.machinelearning.models.NumericalDataDriftMetric; -import com.azure.resourcemanager.machinelearning.models.NumericalDataDriftMetricThreshold; -import org.junit.jupiter.api.Assertions; - -public final class NumericalDataDriftMetricThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NumericalDataDriftMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Numerical\",\"metric\":\"PopulationStabilityIndex\",\"threshold\":{\"value\":56.24244908661416}}") - .toObject(NumericalDataDriftMetricThreshold.class); - Assertions.assertEquals(56.24244908661416D, model.threshold().value()); - Assertions.assertEquals(NumericalDataDriftMetric.POPULATION_STABILITY_INDEX, model.metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NumericalDataDriftMetricThreshold model = new NumericalDataDriftMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(56.24244908661416D)) - .withMetric(NumericalDataDriftMetric.POPULATION_STABILITY_INDEX); - model = BinaryData.fromObject(model).toObject(NumericalDataDriftMetricThreshold.class); - Assertions.assertEquals(56.24244908661416D, model.threshold().value()); - Assertions.assertEquals(NumericalDataDriftMetric.POPULATION_STABILITY_INDEX, model.metric()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataQualityMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataQualityMetricThresholdTests.java deleted file mode 100644 index 0ed8af30995d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataQualityMetricThresholdTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import com.azure.resourcemanager.machinelearning.models.NumericalDataQualityMetric; -import com.azure.resourcemanager.machinelearning.models.NumericalDataQualityMetricThreshold; -import org.junit.jupiter.api.Assertions; - -public final class NumericalDataQualityMetricThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NumericalDataQualityMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Numerical\",\"metric\":\"OutOfBoundsRate\",\"threshold\":{\"value\":97.91248731841587}}") - .toObject(NumericalDataQualityMetricThreshold.class); - Assertions.assertEquals(97.91248731841587D, model.threshold().value()); - Assertions.assertEquals(NumericalDataQualityMetric.OUT_OF_BOUNDS_RATE, model.metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NumericalDataQualityMetricThreshold model = new NumericalDataQualityMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(97.91248731841587D)) - .withMetric(NumericalDataQualityMetric.OUT_OF_BOUNDS_RATE); - model = BinaryData.fromObject(model).toObject(NumericalDataQualityMetricThreshold.class); - Assertions.assertEquals(97.91248731841587D, model.threshold().value()); - Assertions.assertEquals(NumericalDataQualityMetric.OUT_OF_BOUNDS_RATE, model.metric()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalPredictionDriftMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalPredictionDriftMetricThresholdTests.java deleted file mode 100644 index d83d88282e6f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalPredictionDriftMetricThresholdTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import com.azure.resourcemanager.machinelearning.models.NumericalPredictionDriftMetric; -import com.azure.resourcemanager.machinelearning.models.NumericalPredictionDriftMetricThreshold; -import org.junit.jupiter.api.Assertions; - -public final class NumericalPredictionDriftMetricThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NumericalPredictionDriftMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Numerical\",\"metric\":\"TwoSampleKolmogorovSmirnovTest\",\"threshold\":{\"value\":63.51610151085381}}") - .toObject(NumericalPredictionDriftMetricThreshold.class); - Assertions.assertEquals(63.51610151085381D, model.threshold().value()); - Assertions.assertEquals(NumericalPredictionDriftMetric.TWO_SAMPLE_KOLMOGOROV_SMIRNOV_TEST, model.metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NumericalPredictionDriftMetricThreshold model = new NumericalPredictionDriftMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(63.51610151085381D)) - .withMetric(NumericalPredictionDriftMetric.TWO_SAMPLE_KOLMOGOROV_SMIRNOV_TEST); - model = BinaryData.fromObject(model).toObject(NumericalPredictionDriftMetricThreshold.class); - Assertions.assertEquals(63.51610151085381D, model.threshold().value()); - Assertions.assertEquals(NumericalPredictionDriftMetric.TWO_SAMPLE_KOLMOGOROV_SMIRNOV_TEST, model.metric()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ObjectiveTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ObjectiveTests.java deleted file mode 100644 index 2f93343745f5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ObjectiveTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Goal; -import com.azure.resourcemanager.machinelearning.models.Objective; -import org.junit.jupiter.api.Assertions; - -public final class ObjectiveTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Objective model = BinaryData.fromString("{\"primaryMetric\":\"hjxncqzahg\",\"goal\":\"Minimize\"}") - .toObject(Objective.class); - Assertions.assertEquals("hjxncqzahg", model.primaryMetric()); - Assertions.assertEquals(Goal.MINIMIZE, model.goal()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Objective model = new Objective().withPrimaryMetric("hjxncqzahg").withGoal(Goal.MINIMIZE); - model = BinaryData.fromObject(model).toObject(Objective.class); - Assertions.assertEquals("hjxncqzahg", model.primaryMetric()); - Assertions.assertEquals(Goal.MINIMIZE, model.goal()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OneLakeArtifactTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OneLakeArtifactTests.java deleted file mode 100644 index 9091e9d71dec..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OneLakeArtifactTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OneLakeArtifact; -import org.junit.jupiter.api.Assertions; - -public final class OneLakeArtifactTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OneLakeArtifact model - = BinaryData.fromString("{\"artifactType\":\"OneLakeArtifact\",\"artifactName\":\"tpcjpt\"}") - .toObject(OneLakeArtifact.class); - Assertions.assertEquals("tpcjpt", model.artifactName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OneLakeArtifact model = new OneLakeArtifact().withArtifactName("tpcjpt"); - model = BinaryData.fromObject(model).toObject(OneLakeArtifact.class); - Assertions.assertEquals("tpcjpt", model.artifactName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteMockTests.java deleted file mode 100644 index 51e69882431a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OnlineDeploymentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.onlineDeployments() - .delete("wlkovopqp", "cdpyoqmwpmrlgj", "qs", "fptvam", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsWithResponseMockTests.java deleted file mode 100644 index c913e16b592a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ContainerType; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogs; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OnlineDeploymentsGetLogsWithResponseMockTests { - @Test - public void testGetLogsWithResponse() throws Exception { - String responseStr = "{\"content\":\"ufipyg\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DeploymentLogs response = manager.onlineDeployments() - .getLogsWithResponse("fhfgoyxxszpai", "curfsofshfmgiix", "rveekhsmulvmy", "oefkpuuuxiuwhc", - new DeploymentLogsRequest().withContainerType(ContainerType.INFERENCE_SERVER).withTail(1397087365), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ufipyg", response.content()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusMockTests.java deleted file mode 100644 index 5ccab6043887..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.SkuResource; -import com.azure.resourcemanager.machinelearning.models.SkuScaleType; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OnlineDeploymentsListSkusMockTests { - @Test - public void testListSkus() throws Exception { - String responseStr - = "{\"value\":[{\"resourceType\":\"fmortrsnpbsungn\",\"sku\":{\"name\":\"km\",\"tier\":\"Basic\"},\"capacity\":{\"minimum\":279895478,\"maximum\":1991847525,\"default\":1529540251,\"scaleType\":\"Manual\"}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.onlineDeployments() - .listSkus("moycpotmaos", "ngtbhvhsqvubww", "giyujnrvwjx", "walhljtn", 1777716757, "bpiuvqh", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("km", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.iterator().next().sku().tier()); - Assertions.assertEquals(279895478, response.iterator().next().capacity().minimum()); - Assertions.assertEquals(1991847525, response.iterator().next().capacity().maximum()); - Assertions.assertEquals(1529540251, response.iterator().next().capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, response.iterator().next().capacity().scaleType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteMockTests.java deleted file mode 100644 index 583aa4119208..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OnlineEndpointsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.onlineEndpoints().delete("t", "o", "qudjdwcw", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineRequestSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineRequestSettingsTests.java deleted file mode 100644 index ea0889d23a13..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineRequestSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OnlineRequestSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class OnlineRequestSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OnlineRequestSettings model = BinaryData.fromString( - "{\"maxQueueWait\":\"PT192H43M50S\",\"requestTimeout\":\"PT2H5M54S\",\"maxConcurrentRequestsPerInstance\":1291498461}") - .toObject(OnlineRequestSettings.class); - Assertions.assertEquals(Duration.parse("PT192H43M50S"), model.maxQueueWait()); - Assertions.assertEquals(Duration.parse("PT2H5M54S"), model.requestTimeout()); - Assertions.assertEquals(1291498461, model.maxConcurrentRequestsPerInstance()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OnlineRequestSettings model = new OnlineRequestSettings().withMaxQueueWait(Duration.parse("PT192H43M50S")) - .withRequestTimeout(Duration.parse("PT2H5M54S")) - .withMaxConcurrentRequestsPerInstance(1291498461); - model = BinaryData.fromObject(model).toObject(OnlineRequestSettings.class); - Assertions.assertEquals(Duration.parse("PT192H43M50S"), model.maxQueueWait()); - Assertions.assertEquals(Duration.parse("PT2H5M54S"), model.requestTimeout()); - Assertions.assertEquals(1291498461, model.maxConcurrentRequestsPerInstance()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineScaleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineScaleSettingsTests.java deleted file mode 100644 index d9549c2a2710..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineScaleSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OnlineScaleSettings; - -public final class OnlineScaleSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OnlineScaleSettings model - = BinaryData.fromString("{\"scaleType\":\"OnlineScaleSettings\"}").toObject(OnlineScaleSettings.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OnlineScaleSettings model = new OnlineScaleSettings(); - model = BinaryData.fromObject(model).toObject(OnlineScaleSettings.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationDisplayTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationDisplayTests.java deleted file mode 100644 index c630ed3fe155..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationDisplayTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OperationDisplay; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}") - .toObject(OperationDisplay.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationInnerTests.java deleted file mode 100644 index 6c716ad68009..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.OperationInner; -import com.azure.resourcemanager.machinelearning.models.OperationDisplay; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = BinaryData.fromString( - "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationListResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationListResultTests.java deleted file mode 100644 index 3c37565d1f2b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationListResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OperationListResult; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"izhwlrxy\",\"isDataAction\":false,\"display\":{\"provider\":\"ijgkdm\",\"resource\":\"azlobcufpdznrbt\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"rifkwm\",\"isDataAction\":true,\"display\":{\"provider\":\"izntocipao\",\"resource\":\"jpsq\",\"operation\":\"mpoyfd\",\"description\":\"ogknygjofjdd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"upewnwreitjzy\"}") - .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationsListMockTests.java deleted file mode 100644 index f382e7c26328..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationsListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Operation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"wipze\",\"isDataAction\":true,\"display\":{\"provider\":\"nytkmlfupjzc\",\"resource\":\"vzjoyxjgahxue\",\"operation\":\"daktnytkbcerf\",\"description\":\"cpvfqjckmp\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleBasicResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleBasicResourceInnerTests.java deleted file mode 100644 index cf65fe213cb5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleBasicResourceInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.OutboundRule; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import org.junit.jupiter.api.Assertions; - -public final class OutboundRuleBasicResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OutboundRuleBasicResourceInner model = BinaryData.fromString( - "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Inactive\"},\"id\":\"hp\",\"name\":\"xkgymareqnajxqu\",\"type\":\"jhkycub\"}") - .toObject(OutboundRuleBasicResourceInner.class); - Assertions.assertEquals(RuleCategory.REQUIRED, model.properties().category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.properties().status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutboundRuleBasicResourceInner model = new OutboundRuleBasicResourceInner() - .withProperties(new OutboundRule().withCategory(RuleCategory.REQUIRED).withStatus(RuleStatus.INACTIVE)); - model = BinaryData.fromObject(model).toObject(OutboundRuleBasicResourceInner.class); - Assertions.assertEquals(RuleCategory.REQUIRED, model.properties().category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.properties().status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleListResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleListResultTests.java deleted file mode 100644 index 1ceacdcdfdad..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleListResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.OutboundRule; -import com.azure.resourcemanager.machinelearning.models.OutboundRuleListResult; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OutboundRuleListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OutboundRuleListResult model = BinaryData.fromString( - "{\"nextLink\":\"tkl\",\"value\":[{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Inactive\"},\"id\":\"aanozjosphyoulpj\",\"name\":\"v\",\"type\":\"ag\"},{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Inactive\"},\"id\":\"wosytxitcskf\",\"name\":\"k\",\"type\":\"qumiek\"},{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Inactive\"},\"id\":\"hlyfjhdgqgg\",\"name\":\"bdunygaeqid\",\"type\":\"qfatpxllrxcyjm\"},{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Active\"},\"id\":\"arm\",\"name\":\"wdmjsjqbjhhyx\",\"type\":\"rw\"}]}") - .toObject(OutboundRuleListResult.class); - Assertions.assertEquals("tkl", model.nextLink()); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.value().get(0).properties().category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.value().get(0).properties().status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutboundRuleListResult model = new OutboundRuleListResult().withNextLink("tkl") - .withValue(Arrays.asList( - new OutboundRuleBasicResourceInner().withProperties( - new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.INACTIVE)), - new OutboundRuleBasicResourceInner().withProperties( - new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.INACTIVE)), - new OutboundRuleBasicResourceInner().withProperties( - new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.INACTIVE)), - new OutboundRuleBasicResourceInner().withProperties( - new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.ACTIVE)))); - model = BinaryData.fromObject(model).toObject(OutboundRuleListResult.class); - Assertions.assertEquals("tkl", model.nextLink()); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.value().get(0).properties().category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.value().get(0).properties().status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleTests.java deleted file mode 100644 index 0e36352ccee9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OutboundRule; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import org.junit.jupiter.api.Assertions; - -public final class OutboundRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OutboundRule model - = BinaryData.fromString("{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Active\"}") - .toObject(OutboundRule.class); - Assertions.assertEquals(RuleCategory.DEPENDENCY, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutboundRule model = new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.ACTIVE); - model = BinaryData.fromObject(model).toObject(OutboundRule.class); - Assertions.assertEquals(RuleCategory.DEPENDENCY, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutputPathAssetReferenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutputPathAssetReferenceTests.java deleted file mode 100644 index 4c94528a9fc8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutputPathAssetReferenceTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OutputPathAssetReference; -import org.junit.jupiter.api.Assertions; - -public final class OutputPathAssetReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OutputPathAssetReference model = BinaryData - .fromString("{\"referenceType\":\"OutputPath\",\"path\":\"mxq\",\"jobId\":\"vznjqswshesgcsqo\"}") - .toObject(OutputPathAssetReference.class); - Assertions.assertEquals("mxq", model.path()); - Assertions.assertEquals("vznjqswshesgcsqo", model.jobId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutputPathAssetReference model = new OutputPathAssetReference().withPath("mxq").withJobId("vznjqswshesgcsqo"); - model = BinaryData.fromObject(model).toObject(OutputPathAssetReference.class); - Assertions.assertEquals("mxq", model.path()); - Assertions.assertEquals("vznjqswshesgcsqo", model.jobId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests.java deleted file mode 100644 index 171738ac4382..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties model = BinaryData - .fromString("{\"properties\":{\"description\":\"yxrxmunj\"},\"tags\":{\"ivbgkcv\":\"glnkvxlxpagl\"}}") - .toObject(PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.class); - Assertions.assertEquals("yxrxmunj", model.properties().description()); - Assertions.assertEquals("glnkvxlxpagl", model.tags().get("ivbgkcv")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties model - = new PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties() - .withProperties(new PartialBatchDeployment().withDescription("yxrxmunj")) - .withTags(mapOf("ivbgkcv", "glnkvxlxpagl")); - model = BinaryData.fromObject(model) - .toObject(PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.class); - Assertions.assertEquals("yxrxmunj", model.properties().description()); - Assertions.assertEquals("glnkvxlxpagl", model.tags().get("ivbgkcv")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentTests.java deleted file mode 100644 index 2eab63ece4a4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment; -import org.junit.jupiter.api.Assertions; - -public final class PartialBatchDeploymentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialBatchDeployment model - = BinaryData.fromString("{\"description\":\"pzvuqdflvo\"}").toObject(PartialBatchDeployment.class); - Assertions.assertEquals("pzvuqdflvo", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialBatchDeployment model = new PartialBatchDeployment().withDescription("pzvuqdflvo"); - model = BinaryData.fromObject(model).toObject(PartialBatchDeployment.class); - Assertions.assertEquals("pzvuqdflvo", model.description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialManagedServiceIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialManagedServiceIdentityTests.java deleted file mode 100644 index f3a2b95d5821..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialManagedServiceIdentityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialManagedServiceIdentity model = BinaryData.fromString( - "{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"sqqw\":\"dataclafzvaylpt\",\"waxfewzjkj\":\"datatcmwqkchc\",\"ksh\":\"dataxfdeqvhpsyl\",\"rgywwp\":\"databffmbmxz\"}}") - .toObject(PartialManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialManagedServiceIdentity model - = new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("sqqw", "dataclafzvaylpt", "waxfewzjkj", "datatcmwqkchc", "ksh", - "dataxfdeqvhpsyl", "rgywwp", "databffmbmxz")); - model = BinaryData.fromObject(model).toObject(PartialManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceTests.java deleted file mode 100644 index 32bf81cef0ac..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialMinimalTrackedResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialMinimalTrackedResource model = BinaryData.fromString("{\"tags\":{\"pttaqutd\":\"snptfujgicgaao\"}}") - .toObject(PartialMinimalTrackedResource.class); - Assertions.assertEquals("snptfujgicgaao", model.tags().get("pttaqutd")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialMinimalTrackedResource model - = new PartialMinimalTrackedResource().withTags(mapOf("pttaqutd", "snptfujgicgaao")); - model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResource.class); - Assertions.assertEquals("snptfujgicgaao", model.tags().get("pttaqutd")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithIdentityTests.java deleted file mode 100644 index 5db273373789..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithIdentityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialMinimalTrackedResourceWithIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialMinimalTrackedResourceWithIdentity model = BinaryData.fromString( - "{\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"ni\":\"dataspofapvuhry\",\"st\":\"datafrzgbzjed\",\"nsnvpd\":\"datavnlvxbcuiiznktwf\",\"z\":\"databmikost\"}},\"tags\":{\"ophzfylsgcrp\":\"wbuqn\",\"fwyfwlwxjwet\":\"bcunezzceze\"}}") - .toObject(PartialMinimalTrackedResourceWithIdentity.class); - Assertions.assertEquals("wbuqn", model.tags().get("ophzfylsgcrp")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialMinimalTrackedResourceWithIdentity model - = new PartialMinimalTrackedResourceWithIdentity() - .withTags(mapOf("ophzfylsgcrp", "wbuqn", "fwyfwlwxjwet", "bcunezzceze")) - .withIdentity(new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("ni", "dataspofapvuhry", "st", "datafrzgbzjed", "nsnvpd", - "datavnlvxbcuiiznktwf", "z", "databmikost"))); - model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResourceWithIdentity.class); - Assertions.assertEquals("wbuqn", model.tags().get("ophzfylsgcrp")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuAndIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuAndIdentityTests.java deleted file mode 100644 index b0eb4816ada0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuAndIdentityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialMinimalTrackedResourceWithSkuAndIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialMinimalTrackedResourceWithSkuAndIdentity model = BinaryData.fromString( - "{\"sku\":{\"name\":\"ljuxl\",\"tier\":\"Free\",\"size\":\"tvtfjms\",\"family\":\"chmaiubavlzwpvgm\",\"capacity\":30040168},\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"rokzrthqetwpq\":\"datagokedgjqafkm\"}},\"tags\":{\"ixiezeag\":\"aoznq\",\"hfpjstlzmbls\":\"ceituuge\"}}") - .toObject(PartialMinimalTrackedResourceWithSkuAndIdentity.class); - Assertions.assertEquals("aoznq", model.tags().get("ixiezeag")); - Assertions.assertEquals("ljuxl", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("tvtfjms", model.sku().size()); - Assertions.assertEquals("chmaiubavlzwpvgm", model.sku().family()); - Assertions.assertEquals(30040168, model.sku().capacity()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialMinimalTrackedResourceWithSkuAndIdentity model = new PartialMinimalTrackedResourceWithSkuAndIdentity() - .withTags(mapOf("ixiezeag", "aoznq", "hfpjstlzmbls", "ceituuge")) - .withSku(new PartialSku().withName("ljuxl") - .withTier(SkuTier.FREE) - .withSize("tvtfjms") - .withFamily("chmaiubavlzwpvgm") - .withCapacity(30040168)) - .withIdentity( - new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("rokzrthqetwpq", "datagokedgjqafkm"))); - model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResourceWithSkuAndIdentity.class); - Assertions.assertEquals("aoznq", model.tags().get("ixiezeag")); - Assertions.assertEquals("ljuxl", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("tvtfjms", model.sku().size()); - Assertions.assertEquals("chmaiubavlzwpvgm", model.sku().family()); - Assertions.assertEquals(30040168, model.sku().capacity()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuTests.java deleted file mode 100644 index a6bca875b0fb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialMinimalTrackedResourceWithSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialMinimalTrackedResourceWithSku model = BinaryData.fromString( - "{\"sku\":{\"name\":\"rkuz\",\"tier\":\"Free\",\"size\":\"ndtsnxawqytll\",\"family\":\"yzm\",\"capacity\":1452137809},\"tags\":{\"kck\":\"xnx\"}}") - .toObject(PartialMinimalTrackedResourceWithSku.class); - Assertions.assertEquals("xnx", model.tags().get("kck")); - Assertions.assertEquals("rkuz", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("ndtsnxawqytll", model.sku().size()); - Assertions.assertEquals("yzm", model.sku().family()); - Assertions.assertEquals(1452137809, model.sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialMinimalTrackedResourceWithSku model - = new PartialMinimalTrackedResourceWithSku().withTags(mapOf("kck", "xnx")) - .withSku(new PartialSku().withName("rkuz") - .withTier(SkuTier.FREE) - .withSize("ndtsnxawqytll") - .withFamily("yzm") - .withCapacity(1452137809)); - model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResourceWithSku.class); - Assertions.assertEquals("xnx", model.tags().get("kck")); - Assertions.assertEquals("rkuz", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("ndtsnxawqytll", model.sku().size()); - Assertions.assertEquals("yzm", model.sku().family()); - Assertions.assertEquals(1452137809, model.sku().capacity()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialRegistryPartialTrackedResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialRegistryPartialTrackedResourceTests.java deleted file mode 100644 index 8ad4095da8d8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialRegistryPartialTrackedResourceTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PartialRegistryPartialTrackedResource; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.RegistryPartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialRegistryPartialTrackedResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialRegistryPartialTrackedResource model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"370e11aa-1cde-446e-8d05-867ab14f8848\",\"tenantId\":\"6ce29048-e549-4164-b52f-77a4a18b36b5\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"r\":{\"principalId\":\"c0ed1deb-cbad-445a-b9ba-e55fb37d4cda\",\"clientId\":\"6027cd1a-6031-447a-8589-17ea0ae59b90\"},\"neyttl\":{\"principalId\":\"065f8464-6928-4247-b151-0cfc74b63250\",\"clientId\":\"c36db973-09ef-4904-af3f-cc91f0a96536\"},\"ivcbkutpumltwj\":{\"principalId\":\"d91934d8-363d-495a-88b2-425c44255200\",\"clientId\":\"0aa30399-8e40-4496-ac14-d68156b72902\"}}},\"sku\":{\"name\":\"xynbpvzlqywa\",\"tier\":\"Standard\",\"size\":\"jckhmocgj\",\"family\":\"gouarhwvixqq\",\"capacity\":902896501},\"tags\":{\"rvtz\":\"ybsjrc\",\"y\":\"nrbctbhpjhxpcvrd\"}}") - .toObject(PartialRegistryPartialTrackedResource.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("xynbpvzlqywa", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("jckhmocgj", model.sku().size()); - Assertions.assertEquals("gouarhwvixqq", model.sku().family()); - Assertions.assertEquals(902896501, model.sku().capacity()); - Assertions.assertEquals("ybsjrc", model.tags().get("rvtz")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialRegistryPartialTrackedResource model = new PartialRegistryPartialTrackedResource() - .withIdentity(new RegistryPartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("r", new UserAssignedIdentity(), "neyttl", new UserAssignedIdentity(), - "ivcbkutpumltwj", new UserAssignedIdentity()))) - .withSku(new PartialSku().withName("xynbpvzlqywa") - .withTier(SkuTier.STANDARD) - .withSize("jckhmocgj") - .withFamily("gouarhwvixqq") - .withCapacity(902896501)) - .withTags(mapOf("rvtz", "ybsjrc", "y", "nrbctbhpjhxpcvrd")); - model = BinaryData.fromObject(model).toObject(PartialRegistryPartialTrackedResource.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("xynbpvzlqywa", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("jckhmocgj", model.sku().size()); - Assertions.assertEquals("gouarhwvixqq", model.sku().family()); - Assertions.assertEquals(902896501, model.sku().capacity()); - Assertions.assertEquals("ybsjrc", model.tags().get("rvtz")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialSkuTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialSkuTests.java deleted file mode 100644 index e1bfe9a92bc6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialSkuTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class PartialSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialSku model = BinaryData.fromString( - "{\"name\":\"ymx\",\"tier\":\"Standard\",\"size\":\"jkdtfoh\",\"family\":\"ogzvk\",\"capacity\":372734200}") - .toObject(PartialSku.class); - Assertions.assertEquals("ymx", model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("jkdtfoh", model.size()); - Assertions.assertEquals("ogzvk", model.family()); - Assertions.assertEquals(372734200, model.capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialSku model = new PartialSku().withName("ymx") - .withTier(SkuTier.STANDARD) - .withSize("jkdtfoh") - .withFamily("ogzvk") - .withCapacity(372734200); - model = BinaryData.fromObject(model).toObject(PartialSku.class); - Assertions.assertEquals("ymx", model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("jkdtfoh", model.size()); - Assertions.assertEquals("ogzvk", model.family()); - Assertions.assertEquals(372734200, model.capacity()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PasswordTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PasswordTests.java deleted file mode 100644 index a4e7fec01c48..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PasswordTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Password; - -public final class PasswordTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Password model = BinaryData.fromString("{\"name\":\"yocf\",\"value\":\"ksymd\"}").toObject(Password.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Password model = new Password(); - model = BinaryData.fromObject(model).toObject(Password.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PendingUploadRequestDtoTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PendingUploadRequestDtoTests.java deleted file mode 100644 index 734ac01c5445..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PendingUploadRequestDtoTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; -import com.azure.resourcemanager.machinelearning.models.PendingUploadType; -import org.junit.jupiter.api.Assertions; - -public final class PendingUploadRequestDtoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PendingUploadRequestDto model - = BinaryData.fromString("{\"pendingUploadId\":\"zrfze\",\"pendingUploadType\":\"TemporaryBlobReference\"}") - .toObject(PendingUploadRequestDto.class); - Assertions.assertEquals("zrfze", model.pendingUploadId()); - Assertions.assertEquals(PendingUploadType.TEMPORARY_BLOB_REFERENCE, model.pendingUploadType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PendingUploadRequestDto model = new PendingUploadRequestDto().withPendingUploadId("zrfze") - .withPendingUploadType(PendingUploadType.TEMPORARY_BLOB_REFERENCE); - model = BinaryData.fromObject(model).toObject(PendingUploadRequestDto.class); - Assertions.assertEquals("zrfze", model.pendingUploadId()); - Assertions.assertEquals(PendingUploadType.TEMPORARY_BLOB_REFERENCE, model.pendingUploadType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PersonalComputeInstanceSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PersonalComputeInstanceSettingsTests.java deleted file mode 100644 index 911a176e9a52..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PersonalComputeInstanceSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssignedUser; -import com.azure.resourcemanager.machinelearning.models.PersonalComputeInstanceSettings; -import org.junit.jupiter.api.Assertions; - -public final class PersonalComputeInstanceSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PersonalComputeInstanceSettings model - = BinaryData.fromString("{\"assignedUser\":{\"objectId\":\"rgkrfi\",\"tenantId\":\"rpywlptyuqh\"}}") - .toObject(PersonalComputeInstanceSettings.class); - Assertions.assertEquals("rgkrfi", model.assignedUser().objectId()); - Assertions.assertEquals("rpywlptyuqh", model.assignedUser().tenantId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PersonalComputeInstanceSettings model = new PersonalComputeInstanceSettings() - .withAssignedUser(new AssignedUser().withObjectId("rgkrfi").withTenantId("rpywlptyuqh")); - model = BinaryData.fromObject(model).toObject(PersonalComputeInstanceSettings.class); - Assertions.assertEquals("rgkrfi", model.assignedUser().objectId()); - Assertions.assertEquals("rpywlptyuqh", model.assignedUser().tenantId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PipelineJobTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PipelineJobTests.java deleted file mode 100644 index 0235ddd033d7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PipelineJobTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobInput; -import com.azure.resourcemanager.machinelearning.models.JobOutput; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.Nodes; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.PipelineJob; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PipelineJobTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PipelineJob model = BinaryData.fromString( - "{\"jobType\":\"Pipeline\",\"settings\":\"datacxlngoufpi\",\"jobs\":{\"vsl\":\"datamfxzspf\"},\"inputs\":{\"dumjtycildrzn\":{\"jobInputType\":\"JobInput\",\"description\":\"plxg\"},\"xduyjnqzbrqcakm\":{\"jobInputType\":\"JobInput\",\"description\":\"xozqthkwxfugfziz\"}},\"outputs\":{\"whmucjiuhcxyveh\":{\"jobOutputType\":\"JobOutput\",\"description\":\"iyjucamnsbqoi\"},\"ycudus\":{\"jobOutputType\":\"JobOutput\",\"description\":\"lelyqdvpqfbx\"},\"lefnoheywvfo\":{\"jobOutputType\":\"JobOutput\",\"description\":\"tx\"},\"enjpwdmsfw\":{\"jobOutputType\":\"JobOutput\",\"description\":\"yllre\"}},\"sourceJobId\":\"rsvevcneqswxhqh\",\"displayName\":\"htbzvulqevvj\",\"status\":\"Paused\",\"experimentName\":\"yhtxgdmvghcm\",\"services\":{\"rxowvhufcmuajwb\":{\"jobServiceType\":\"wkfefbcyjr\",\"port\":658805241,\"endpoint\":\"eebu\",\"status\":\"yimooaezkto\",\"errorMessage\":\"go\",\"properties\":{\"fztvnabfbbtown\":\"qwbywaazbaeee\",\"zxkrdpuyytbpkrpk\":\"ljdkxhmewyaolc\",\"enefnoafpcnrx\":\"qetp\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"c\":{\"jobServiceType\":\"p\",\"port\":942163314,\"endpoint\":\"frfa\",\"status\":\"nnsvrfajynihti\",\"errorMessage\":\"fgzqzhl\",\"properties\":{\"yohrcmeqljxdum\":\"blfehbgc\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"tg\":{\"jobServiceType\":\"nebldxag\",\"port\":2015322122,\"endpoint\":\"wcn\",\"status\":\"wxjsjquv\",\"errorMessage\":\"ufzdtsrpju\",\"properties\":{\"huqczouanbfulv\":\"acrzhnsbylgmg\",\"bzbwbgwzhbhfljey\":\"xglxoqwbztil\",\"lhrwyakzuafapwx\":\"dpiov\",\"extqd\":\"vdeatjiobnirg\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"imznupbmtbs\",\"isArchived\":true,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"sqvhe\",\"notificationSetting\":{\"emails\":[\"ghc\",\"zmmmjyvdhdgdi\",\"m\"],\"emailOn\":[\"JobCancelled\"],\"webhooks\":{\"caqfkakh\":{\"webhookType\":\"Webhook\",\"eventType\":\"tqjisjmol\"}}},\"description\":\"rvty\",\"tags\":{\"pfzxkczbdypbbim\":\"ytvjejqawfus\",\"ortclnhbjcyuzly\":\"jbozv\"},\"properties\":{\"lkv\":\"cibv\",\"nviulbylmgjzr\":\"kcafnwqhawv\"}}") - .toObject(PipelineJob.class); - Assertions.assertEquals("rvty", model.description()); - Assertions.assertEquals("ytvjejqawfus", model.tags().get("pfzxkczbdypbbim")); - Assertions.assertEquals("cibv", model.properties().get("lkv")); - Assertions.assertEquals("htbzvulqevvj", model.displayName()); - Assertions.assertEquals("yhtxgdmvghcm", model.experimentName()); - Assertions.assertEquals("wkfefbcyjr", model.services().get("rxowvhufcmuajwb").jobServiceType()); - Assertions.assertEquals(658805241, model.services().get("rxowvhufcmuajwb").port()); - Assertions.assertEquals("eebu", model.services().get("rxowvhufcmuajwb").endpoint()); - Assertions.assertEquals("qwbywaazbaeee", - model.services().get("rxowvhufcmuajwb").properties().get("fztvnabfbbtown")); - Assertions.assertEquals("imznupbmtbs", model.computeId()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("sqvhe", model.componentId()); - Assertions.assertEquals("ghc", model.notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("tqjisjmol", model.notificationSetting().webhooks().get("caqfkakh").eventType()); - Assertions.assertEquals("plxg", model.inputs().get("dumjtycildrzn").description()); - Assertions.assertEquals("iyjucamnsbqoi", model.outputs().get("whmucjiuhcxyveh").description()); - Assertions.assertEquals("rsvevcneqswxhqh", model.sourceJobId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PipelineJob model = new PipelineJob().withDescription("rvty") - .withTags(mapOf("pfzxkczbdypbbim", "ytvjejqawfus", "ortclnhbjcyuzly", "jbozv")) - .withProperties(mapOf("lkv", "cibv", "nviulbylmgjzr", "kcafnwqhawv")) - .withDisplayName("htbzvulqevvj") - .withExperimentName("yhtxgdmvghcm") - .withServices(mapOf("rxowvhufcmuajwb", - new JobService().withJobServiceType("wkfefbcyjr") - .withPort(658805241) - .withEndpoint("eebu") - .withProperties(mapOf("fztvnabfbbtown", "qwbywaazbaeee", "zxkrdpuyytbpkrpk", "ljdkxhmewyaolc", - "enefnoafpcnrx", "qetp")) - .withNodes(new Nodes()), - "c", - new JobService().withJobServiceType("p") - .withPort(942163314) - .withEndpoint("frfa") - .withProperties(mapOf("yohrcmeqljxdum", "blfehbgc")) - .withNodes(new Nodes()), - "tg", - new JobService().withJobServiceType("nebldxag") - .withPort(2015322122) - .withEndpoint("wcn") - .withProperties(mapOf("huqczouanbfulv", "acrzhnsbylgmg", "bzbwbgwzhbhfljey", "xglxoqwbztil", - "lhrwyakzuafapwx", "dpiov", "extqd", "vdeatjiobnirg")) - .withNodes(new Nodes()))) - .withComputeId("imznupbmtbs") - .withIsArchived(true) - .withIdentity(new IdentityConfiguration()) - .withComponentId("sqvhe") - .withNotificationSetting(new NotificationSetting().withEmails(Arrays.asList("ghc", "zmmmjyvdhdgdi", "m")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED)) - .withWebhooks(mapOf("caqfkakh", new Webhook().withEventType("tqjisjmol")))) - .withSettings("datacxlngoufpi") - .withJobs(mapOf("vsl", "datamfxzspf")) - .withInputs(mapOf("dumjtycildrzn", new JobInput().withDescription("plxg"), "xduyjnqzbrqcakm", - new JobInput().withDescription("xozqthkwxfugfziz"))) - .withOutputs(mapOf("whmucjiuhcxyveh", new JobOutput().withDescription("iyjucamnsbqoi"), "ycudus", - new JobOutput().withDescription("lelyqdvpqfbx"), "lefnoheywvfo", new JobOutput().withDescription("tx"), - "enjpwdmsfw", new JobOutput().withDescription("yllre"))) - .withSourceJobId("rsvevcneqswxhqh"); - model = BinaryData.fromObject(model).toObject(PipelineJob.class); - Assertions.assertEquals("rvty", model.description()); - Assertions.assertEquals("ytvjejqawfus", model.tags().get("pfzxkczbdypbbim")); - Assertions.assertEquals("cibv", model.properties().get("lkv")); - Assertions.assertEquals("htbzvulqevvj", model.displayName()); - Assertions.assertEquals("yhtxgdmvghcm", model.experimentName()); - Assertions.assertEquals("wkfefbcyjr", model.services().get("rxowvhufcmuajwb").jobServiceType()); - Assertions.assertEquals(658805241, model.services().get("rxowvhufcmuajwb").port()); - Assertions.assertEquals("eebu", model.services().get("rxowvhufcmuajwb").endpoint()); - Assertions.assertEquals("qwbywaazbaeee", - model.services().get("rxowvhufcmuajwb").properties().get("fztvnabfbbtown")); - Assertions.assertEquals("imznupbmtbs", model.computeId()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("sqvhe", model.componentId()); - Assertions.assertEquals("ghc", model.notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("tqjisjmol", model.notificationSetting().webhooks().get("caqfkakh").eventType()); - Assertions.assertEquals("plxg", model.inputs().get("dumjtycildrzn").description()); - Assertions.assertEquals("iyjucamnsbqoi", model.outputs().get("whmucjiuhcxyveh").description()); - Assertions.assertEquals("rsvevcneqswxhqh", model.sourceJobId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMetricThresholdBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMetricThresholdBaseTests.java deleted file mode 100644 index 9b5d474f3a74..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMetricThresholdBaseTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import com.azure.resourcemanager.machinelearning.models.PredictionDriftMetricThresholdBase; -import org.junit.jupiter.api.Assertions; - -public final class PredictionDriftMetricThresholdBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PredictionDriftMetricThresholdBase model = BinaryData - .fromString( - "{\"dataType\":\"PredictionDriftMetricThresholdBase\",\"threshold\":{\"value\":21.01964242630283}}") - .toObject(PredictionDriftMetricThresholdBase.class); - Assertions.assertEquals(21.01964242630283D, model.threshold().value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PredictionDriftMetricThresholdBase model = new PredictionDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(21.01964242630283D)); - model = BinaryData.fromObject(model).toObject(PredictionDriftMetricThresholdBase.class); - Assertions.assertEquals(21.01964242630283D, model.threshold().value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMonitoringSignalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMonitoringSignalTests.java deleted file mode 100644 index f7253776a236..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMonitoringSignalTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobInputType; -import com.azure.resourcemanager.machinelearning.models.MonitoringFeatureDataType; -import com.azure.resourcemanager.machinelearning.models.MonitoringInputDataBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import com.azure.resourcemanager.machinelearning.models.PredictionDriftMetricThresholdBase; -import com.azure.resourcemanager.machinelearning.models.PredictionDriftMonitoringSignal; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PredictionDriftMonitoringSignalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PredictionDriftMonitoringSignal model = BinaryData.fromString( - "{\"signalType\":\"PredictionDrift\",\"metricThresholds\":[{\"dataType\":\"PredictionDriftMetricThresholdBase\",\"threshold\":{\"value\":82.50470090588112}},{\"dataType\":\"PredictionDriftMetricThresholdBase\",\"threshold\":{\"value\":17.174727928466226}}],\"productionData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"xpuckn\",\"jobInputType\":\"mlflow_model\",\"uri\":\"s\",\"columns\":{\"micttrvl\":\"smg\",\"cjrzvlcivqx\":\"vjmxokxxamq\"}},\"referenceData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"mklphxwww\",\"jobInputType\":\"custom_model\",\"uri\":\"jkbgnfbr\",\"columns\":{\"evlahxczywyw\":\"fsunh\",\"axqjf\":\"ahwcorewcnn\",\"gewdqbxexfyzn\":\"ajrfgimom\"}},\"featureDataTypeOverride\":{\"uqks\":\"Categorical\",\"sfx\":\"Numerical\"},\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"rtlikff\":\"pmoh\",\"qrf\":\"dzt\",\"zdteqjmyqxuhg\":\"gynzfw\",\"wrrlccklyf\":\"axnyprijyoxxjxbs\"}}") - .toObject(PredictionDriftMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("pmoh", model.properties().get("rtlikff")); - Assertions.assertEquals(82.50470090588112D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("xpuckn", model.productionData().dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.productionData().jobInputType()); - Assertions.assertEquals("s", model.productionData().uri()); - Assertions.assertEquals("smg", model.productionData().columns().get("micttrvl")); - Assertions.assertEquals("mklphxwww", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.CUSTOM_MODEL, model.referenceData().jobInputType()); - Assertions.assertEquals("jkbgnfbr", model.referenceData().uri()); - Assertions.assertEquals("fsunh", model.referenceData().columns().get("evlahxczywyw")); - Assertions.assertEquals(MonitoringFeatureDataType.CATEGORICAL, model.featureDataTypeOverride().get("uqks")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PredictionDriftMonitoringSignal model = new PredictionDriftMonitoringSignal() - .withNotificationTypes( - Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties( - mapOf("rtlikff", "pmoh", "qrf", "dzt", "zdteqjmyqxuhg", "gynzfw", "wrrlccklyf", "axnyprijyoxxjxbs")) - .withMetricThresholds(Arrays.asList( - new PredictionDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(82.50470090588112D)), - new PredictionDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(17.174727928466226D)))) - .withProductionData(new MonitoringInputDataBase().withDataContext("xpuckn") - .withJobInputType(JobInputType.MLFLOW_MODEL) - .withUri("s") - .withColumns(mapOf("micttrvl", "smg", "cjrzvlcivqx", "vjmxokxxamq"))) - .withReferenceData(new MonitoringInputDataBase().withDataContext("mklphxwww") - .withJobInputType(JobInputType.CUSTOM_MODEL) - .withUri("jkbgnfbr") - .withColumns(mapOf("evlahxczywyw", "fsunh", "axqjf", "ahwcorewcnn", "gewdqbxexfyzn", "ajrfgimom"))) - .withFeatureDataTypeOverride( - mapOf("uqks", MonitoringFeatureDataType.CATEGORICAL, "sfx", MonitoringFeatureDataType.NUMERICAL)); - model = BinaryData.fromObject(model).toObject(PredictionDriftMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("pmoh", model.properties().get("rtlikff")); - Assertions.assertEquals(82.50470090588112D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("xpuckn", model.productionData().dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.productionData().jobInputType()); - Assertions.assertEquals("s", model.productionData().uri()); - Assertions.assertEquals("smg", model.productionData().columns().get("micttrvl")); - Assertions.assertEquals("mklphxwww", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.CUSTOM_MODEL, model.referenceData().jobInputType()); - Assertions.assertEquals("jkbgnfbr", model.referenceData().uri()); - Assertions.assertEquals("fsunh", model.referenceData().columns().get("evlahxczywyw")); - Assertions.assertEquals(MonitoringFeatureDataType.CATEGORICAL, model.featureDataTypeOverride().get("uqks")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionInnerTests.java deleted file mode 100644 index ee1becf99c9c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionInner model = BinaryData.fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"jsprozvcpute\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"mfdatscmdvpj\",\"actionsRequired\":\"lsuuvmkjozkrwfnd\"},\"provisioningState\":\"Creating\"},\"identity\":{\"principalId\":\"7019862e-4533-4693-8853-f0cd6b6c6e89\",\"tenantId\":\"2a954b50-28af-4b69-b3b9-ff3698c39bfa\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"pvwryoqpsoacc\":{\"principalId\":\"c4839c09-9288-4406-9085-53ead4ae12ad\",\"clientId\":\"8bbf256b-2782-4abf-aeb5-f48b167f634e\"}}},\"location\":\"zakljlahbc\",\"tags\":{\"jakhmsbzjh\":\"fdfdosygexpa\",\"hqtrgqjbpf\":\"rzevdphlxaol\",\"tfell\":\"fsinzgvfcjrwzoxx\",\"lxofpdvhpfxxypin\":\"wfzitonpeqfpjk\"},\"sku\":{\"name\":\"mayhuybbkpodepoo\",\"tier\":\"Standard\",\"size\":\"vamih\",\"family\":\"gnarxzxtheo\",\"capacity\":372211152},\"id\":\"vyevcciqi\",\"name\":\"nhungbw\",\"type\":\"zrnf\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("zakljlahbc", model.location()); - Assertions.assertEquals("fdfdosygexpa", model.tags().get("jakhmsbzjh")); - Assertions.assertEquals("mayhuybbkpodepoo", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("vamih", model.sku().size()); - Assertions.assertEquals("gnarxzxtheo", model.sku().family()); - Assertions.assertEquals(372211152, model.sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("mfdatscmdvpj", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("lsuuvmkjozkrwfnd", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionInner model = new PrivateEndpointConnectionInner() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("pvwryoqpsoacc", new UserAssignedIdentity()))) - .withLocation("zakljlahbc") - .withTags(mapOf("jakhmsbzjh", "fdfdosygexpa", "hqtrgqjbpf", "rzevdphlxaol", "tfell", "fsinzgvfcjrwzoxx", - "lxofpdvhpfxxypin", "wfzitonpeqfpjk")) - .withSku(new Sku().withName("mayhuybbkpodepoo") - .withTier(SkuTier.STANDARD) - .withSize("vamih") - .withFamily("gnarxzxtheo") - .withCapacity(372211152)) - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.PENDING) - .withDescription("mfdatscmdvpj") - .withActionsRequired("lsuuvmkjozkrwfnd")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("zakljlahbc", model.location()); - Assertions.assertEquals("fdfdosygexpa", model.tags().get("jakhmsbzjh")); - Assertions.assertEquals("mayhuybbkpodepoo", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("vamih", model.sku().size()); - Assertions.assertEquals("gnarxzxtheo", model.sku().family()); - Assertions.assertEquals(372211152, model.sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("mfdatscmdvpj", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("lsuuvmkjozkrwfnd", model.privateLinkServiceConnectionState().actionsRequired()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionListResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionListResultTests.java deleted file mode 100644 index 30ee0d402165..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionListResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionListResult; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"ixisxyawjoy\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"lyjpk\",\"actionsRequired\":\"dzyexznelixh\"},\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"428d0cb0-8c12-44d5-b252-76000bc1d935\",\"tenantId\":\"f4f8d2be-887c-4354-92ba-25a99a96f6e0\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"knalaulppg\":{\"principalId\":\"1df48505-2f4c-46e9-a6c1-083d560032d5\",\"clientId\":\"e6efcb15-b4b5-4cd9-a646-c87614610d11\"},\"pnapnyiropuh\":{\"principalId\":\"e8ff1dfc-ab01-42fa-b808-9ecf16483ab8\",\"clientId\":\"f9a7da4b-ec5c-45cf-902a-a6bf525b29c1\"},\"vpgylgqgitxmed\":{\"principalId\":\"69de999a-08c9-4be5-8d89-098f1cb44432\",\"clientId\":\"eca6c331-dc16-48ec-a4b5-69fed487c753\"},\"slynqwwnc\":{\"principalId\":\"4578118c-32fd-493e-b0fe-373d0f63c7be\",\"clientId\":\"2c28c670-8b11-4634-9d9e-3032b463722b\"}}},\"location\":\"zhxgktrmgucn\",\"tags\":{\"oellwp\":\"t\"},\"sku\":{\"name\":\"d\",\"tier\":\"Standard\",\"size\":\"qbuaceopzfqr\",\"family\":\"uaopppcqeq\",\"capacity\":1990032205},\"id\":\"dahzxctobg\",\"name\":\"kdmoi\",\"type\":\"postmgrcfbunrm\"}]}") - .toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("zhxgktrmgucn", model.value().get(0).location()); - Assertions.assertEquals("t", model.value().get(0).tags().get("oellwp")); - Assertions.assertEquals("d", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("qbuaceopzfqr", model.value().get(0).sku().size()); - Assertions.assertEquals("uaopppcqeq", model.value().get(0).sku().family()); - Assertions.assertEquals(1990032205, model.value().get(0).sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("lyjpk", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dzyexznelixh", - model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionListResult model - = new PrivateEndpointConnectionListResult() - .withValue( - Arrays.asList(new PrivateEndpointConnectionInner() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("knalaulppg", new UserAssignedIdentity(), "pnapnyiropuh", - new UserAssignedIdentity(), "vpgylgqgitxmed", new UserAssignedIdentity(), "slynqwwnc", - new UserAssignedIdentity()))) - .withLocation("zhxgktrmgucn") - .withTags(mapOf("oellwp", "t")) - .withSku(new Sku().withName("d") - .withTier(SkuTier.STANDARD) - .withSize("qbuaceopzfqr") - .withFamily("uaopppcqeq") - .withCapacity(1990032205)) - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED) - .withDescription("lyjpk") - .withActionsRequired("dzyexznelixh")))); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("zhxgktrmgucn", model.value().get(0).location()); - Assertions.assertEquals("t", model.value().get(0).tags().get("oellwp")); - Assertions.assertEquals("d", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("qbuaceopzfqr", model.value().get(0).sku().size()); - Assertions.assertEquals("uaopppcqeq", model.value().get(0).sku().family()); - Assertions.assertEquals(1990032205, model.value().get(0).sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("lyjpk", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dzyexznelixh", - model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index a3941d8ea35a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"privateEndpoint\":{\"id\":\"gispemvtzfkufubl\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"qeof\",\"actionsRequired\":\"e\"},\"provisioningState\":\"Deleting\"}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("qeof", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("e", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model - = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("qeof") - .withActionsRequired("e")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("qeof", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("e", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 0ae4983a2384..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -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 reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"hdbitq\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"jsgomrih\",\"actionsRequired\":\"grmsdbv\"},\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"df52856d-4e2e-4dc3-82db-75118299d198\",\"tenantId\":\"8769944d-3a45-4ec5-b03c-8604ec7e8a5d\",\"type\":\"None\",\"userAssignedIdentities\":{\"dpbceh\":{\"principalId\":\"47e93559-498d-47de-90c5-a018e74d5b91\",\"clientId\":\"48daa439-430b-49e9-85a5-35d609d55ac6\"},\"psesboynpyt\":{\"principalId\":\"e827b970-cd6b-4ebe-9d9b-092146e41889\",\"clientId\":\"126fa503-83f6-4234-977c-5282ac54919c\"},\"rvkxtfctaneti\":{\"principalId\":\"76b4cd46-b1ec-4b33-ad1d-2aaadb7ea4a1\",\"clientId\":\"97bcfbf0-b95c-4639-b831-72698ac5a272\"},\"dhnpjnezjighdu\":{\"principalId\":\"58557c6a-9dec-46ee-b446-622e9330040b\",\"clientId\":\"6d964002-7aeb-48a7-81c9-29cddb3c0cd6\"}}},\"location\":\"tpmrzwvwetqf\",\"tags\":{\"bsotoc\":\"vfhuqhngqqx\",\"atwxpxb\":\"mrttujyd\"},\"sku\":{\"name\":\"dhxbboceksramqc\",\"tier\":\"Premium\",\"size\":\"fnlvvkswurxdq\",\"family\":\"hauimn\",\"capacity\":1536425318},\"id\":\"q\",\"name\":\"wq\",\"type\":\"nbnwi\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = manager.privateEndpointConnections() - .define("fy") - .withExistingWorkspace("q", "rtgqrqkk") - .withRegion("eadnyciw") - .withTags(mapOf("vzohabbriz", "lykqadfge", "qsxofxqnkiuok", "adjrsbgailjqovqm", "bhiebruptls", "ltsxooi")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("fiozttcbi", new UserAssignedIdentity(), "gkudsozodwjc", new UserAssignedIdentity(), - "yxryqyc", new UserAssignedIdentity(), "rlcfgdwzauzf", new UserAssignedIdentity()))) - .withSku(new Sku().withName("qzgaqsosrnjlvgrg") - .withTier(SkuTier.PREMIUM) - .withSize("oxrqhjninpeswv") - .withFamily("qkgebz") - .withCapacity(156493894)) - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.TIMEOUT) - .withDescription("pnyjtu") - .withActionsRequired("zyvextchslro")) - .create(); - - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("tpmrzwvwetqf", response.location()); - Assertions.assertEquals("vfhuqhngqqx", response.tags().get("bsotoc")); - Assertions.assertEquals("dhxbboceksramqc", response.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("fnlvvkswurxdq", response.sku().size()); - Assertions.assertEquals("hauimn", response.sku().family()); - Assertions.assertEquals(1536425318, response.sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("jsgomrih", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("grmsdbv", response.privateLinkServiceConnectionState().actionsRequired()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java deleted file mode 100644 index 9fda9a41d854..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.privateEndpointConnections() - .deleteWithResponse("vudyhgtrttcuayi", "ylnkmmxzifbqg", "exo", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java deleted file mode 100644 index bfd0ba0e23ae..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"kefkzlxvcozcgoeo\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"cbnunzuysajvvq\",\"actionsRequired\":\"o\"},\"provisioningState\":\"Succeeded\"},\"identity\":{\"principalId\":\"4e30d8d2-f312-4638-8a62-5306572077f5\",\"tenantId\":\"aa47c843-683d-4cdb-8414-00130b4e60e2\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"btkqjqjcajg\":{\"principalId\":\"20b6abcb-9548-421c-aa89-089c5c3ae6fb\",\"clientId\":\"9e1713c0-2a5e-4804-9d3c-fa3b784455f2\"}}},\"location\":\"y\",\"tags\":{\"mrvkxeojtdyulglh\":\"hk\",\"xspxgogypbztgae\":\"lwruklfq\"},\"sku\":{\"name\":\"nskvctvuz\",\"tier\":\"Basic\",\"size\":\"ttmhlvr\",\"family\":\"yxrnwukfajnpdwz\",\"capacity\":803272560},\"id\":\"wdepemziayfi\",\"name\":\"ii\",\"type\":\"xcor\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = manager.privateEndpointConnections() - .getWithResponse("ymgbfmd", "uyyaescjxna", "pyxqbkxdtbfkih", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("y", response.location()); - Assertions.assertEquals("hk", response.tags().get("mrvkxeojtdyulglh")); - Assertions.assertEquals("nskvctvuz", response.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.sku().tier()); - Assertions.assertEquals("ttmhlvr", response.sku().size()); - Assertions.assertEquals("yxrnwukfajnpdwz", response.sku().family()); - Assertions.assertEquals(803272560, response.sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("cbnunzuysajvvq", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("o", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListMockTests.java deleted file mode 100644 index cd7211f8bf9d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"urhvifqeqfs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"kitlwgebylpz\",\"actionsRequired\":\"ldaqwjun\"},\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"cf01a30f-2d6c-4526-96b5-061089f6b3dc\",\"tenantId\":\"95b0e625-c1a4-4838-9d14-c9e534f2e9aa\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"sypo\":{\"principalId\":\"ee98b5c3-7c30-4f31-9fe8-d9602d95e382\",\"clientId\":\"31c874be-b0b2-4362-8925-a45edefa3e41\"},\"kbvzpkodngvnq\":{\"principalId\":\"3c120bd5-f08e-4f0d-8ced-e415dbf563bc\",\"clientId\":\"bede4942-5ea9-4013-b1ab-a2129c2fb385\"},\"sbtwgnldxuc\":{\"principalId\":\"72923ffe-ef00-48a8-b09f-ebf43bbc0884\",\"clientId\":\"9e710428-b5a3-4a38-9551-5040aa24a865\"}}},\"location\":\"hvb\",\"tags\":{\"iuvcqoqkqwucqs\":\"znrirp\",\"xcwtvm\":\"g\",\"myvwp\":\"jccpkkjl\",\"nnlb\":\"jmaih\"},\"sku\":{\"name\":\"jppcbq\",\"tier\":\"Basic\",\"size\":\"fppvolzayj\",\"family\":\"unj\",\"capacity\":1717201097},\"id\":\"klatwiuujxsujkrw\",\"name\":\"xeegxbnjnc\",\"type\":\"epdp\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.privateEndpointConnections().list("doqkanqtr", "icwhqyrgqmndk", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("hvb", response.iterator().next().location()); - Assertions.assertEquals("znrirp", response.iterator().next().tags().get("iuvcqoqkqwucqs")); - Assertions.assertEquals("jppcbq", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.iterator().next().sku().tier()); - Assertions.assertEquals("fppvolzayj", response.iterator().next().sku().size()); - Assertions.assertEquals("unj", response.iterator().next().sku().family()); - Assertions.assertEquals(1717201097, response.iterator().next().sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("kitlwgebylpz", - response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("ldaqwjun", - response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointDestinationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointDestinationTests.java deleted file mode 100644 index c703e58ee68d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointDestinationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointDestination; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointDestinationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointDestination model = BinaryData.fromString( - "{\"serviceResourceId\":\"qzsaaoq\",\"sparkEnabled\":false,\"sparkStatus\":\"Inactive\",\"subresourceTarget\":\"txjqfiafc\"}") - .toObject(PrivateEndpointDestination.class); - Assertions.assertEquals("qzsaaoq", model.serviceResourceId()); - Assertions.assertEquals(false, model.sparkEnabled()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.sparkStatus()); - Assertions.assertEquals("txjqfiafc", model.subresourceTarget()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointDestination model = new PrivateEndpointDestination().withServiceResourceId("qzsaaoq") - .withSparkEnabled(false) - .withSparkStatus(RuleStatus.INACTIVE) - .withSubresourceTarget("txjqfiafc"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointDestination.class); - Assertions.assertEquals("qzsaaoq", model.serviceResourceId()); - Assertions.assertEquals(false, model.sparkEnabled()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.sparkStatus()); - Assertions.assertEquals("txjqfiafc", model.subresourceTarget()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointOutboundRuleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointOutboundRuleTests.java deleted file mode 100644 index de9723293ff4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointOutboundRuleTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointDestination; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointOutboundRule; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointOutboundRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointOutboundRule model = BinaryData.fromString( - "{\"type\":\"PrivateEndpoint\",\"destination\":{\"serviceResourceId\":\"zvoikvntwczf\",\"sparkEnabled\":true,\"sparkStatus\":\"Active\",\"subresourceTarget\":\"cxpblalhhezpfk\"},\"category\":\"Required\",\"status\":\"Active\"}") - .toObject(PrivateEndpointOutboundRule.class); - Assertions.assertEquals(RuleCategory.REQUIRED, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - Assertions.assertEquals("zvoikvntwczf", model.destination().serviceResourceId()); - Assertions.assertEquals(true, model.destination().sparkEnabled()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.destination().sparkStatus()); - Assertions.assertEquals("cxpblalhhezpfk", model.destination().subresourceTarget()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointOutboundRule model = new PrivateEndpointOutboundRule().withCategory(RuleCategory.REQUIRED) - .withStatus(RuleStatus.ACTIVE) - .withDestination(new PrivateEndpointDestination().withServiceResourceId("zvoikvntwczf") - .withSparkEnabled(true) - .withSparkStatus(RuleStatus.ACTIVE) - .withSubresourceTarget("cxpblalhhezpfk")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointOutboundRule.class); - Assertions.assertEquals(RuleCategory.REQUIRED, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - Assertions.assertEquals("zvoikvntwczf", model.destination().serviceResourceId()); - Assertions.assertEquals(true, model.destination().sparkEnabled()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.destination().sparkStatus()); - Assertions.assertEquals("cxpblalhhezpfk", model.destination().subresourceTarget()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointResourceTests.java deleted file mode 100644 index ce553461500d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointResourceTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointResource model = BinaryData.fromString("{\"subnetArmId\":\"ekvz\",\"id\":\"xyxhighctxbxmo\"}") - .toObject(PrivateEndpointResource.class); - Assertions.assertEquals("ekvz", model.subnetArmId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointResource model = new PrivateEndpointResource().withSubnetArmId("ekvz"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointResource.class); - Assertions.assertEquals("ekvz", model.subnetArmId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointTests.java deleted file mode 100644 index 50da88517abc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; - -public final class PrivateEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"jbasvmsmjqulngs\"}").toObject(PrivateEndpoint.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint(); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultInnerTests.java deleted file mode 100644 index 94f876895e58..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceListResultInner model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"kxbpvj\",\"requiredMembers\":[\"hx\",\"j\"],\"requiredZoneNames\":[\"u\",\"ivkrtsw\",\"xqzvszjfa\",\"vjfdx\"]},\"identity\":{\"principalId\":\"cde7106e-f687-457b-953d-160358a98cb8\",\"tenantId\":\"b2a0392a-e179-4547-bb44-cbac7877dc8e\",\"type\":\"None\",\"userAssignedIdentities\":{\"aqtdoqmcbx\":{\"principalId\":\"9389f316-753e-4d08-a143-e831c8706855\",\"clientId\":\"71473aad-896e-43bb-905c-9f8590405541\"}}},\"location\":\"vxysl\",\"tags\":{\"tkblmpewww\":\"sfxobl\",\"hxcr\":\"bkrvrnsvshqj\",\"sub\":\"bfovasrruvwbhsq\"},\"sku\":{\"name\":\"jbi\",\"tier\":\"Standard\",\"size\":\"ybsrfbjfdtwss\",\"family\":\"ftpvjzbexil\",\"capacity\":1948356330},\"id\":\"qqnvwpmq\",\"name\":\"aruoujmkcjhwqyt\",\"type\":\"r\"},{\"properties\":{\"groupId\":\"wj\",\"requiredMembers\":[\"drjervnaenqpehin\",\"oygmift\",\"nzdndslgna\",\"qig\"],\"requiredZoneNames\":[\"uhavhql\",\"thuma\",\"olbgycduiertgccy\"]},\"identity\":{\"principalId\":\"8910f182-37ab-4413-a0c8-0ba60bcbc8e4\",\"tenantId\":\"7b8f494f-ab18-4c0a-b288-eec3e51f7ffd\",\"type\":\"None\",\"userAssignedIdentities\":{\"qlfmmdnbb\":{\"principalId\":\"c00154c9-b7bd-4a3e-8175-9d4a4d3a953e\",\"clientId\":\"52ebf4da-e9ed-4098-9312-15cbc1e98be0\"}}},\"location\":\"zpswiydmc\",\"tags\":{\"dbzm\":\"zdxss\",\"cblylpstdbhhxsr\":\"vdfznudaodvxzb\",\"erscdntne\":\"dzu\"},\"sku\":{\"name\":\"iwjmygtdssls\",\"tier\":\"Standard\",\"size\":\"eriofzpyqs\",\"family\":\"wab\",\"capacity\":334511461},\"id\":\"hhszh\",\"name\":\"d\",\"type\":\"lvwiwubmwmbesl\"}]}") - .toObject(PrivateLinkResourceListResultInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("vxysl", model.value().get(0).location()); - Assertions.assertEquals("sfxobl", model.value().get(0).tags().get("tkblmpewww")); - Assertions.assertEquals("jbi", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("ybsrfbjfdtwss", model.value().get(0).sku().size()); - Assertions.assertEquals("ftpvjzbexil", model.value().get(0).sku().family()); - Assertions.assertEquals(1948356330, model.value().get(0).sku().capacity()); - Assertions.assertEquals("u", model.value().get(0).requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceListResultInner model = new PrivateLinkResourceListResultInner().withValue(Arrays.asList( - new PrivateLinkResource() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("aqtdoqmcbx", new UserAssignedIdentity()))) - .withLocation("vxysl") - .withTags(mapOf("tkblmpewww", "sfxobl", "hxcr", "bkrvrnsvshqj", "sub", "bfovasrruvwbhsq")) - .withSku(new Sku().withName("jbi") - .withTier(SkuTier.STANDARD) - .withSize("ybsrfbjfdtwss") - .withFamily("ftpvjzbexil") - .withCapacity(1948356330)) - .withRequiredZoneNames(Arrays.asList("u", "ivkrtsw", "xqzvszjfa", "vjfdx")), - new PrivateLinkResource() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("qlfmmdnbb", new UserAssignedIdentity()))) - .withLocation("zpswiydmc") - .withTags(mapOf("dbzm", "zdxss", "cblylpstdbhhxsr", "vdfznudaodvxzb", "erscdntne", "dzu")) - .withSku(new Sku().withName("iwjmygtdssls") - .withTier(SkuTier.STANDARD) - .withSize("eriofzpyqs") - .withFamily("wab") - .withCapacity(334511461)) - .withRequiredZoneNames(Arrays.asList("uhavhql", "thuma", "olbgycduiertgccy")))); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResultInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("vxysl", model.value().get(0).location()); - Assertions.assertEquals("sfxobl", model.value().get(0).tags().get("tkblmpewww")); - Assertions.assertEquals("jbi", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("ybsrfbjfdtwss", model.value().get(0).sku().size()); - Assertions.assertEquals("ftpvjzbexil", model.value().get(0).sku().family()); - Assertions.assertEquals(1948356330, model.value().get(0).sku().capacity()); - Assertions.assertEquals("u", model.value().get(0).requiredZoneNames().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcePropertiesTests.java deleted file mode 100644 index 36fe9848a3d5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcePropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = BinaryData.fromString( - "{\"groupId\":\"thhqzonosggbh\",\"requiredMembers\":[\"fwdsj\",\"ka\",\"jutiiswacff\",\"dkzzewkfvhqcrail\"],\"requiredZoneNames\":[\"ppfufl\"]}") - .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("ppfufl", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model - = new PrivateLinkResourceProperties().withRequiredZoneNames(Arrays.asList("ppfufl")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("ppfufl", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceTests.java deleted file mode 100644 index 79c2e7a3d5cd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResource model = BinaryData.fromString( - "{\"properties\":{\"groupId\":\"wwtppj\",\"requiredMembers\":[\"xogaokonzmnsikv\",\"kqze\",\"qkdltfz\"],\"requiredZoneNames\":[\"hvhgureod\"]},\"identity\":{\"principalId\":\"9eb4de2f-2936-4ce9-bfcb-51753865ab56\",\"tenantId\":\"5cb1d814-ce28-4b4e-a521-655c27e49a54\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ibqdxbxwakbogqx\":{\"principalId\":\"2d8983b7-a94d-48ba-8033-fb5e3622a7bc\",\"clientId\":\"64112d18-bb2c-428e-9638-6bfe894358b5\"},\"kzgxhurip\":{\"principalId\":\"e1c99087-fdd9-49ae-a341-3cb33dee1c63\",\"clientId\":\"02595fad-a21b-4b70-8bd2-dfb910f6c28e\"},\"odxun\":{\"principalId\":\"21ece6e7-4d85-4a6a-ba42-66f87b4a01be\",\"clientId\":\"98117997-e51b-4a84-bbf6-d1ddacc7aae9\"}}},\"location\":\"ebxmubyynt\",\"tags\":{\"ltmuwlauwzizx\":\"bqtkoievseotgqr\",\"d\":\"mpgcjefuzmuvpbt\"},\"sku\":{\"name\":\"orppxebmnzbtb\",\"tier\":\"Basic\",\"size\":\"lkfg\",\"family\":\"dneu\",\"capacity\":2052379315},\"id\":\"hsd\",\"name\":\"htozfikdow\",\"type\":\"quuvxzxcl\"}") - .toObject(PrivateLinkResource.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("ebxmubyynt", model.location()); - Assertions.assertEquals("bqtkoievseotgqr", model.tags().get("ltmuwlauwzizx")); - Assertions.assertEquals("orppxebmnzbtb", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("lkfg", model.sku().size()); - Assertions.assertEquals("dneu", model.sku().family()); - Assertions.assertEquals(2052379315, model.sku().capacity()); - Assertions.assertEquals("hvhgureod", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResource model = new PrivateLinkResource() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("ibqdxbxwakbogqx", new UserAssignedIdentity(), "kzgxhurip", - new UserAssignedIdentity(), "odxun", new UserAssignedIdentity()))) - .withLocation("ebxmubyynt") - .withTags(mapOf("ltmuwlauwzizx", "bqtkoievseotgqr", "d", "mpgcjefuzmuvpbt")) - .withSku(new Sku().withName("orppxebmnzbtb") - .withTier(SkuTier.BASIC) - .withSize("lkfg") - .withFamily("dneu") - .withCapacity(2052379315)) - .withRequiredZoneNames(Arrays.asList("hvhgureod")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResource.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("ebxmubyynt", model.location()); - Assertions.assertEquals("bqtkoievseotgqr", model.tags().get("ltmuwlauwzizx")); - Assertions.assertEquals("orppxebmnzbtb", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("lkfg", model.sku().size()); - Assertions.assertEquals("dneu", model.sku().family()); - Assertions.assertEquals(2052379315, model.sku().capacity()); - Assertions.assertEquals("hvhgureod", model.requiredZoneNames().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListWithResponseMockTests.java deleted file mode 100644 index e07beb8d7187..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResourceListResult; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"r\",\"requiredMembers\":[\"tuwcimtcaumv\",\"udzpsjqrmlujmt\"],\"requiredZoneNames\":[\"ofwuzeb\",\"qvmpjb\",\"zyenfspet\",\"eudwkhdlckdoxocj\"]},\"identity\":{\"principalId\":\"c2c4d25f-b219-4531-a6e4-818157aa4f04\",\"tenantId\":\"c501f775-2837-49de-9b64-4e272ec688dc\",\"type\":\"None\",\"userAssignedIdentities\":{\"reortwwyj\":{}}},\"location\":\"vrlhfxmrhjn\",\"tags\":{\"ksz\":\"cjywkdy\",\"l\":\"vuafanefictpt\",\"z\":\"ossj\",\"aczhfjdccjn\":\"xpzwdqzuhfgt\"},\"sku\":{\"name\":\"vbtcuhjcgjtjknt\",\"tier\":\"Free\",\"size\":\"zthcdbszsbz\",\"family\":\"xeyvidcowlrm\",\"capacity\":1231342742},\"id\":\"qxave\",\"name\":\"oezvwk\",\"type\":\"yzgavplnd\"},{\"properties\":{\"groupId\":\"iekkiskyyyaekn\",\"requiredMembers\":[\"yshdawjlmlcufb\"],\"requiredZoneNames\":[\"utfofhoajjyl\",\"yqyjnufzvl\",\"quyhbceev\",\"girrpwnqtvuxeuj\"]},\"identity\":{\"principalId\":\"30b6d8a5-0e82-4c35-a462-17f3051a784a\",\"tenantId\":\"0d41d391-86be-4578-8ab2-a8d30a81fb4f\",\"type\":\"None\",\"userAssignedIdentities\":{\"axxfdlypkcpw\":{}}},\"location\":\"qnnmjundt\",\"tags\":{\"ycgqakcsihxvt\":\"ltjhb\",\"yxnsbubwh\":\"cwwfopxp\",\"mkdhwqcqweba\":\"qqgugwluxahtq\"},\"sku\":{\"name\":\"fpkeph\",\"tier\":\"Basic\",\"size\":\"c\",\"family\":\"vkke\",\"capacity\":2073355838},\"id\":\"ypaxpjp\",\"name\":\"illgnu\",\"type\":\"ezfpffbuqxkn\"},{\"properties\":{\"groupId\":\"g\",\"requiredMembers\":[\"zyojfch\",\"cp\",\"rexzoksgq\",\"boojuxi\"],\"requiredZoneNames\":[\"blkcrfldfljw\",\"kbptsfl\"]},\"identity\":{\"principalId\":\"746eeafd-ab8f-483b-ad9d-7f168c0be033\",\"tenantId\":\"68f87143-478c-4e61-be0b-badd152065e0\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"gftshfgmuxuqiags\":{},\"oikuqirhsk\":{},\"paowkgvnlfueyxfz\":{},\"brlrjugcfebpi\":{}}},\"location\":\"enbvrllldfknb\",\"tags\":{\"i\":\"ilsxr\"},\"sku\":{\"name\":\"zlwrduxntpfxxgj\",\"tier\":\"Basic\",\"size\":\"fwfctqvey\",\"family\":\"kqynlzxeme\",\"capacity\":1938054109},\"id\":\"ckiehdmvfoyr\",\"name\":\"xxffgmcuanszeerv\",\"type\":\"cgcsapvbcqpf\"},{\"properties\":{\"groupId\":\"kijhmine\",\"requiredMembers\":[\"ivp\",\"rkvorlfqmljewyn\",\"fvvcwvurkmjufa\"],\"requiredZoneNames\":[\"npbsotmynklnm\",\"znmtvrk\",\"fcwxizk\",\"txneykeip\"]},\"identity\":{\"principalId\":\"d4142576-befe-4200-bae4-e1a584382841\",\"tenantId\":\"a22ed680-6d49-4b25-86a6-151508e3bb4f\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"iuvnfaz\":{},\"tvsayyaeiiv\":{},\"qk\":{}}},\"location\":\"jwrvewojoqfxqetx\",\"tags\":{\"uzljvgjijzqj\":\"iusp\",\"hcmecags\":\"ljsazmjsisfq\"},\"sku\":{\"name\":\"eiirpnjygllfkchh\",\"tier\":\"Free\",\"size\":\"zzcajl\",\"family\":\"qcycabaa\",\"capacity\":1883254200},\"id\":\"dhpmkxdujkxpuqzd\",\"name\":\"oqywsuarpzhryh\",\"type\":\"zx\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkResourceListResult response = manager.privateLinkResources() - .listWithResponse("lqcw", "zhndqkzstzpzec", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.value().get(0).identity().type()); - Assertions.assertEquals("vrlhfxmrhjn", response.value().get(0).location()); - Assertions.assertEquals("cjywkdy", response.value().get(0).tags().get("ksz")); - Assertions.assertEquals("vbtcuhjcgjtjknt", response.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.value().get(0).sku().tier()); - Assertions.assertEquals("zthcdbszsbz", response.value().get(0).sku().size()); - Assertions.assertEquals("xeyvidcowlrm", response.value().get(0).sku().family()); - Assertions.assertEquals(1231342742, response.value().get(0).sku().capacity()); - Assertions.assertEquals("ofwuzeb", response.value().get(0).requiredZoneNames().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkServiceConnectionStateTests.java deleted file mode 100644 index 42f3e7068997..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkServiceConnectionStateTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkServiceConnectionStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = BinaryData - .fromString( - "{\"status\":\"Disconnected\",\"description\":\"ybkzgcwr\",\"actionsRequired\":\"lxxwrljdouskc\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("ybkzgcwr", model.description()); - Assertions.assertEquals("lxxwrljdouskc", model.actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkServiceConnectionState model - = new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED) - .withDescription("ybkzgcwr") - .withActionsRequired("lxxwrljdouskc"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("ybkzgcwr", model.description()); - Assertions.assertEquals("lxxwrljdouskc", model.actionsRequired()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ProbeSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ProbeSettingsTests.java deleted file mode 100644 index 350b3951542d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ProbeSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ProbeSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ProbeSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProbeSettings model = BinaryData.fromString( - "{\"failureThreshold\":1074790994,\"successThreshold\":190325570,\"timeout\":\"PT185H38M37S\",\"period\":\"PT155H32M4S\",\"initialDelay\":\"PT161H44M50S\"}") - .toObject(ProbeSettings.class); - Assertions.assertEquals(1074790994, model.failureThreshold()); - Assertions.assertEquals(190325570, model.successThreshold()); - Assertions.assertEquals(Duration.parse("PT185H38M37S"), model.timeout()); - Assertions.assertEquals(Duration.parse("PT155H32M4S"), model.period()); - Assertions.assertEquals(Duration.parse("PT161H44M50S"), model.initialDelay()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProbeSettings model = new ProbeSettings().withFailureThreshold(1074790994) - .withSuccessThreshold(190325570) - .withTimeout(Duration.parse("PT185H38M37S")) - .withPeriod(Duration.parse("PT155H32M4S")) - .withInitialDelay(Duration.parse("PT161H44M50S")); - model = BinaryData.fromObject(model).toObject(ProbeSettings.class); - Assertions.assertEquals(1074790994, model.failureThreshold()); - Assertions.assertEquals(190325570, model.successThreshold()); - Assertions.assertEquals(Duration.parse("PT185H38M37S"), model.timeout()); - Assertions.assertEquals(Duration.parse("PT155H32M4S"), model.period()); - Assertions.assertEquals(Duration.parse("PT161H44M50S"), model.initialDelay()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PyTorchTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PyTorchTests.java deleted file mode 100644 index fc850da3cbe4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PyTorchTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PyTorch; -import org.junit.jupiter.api.Assertions; - -public final class PyTorchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PyTorch model - = BinaryData.fromString("{\"distributionType\":\"PyTorch\",\"processCountPerInstance\":409553371}") - .toObject(PyTorch.class); - Assertions.assertEquals(409553371, model.processCountPerInstance()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PyTorch model = new PyTorch().withProcessCountPerInstance(409553371); - model = BinaryData.fromObject(model).toObject(PyTorch.class); - Assertions.assertEquals(409553371, model.processCountPerInstance()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QueueSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QueueSettingsTests.java deleted file mode 100644 index b2b0a2ec8fb1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QueueSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobTier; -import com.azure.resourcemanager.machinelearning.models.QueueSettings; -import org.junit.jupiter.api.Assertions; - -public final class QueueSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QueueSettings model = BinaryData.fromString("{\"jobTier\":\"Spot\"}").toObject(QueueSettings.class); - Assertions.assertEquals(JobTier.SPOT, model.jobTier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QueueSettings model = new QueueSettings().withJobTier(JobTier.SPOT); - model = BinaryData.fromObject(model).toObject(QueueSettings.class); - Assertions.assertEquals(JobTier.SPOT, model.jobTier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaBasePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaBasePropertiesTests.java deleted file mode 100644 index 32b7429c18b1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaBasePropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties; -import com.azure.resourcemanager.machinelearning.models.QuotaUnit; -import org.junit.jupiter.api.Assertions; - -public final class QuotaBasePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaBaseProperties model = BinaryData - .fromString( - "{\"id\":\"rbnlankxmyskp\",\"type\":\"enbtkcxywny\",\"limit\":3938572142149816322,\"unit\":\"Count\"}") - .toObject(QuotaBaseProperties.class); - Assertions.assertEquals("rbnlankxmyskp", model.id()); - Assertions.assertEquals("enbtkcxywny", model.type()); - Assertions.assertEquals(3938572142149816322L, model.limit()); - Assertions.assertEquals(QuotaUnit.COUNT, model.unit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaBaseProperties model = new QuotaBaseProperties().withId("rbnlankxmyskp") - .withType("enbtkcxywny") - .withLimit(3938572142149816322L) - .withUnit(QuotaUnit.COUNT); - model = BinaryData.fromObject(model).toObject(QuotaBaseProperties.class); - Assertions.assertEquals("rbnlankxmyskp", model.id()); - Assertions.assertEquals("enbtkcxywny", model.type()); - Assertions.assertEquals(3938572142149816322L, model.limit()); - Assertions.assertEquals(QuotaUnit.COUNT, model.unit()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaUpdateParametersTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaUpdateParametersTests.java deleted file mode 100644 index 2e061f125401..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaUpdateParametersTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties; -import com.azure.resourcemanager.machinelearning.models.QuotaUnit; -import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class QuotaUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaUpdateParameters model = BinaryData.fromString( - "{\"value\":[{\"id\":\"zpuzycisp\",\"type\":\"zahmgkbrpyydhibn\",\"limit\":8775255286630911729,\"unit\":\"Count\"},{\"id\":\"a\",\"type\":\"gvtqagnbuynh\",\"limit\":2182211353058323076,\"unit\":\"Count\"},{\"id\":\"fsiarbutr\",\"type\":\"pnazzm\",\"limit\":4980695192319165499,\"unit\":\"Count\"}],\"location\":\"xttd\"}") - .toObject(QuotaUpdateParameters.class); - Assertions.assertEquals("zpuzycisp", model.value().get(0).id()); - Assertions.assertEquals("zahmgkbrpyydhibn", model.value().get(0).type()); - Assertions.assertEquals(8775255286630911729L, model.value().get(0).limit()); - Assertions.assertEquals(QuotaUnit.COUNT, model.value().get(0).unit()); - Assertions.assertEquals("xttd", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaUpdateParameters model = new QuotaUpdateParameters().withValue(Arrays.asList( - new QuotaBaseProperties().withId("zpuzycisp") - .withType("zahmgkbrpyydhibn") - .withLimit(8775255286630911729L) - .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties().withId("a") - .withType("gvtqagnbuynh") - .withLimit(2182211353058323076L) - .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties().withId("fsiarbutr") - .withType("pnazzm") - .withLimit(4980695192319165499L) - .withUnit(QuotaUnit.COUNT))) - .withLocation("xttd"); - model = BinaryData.fromObject(model).toObject(QuotaUpdateParameters.class); - Assertions.assertEquals("zpuzycisp", model.value().get(0).id()); - Assertions.assertEquals("zahmgkbrpyydhibn", model.value().get(0).type()); - Assertions.assertEquals(8775255286630911729L, model.value().get(0).limit()); - Assertions.assertEquals(QuotaUnit.COUNT, model.value().get(0).unit()); - Assertions.assertEquals("xttd", model.location()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasListMockTests.java deleted file mode 100644 index b9e3ccc59843..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ResourceQuota; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class QuotasListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"wozfvza\",\"amlWorkspaceLocation\":\"pcvqgxcvwioqh\",\"type\":\"cgmlmpn\",\"name\":{\"value\":\"uyiarznhdqseyp\",\"localizedValue\":\"majpuyxoafrmzgcc\"},\"limit\":5156431097423162014,\"unit\":\"Count\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.quotas().list("spt", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateWithResponseMockTests.java deleted file mode 100644 index 5efbb2da2398..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties; -import com.azure.resourcemanager.machinelearning.models.QuotaUnit; -import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; -import com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotasResult; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class QuotasUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"mabvbmnhtwofxf\",\"type\":\"lvyqnslbqrm\",\"limit\":7940166137323106740,\"unit\":\"Count\",\"status\":\"InvalidVMFamilyName\"}],\"nextLink\":\"qqrugwespscvs\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - UpdateWorkspaceQuotasResult response = manager.quotas() - .updateWithResponse("fpabwbpzgfg", - new QuotaUpdateParameters().withValue(Arrays.asList( - new QuotaBaseProperties().withId("hgxg") - .withType("abbfpxxa") - .withLimit(1299606997550791380L) - .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties().withId("sn") - .withType("wyxjsfmaxcebnbeo") - .withLimit(1045545946093333961L) - .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties().withId("rwqxpjpvem") - .withType("kh") - .withLimit(2148479321953315144L) - .withUnit(QuotaUnit.COUNT))) - .withLocation("zmhytebjkjgee"), - com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RandomSamplingAlgorithmTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RandomSamplingAlgorithmTests.java deleted file mode 100644 index 045276e071e0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RandomSamplingAlgorithmTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.RandomSamplingAlgorithm; -import com.azure.resourcemanager.machinelearning.models.RandomSamplingAlgorithmRule; -import org.junit.jupiter.api.Assertions; - -public final class RandomSamplingAlgorithmTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RandomSamplingAlgorithm model - = BinaryData.fromString("{\"samplingAlgorithmType\":\"Random\",\"seed\":1840024509,\"rule\":\"Random\"}") - .toObject(RandomSamplingAlgorithm.class); - Assertions.assertEquals(1840024509, model.seed()); - Assertions.assertEquals(RandomSamplingAlgorithmRule.RANDOM, model.rule()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RandomSamplingAlgorithm model - = new RandomSamplingAlgorithm().withSeed(1840024509).withRule(RandomSamplingAlgorithmRule.RANDOM); - model = BinaryData.fromObject(model).toObject(RandomSamplingAlgorithm.class); - Assertions.assertEquals(1840024509, model.seed()); - Assertions.assertEquals(RandomSamplingAlgorithmRule.RANDOM, model.rule()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceScheduleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceScheduleTests.java deleted file mode 100644 index 8293869fbbe0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceScheduleTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecurrenceScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecurrenceSchedule model = BinaryData.fromString( - "{\"hours\":[537279980,2138808813],\"minutes\":[1334431850,380454527],\"weekDays\":[\"Friday\",\"Saturday\",\"Friday\",\"Wednesday\"],\"monthDays\":[1634353731]}") - .toObject(RecurrenceSchedule.class); - Assertions.assertEquals(537279980, model.hours().get(0)); - Assertions.assertEquals(1334431850, model.minutes().get(0)); - Assertions.assertEquals(WeekDay.FRIDAY, model.weekDays().get(0)); - Assertions.assertEquals(1634353731, model.monthDays().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecurrenceSchedule model = new RecurrenceSchedule().withHours(Arrays.asList(537279980, 2138808813)) - .withMinutes(Arrays.asList(1334431850, 380454527)) - .withWeekDays(Arrays.asList(WeekDay.FRIDAY, WeekDay.SATURDAY, WeekDay.FRIDAY, WeekDay.WEDNESDAY)) - .withMonthDays(Arrays.asList(1634353731)); - model = BinaryData.fromObject(model).toObject(RecurrenceSchedule.class); - Assertions.assertEquals(537279980, model.hours().get(0)); - Assertions.assertEquals(1334431850, model.minutes().get(0)); - Assertions.assertEquals(WeekDay.FRIDAY, model.weekDays().get(0)); - Assertions.assertEquals(1634353731, model.monthDays().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTests.java deleted file mode 100644 index 92e56ac57e45..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.ComputeWeekDay; -import com.azure.resourcemanager.machinelearning.models.Recurrence; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecurrenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Recurrence model = BinaryData.fromString( - "{\"frequency\":\"Minute\",\"interval\":782951006,\"startTime\":\"ecf\",\"timeZone\":\"hagxsure\",\"schedule\":{\"hours\":[906252863,1130901316,1113850599,58048223],\"minutes\":[164034055,953722289],\"monthDays\":[1328602727,1389187624,813655099],\"weekDays\":[\"Tuesday\"]}}") - .toObject(Recurrence.class); - Assertions.assertEquals(ComputeRecurrenceFrequency.MINUTE, model.frequency()); - Assertions.assertEquals(782951006, model.interval()); - Assertions.assertEquals("ecf", model.startTime()); - Assertions.assertEquals("hagxsure", model.timeZone()); - Assertions.assertEquals(906252863, model.schedule().hours().get(0)); - Assertions.assertEquals(164034055, model.schedule().minutes().get(0)); - Assertions.assertEquals(1328602727, model.schedule().monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.TUESDAY, model.schedule().weekDays().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Recurrence model - = new Recurrence().withFrequency(ComputeRecurrenceFrequency.MINUTE) - .withInterval(782951006) - .withStartTime("ecf") - .withTimeZone("hagxsure") - .withSchedule(new ComputeRecurrenceSchedule() - .withHours(Arrays.asList(906252863, 1130901316, 1113850599, 58048223)) - .withMinutes(Arrays.asList(164034055, 953722289)) - .withMonthDays(Arrays.asList(1328602727, 1389187624, 813655099)) - .withWeekDays(Arrays.asList(ComputeWeekDay.TUESDAY))); - model = BinaryData.fromObject(model).toObject(Recurrence.class); - Assertions.assertEquals(ComputeRecurrenceFrequency.MINUTE, model.frequency()); - Assertions.assertEquals(782951006, model.interval()); - Assertions.assertEquals("ecf", model.startTime()); - Assertions.assertEquals("hagxsure", model.timeZone()); - Assertions.assertEquals(906252863, model.schedule().hours().get(0)); - Assertions.assertEquals(164034055, model.schedule().minutes().get(0)); - Assertions.assertEquals(1328602727, model.schedule().monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.TUESDAY, model.schedule().weekDays().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTriggerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTriggerTests.java deleted file mode 100644 index 8d1101bc86eb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTriggerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecurrenceTriggerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecurrenceTrigger model = BinaryData.fromString( - "{\"triggerType\":\"Recurrence\",\"frequency\":\"Week\",\"interval\":875349489,\"schedule\":{\"hours\":[2010585731,1159894455,1470565403,964360782],\"minutes\":[213294039,384841052,1302563571,1151725969],\"weekDays\":[\"Thursday\",\"Sunday\",\"Sunday\"],\"monthDays\":[491471659]},\"endTime\":\"qagnepzwakl\",\"startTime\":\"sbq\",\"timeZone\":\"agwwrxaom\"}") - .toObject(RecurrenceTrigger.class); - Assertions.assertEquals("qagnepzwakl", model.endTime()); - Assertions.assertEquals("sbq", model.startTime()); - Assertions.assertEquals("agwwrxaom", model.timeZone()); - Assertions.assertEquals(RecurrenceFrequency.WEEK, model.frequency()); - Assertions.assertEquals(875349489, model.interval()); - Assertions.assertEquals(2010585731, model.schedule().hours().get(0)); - Assertions.assertEquals(213294039, model.schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, model.schedule().weekDays().get(0)); - Assertions.assertEquals(491471659, model.schedule().monthDays().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecurrenceTrigger model = new RecurrenceTrigger().withEndTime("qagnepzwakl") - .withStartTime("sbq") - .withTimeZone("agwwrxaom") - .withFrequency(RecurrenceFrequency.WEEK) - .withInterval(875349489) - .withSchedule( - new RecurrenceSchedule().withHours(Arrays.asList(2010585731, 1159894455, 1470565403, 964360782)) - .withMinutes(Arrays.asList(213294039, 384841052, 1302563571, 1151725969)) - .withWeekDays(Arrays.asList(WeekDay.THURSDAY, WeekDay.SUNDAY, WeekDay.SUNDAY)) - .withMonthDays(Arrays.asList(491471659))); - model = BinaryData.fromObject(model).toObject(RecurrenceTrigger.class); - Assertions.assertEquals("qagnepzwakl", model.endTime()); - Assertions.assertEquals("sbq", model.startTime()); - Assertions.assertEquals("agwwrxaom", model.timeZone()); - Assertions.assertEquals(RecurrenceFrequency.WEEK, model.frequency()); - Assertions.assertEquals(875349489, model.interval()); - Assertions.assertEquals(2010585731, model.schedule().hours().get(0)); - Assertions.assertEquals(213294039, model.schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, model.schedule().weekDays().get(0)); - Assertions.assertEquals(491471659, model.schedule().monthDays().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateMockTests.java deleted file mode 100644 index e2f0171da50f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AcrDetails; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; -import com.azure.resourcemanager.machinelearning.models.Registry; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -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 reactor.core.publisher.Mono; - -public final class RegistriesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"identity\":{\"principalId\":\"6ee93217-e9d7-4d7b-aa0d-ee6c95ebe873\",\"tenantId\":\"d3caa03c-7ba5-40c6-b748-a12e0d7ce54f\",\"type\":\"None\",\"userAssignedIdentities\":{\"ipbfs\":{\"principalId\":\"9346226d-6fd3-48a9-ba8f-b396b9cd6110\",\"clientId\":\"3a469d8a-9d56-4fad-99e7-584e1caf3b6b\"},\"lpevz\":{\"principalId\":\"826fbdbc-4b21-4613-9024-b94580be4643\",\"clientId\":\"a1dc4284-ef51-4281-a1ed-c7cda56ec657\"},\"dnok\":{\"principalId\":\"e249e80b-2a8c-46e3-86d0-b4df35070384\",\"clientId\":\"6bc9d10d-8e0d-4c99-9354-1a342de26690\"},\"iecjyftsne\":{\"principalId\":\"43c287fd-0a04-4088-a830-3b60163701fe\",\"clientId\":\"c94a19bb-054e-49db-8dcf-ce41b6783a7e\"}}},\"kind\":\"z\",\"properties\":{\"discoveryUrl\":\"jclaqxx\",\"intellectualPropertyPublisher\":\"q\",\"managedResourceGroup\":{\"resourceId\":\"pdsuyywnaq\"},\"mlFlowRegistryUri\":\"oxuh\",\"registryPrivateEndpointConnections\":[{\"id\":\"dfzcnylzwlhuf\",\"location\":\"cpwrtgtdegf\",\"properties\":{\"groupIds\":[\"ptbiuikp\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"fecxvkqjpov\"}},{\"id\":\"vxpsnrew\",\"location\":\"mhjmqf\",\"properties\":{\"groupIds\":[\"cxyiqppacjiqrlla\",\"ylbtkxei\",\"zgn\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"ttexaugoj\"}}],\"publicNetworkAccess\":\"jezr\",\"regionDetails\":[{\"acrDetails\":[{},{},{},{}],\"location\":\"lnt\",\"storageAccountDetails\":[{}]}]},\"sku\":{\"name\":\"qtvxghbe\",\"tier\":\"Premium\",\"size\":\"otqorrvwlce\",\"family\":\"lyugzl\",\"capacity\":977804529},\"location\":\"rj\",\"tags\":{\"gevjman\":\"syfdsgrtkevimru\",\"vtzdtwxfjlpkoc\":\"rvvjoklb\",\"uvwlfzjrjgla\":\"exfmqfuflu\"},\"id\":\"pzgzscg\",\"name\":\"lwuj\",\"type\":\"ey\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Registry response = manager.registries() - .define("esetutqjsojw") - .withRegion("khqhvktcztmqdkh") - .withExistingResourceGroup("kz") - .withTags(mapOf("xxxqfrntzbhmx", "pkgxemvlyaprjz", "smyvvfapfbm", "pxfauvgtoino", "knefcoopt", "w", - "gupiosibg", "dspdd")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("tzcmag", new UserAssignedIdentity(), "jka", new UserAssignedIdentity()))) - .withKind("qh") - .withSku(new Sku().withName("ckgqa") - .withTier(SkuTier.PREMIUM) - .withSize("szwoeqljlwfq") - .withFamily("yww") - .withCapacity(1125483488)) - .withDiscoveryUrl("wqhz") - .withIntellectualPropertyPublisher("gmg") - .withManagedResourceGroup(new ArmResourceId().withResourceId("mtywivbuiteed")) - .withMlFlowRegistryUri("klv") - .withRegistryPrivateEndpointConnections( - Arrays.asList(new RegistryPrivateEndpointConnection().withId("ykwbhzs") - .withLocation("djitlqxpsnnnxhgd") - .withGroupIds(Arrays.asList("ylnd")) - .withPrivateEndpoint(new PrivateEndpointResource()) - .withRegistryPrivateLinkServiceConnectionState(new RegistryPrivateLinkServiceConnectionState()) - .withProvisioningState("cjkqjzfzkhdnp"))) - .withPublicNetworkAccess("rxjdfkqlkaipfyvq") - .withRegionDetails(Arrays.asList( - new RegistryRegionArmDetails().withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("kbiekyvak") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("napkpaied") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("avezwclmzmlr") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails())), - new RegistryRegionArmDetails().withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("cdiqhvhcbukawifz") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails())))) - .create(); - - Assertions.assertEquals("rj", response.location()); - Assertions.assertEquals("syfdsgrtkevimru", response.tags().get("gevjman")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("z", response.kind()); - Assertions.assertEquals("qtvxghbe", response.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("otqorrvwlce", response.sku().size()); - Assertions.assertEquals("lyugzl", response.sku().family()); - Assertions.assertEquals(977804529, response.sku().capacity()); - Assertions.assertEquals("jclaqxx", response.discoveryUrl()); - Assertions.assertEquals("q", response.intellectualPropertyPublisher()); - Assertions.assertEquals("pdsuyywnaq", response.managedResourceGroup().resourceId()); - Assertions.assertEquals("oxuh", response.mlFlowRegistryUri()); - Assertions.assertEquals("dfzcnylzwlhuf", response.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("cpwrtgtdegf", response.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("ptbiuikp", response.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("fecxvkqjpov", - response.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("jezr", response.publicNetworkAccess()); - Assertions.assertEquals("lnt", response.regionDetails().get(0).location()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteMockTests.java deleted file mode 100644 index a76db0c43c87..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistriesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registries().delete("pbzq", "wt", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index e3aeed6b6892..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.Registry; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistriesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"identity\":{\"principalId\":\"a7071b3b-b806-497e-bfd7-2ac105393f1c\",\"tenantId\":\"49c155e9-9045-4aeb-be87-49493366cba6\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"joor\":{\"principalId\":\"27009e2d-54e5-4967-8c68-3b88488c9ac0\",\"clientId\":\"7c451233-5a71-472f-9b8c-9aff026396e2\"},\"hbcckbcvt\":{\"principalId\":\"8b223669-6af3-4c56-924e-29951efcb15d\",\"clientId\":\"18a3838c-7a4d-4a93-8298-109bb89d3e9c\"},\"drma\":{\"principalId\":\"e694df81-8179-4684-822b-23f42707ef88\",\"clientId\":\"36a7ab34-b5b1-43b9-b697-ecef11a8a356\"},\"hph\":{\"principalId\":\"da92e77f-b865-4d39-85a5-d6accf3b74cc\",\"clientId\":\"e39aeec4-76f0-43c9-ba50-bf30d61d1ab7\"}}},\"kind\":\"kquhmblnismviaa\",\"properties\":{\"discoveryUrl\":\"exsrglxljuyv\",\"intellectualPropertyPublisher\":\"povzespdip\",\"managedResourceGroup\":{\"resourceId\":\"npdjomd\"},\"mlFlowRegistryUri\":\"dwosjxywwvilkyht\",\"registryPrivateEndpointConnections\":[{\"id\":\"hdbbjgsjm\",\"location\":\"brpwj\",\"properties\":{\"groupIds\":[\"tkghrrxauuhdkh\",\"izyxoyxnhub\",\"wip\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"vp\"}},{\"id\":\"zyrpdxygfpqxseme\",\"location\":\"pdmm\",\"properties\":{\"groupIds\":[\"frqebrjopotefe\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"gjywwidn\"}},{\"id\":\"sdkvhuiadyho\",\"location\":\"sypgapfdwhw\",\"properties\":{\"groupIds\":[\"okuqnk\",\"skfl\",\"j\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"jeevmbhemr\"}},{\"id\":\"zetsspww\",\"location\":\"botbrepefrli\",\"properties\":{\"groupIds\":[\"yar\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"gcsco\"}}],\"publicNetworkAccess\":\"fsgilwisqxzpz\",\"regionDetails\":[{\"acrDetails\":[{}],\"location\":\"trfvogknocshmp\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{},{}],\"location\":\"birbrvzhfjqpxyd\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{},{}],\"location\":\"m\",\"storageAccountDetails\":[{}]}]},\"sku\":{\"name\":\"cdgunsjssre\",\"tier\":\"Premium\",\"size\":\"koue\",\"family\":\"gkxyrsppbghye\",\"capacity\":1161959928},\"location\":\"awlqvuwsqmwqsgy\",\"tags\":{\"tngxvrpkizjnkgd\":\"o\",\"kbkqpsvoxshxum\":\"ursumbci\"},\"id\":\"uyblo\",\"name\":\"rufvmgblbqx\",\"type\":\"samxyjqhwsoj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Registry response = manager.registries() - .getByResourceGroupWithResponse("qjyiwuveryavb", "vvcogupsho", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("awlqvuwsqmwqsgy", response.location()); - Assertions.assertEquals("o", response.tags().get("tngxvrpkizjnkgd")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("kquhmblnismviaa", response.kind()); - Assertions.assertEquals("cdgunsjssre", response.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("koue", response.sku().size()); - Assertions.assertEquals("gkxyrsppbghye", response.sku().family()); - Assertions.assertEquals(1161959928, response.sku().capacity()); - Assertions.assertEquals("exsrglxljuyv", response.discoveryUrl()); - Assertions.assertEquals("povzespdip", response.intellectualPropertyPublisher()); - Assertions.assertEquals("npdjomd", response.managedResourceGroup().resourceId()); - Assertions.assertEquals("dwosjxywwvilkyht", response.mlFlowRegistryUri()); - Assertions.assertEquals("hdbbjgsjm", response.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("brpwj", response.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("tkghrrxauuhdkh", - response.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("vp", response.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("fsgilwisqxzpz", response.publicNetworkAccess()); - Assertions.assertEquals("trfvogknocshmp", response.regionDetails().get(0).location()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupMockTests.java deleted file mode 100644 index 24f3e03df8d7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.Registry; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistriesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"23dff3e1-3086-416b-a02b-8726baca0832\",\"tenantId\":\"1a1a9b97-ffa1-46a7-8e54-eced4ab6f137\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"azeq\":{\"principalId\":\"e0bfee08-d897-4220-8106-8e4d42244f54\",\"clientId\":\"9512dcaf-7961-43f8-8dc5-306463522da5\"},\"uuujlitics\":{\"principalId\":\"44096f7c-80e1-444a-b41b-88a20b9ec4b8\",\"clientId\":\"d3a956f0-2d61-49b7-8cab-ad17412e2fa9\"}}},\"kind\":\"qxgjz\",\"properties\":{\"discoveryUrl\":\"hop\",\"intellectualPropertyPublisher\":\"xip\",\"managedResourceGroup\":{\"resourceId\":\"pvkcnggocnwnjm\"},\"mlFlowRegistryUri\":\"tlam\",\"registryPrivateEndpointConnections\":[{\"id\":\"k\",\"location\":\"jxwwqz\",\"properties\":{\"groupIds\":[\"b\",\"frhqzvwznwcqoapd\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"tetfdpu\"}},{\"id\":\"zdtjbesfum\",\"location\":\"saafkvqhbwsviv\",\"properties\":{\"groupIds\":[\"g\",\"fvublszsveguxaxi\",\"pnymbjrsdiufqxr\",\"zijosuzegmcmlzmf\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"newrvjg\"}},{\"id\":\"mx\",\"location\":\"gowdavpqyhax\",\"properties\":{\"groupIds\":[\"oz\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"w\"}}],\"publicNetworkAccess\":\"n\",\"regionDetails\":[{\"acrDetails\":[{}],\"location\":\"cggoppmxcmoug\",\"storageAccountDetails\":[{}]}]},\"sku\":{\"name\":\"fy\",\"tier\":\"Standard\",\"size\":\"a\",\"family\":\"qvawkesxvz\",\"capacity\":1637573334},\"location\":\"wpjpgqwbrzkm\",\"tags\":{\"nqlizlcyhjhrkfp\":\"mycxmhorrecoiq\",\"bvm\":\"iiommisbf\",\"dvfjvbwawyma\":\"jcmpoh\"},\"id\":\"boindiuyqdjkugcj\",\"name\":\"sqpkmbryh\",\"type\":\"shkv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.registries().listByResourceGroup("skinmxanjguadh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wpjpgqwbrzkm", response.iterator().next().location()); - Assertions.assertEquals("mycxmhorrecoiq", response.iterator().next().tags().get("nqlizlcyhjhrkfp")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("qxgjz", response.iterator().next().kind()); - Assertions.assertEquals("fy", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.iterator().next().sku().tier()); - Assertions.assertEquals("a", response.iterator().next().sku().size()); - Assertions.assertEquals("qvawkesxvz", response.iterator().next().sku().family()); - Assertions.assertEquals(1637573334, response.iterator().next().sku().capacity()); - Assertions.assertEquals("hop", response.iterator().next().discoveryUrl()); - Assertions.assertEquals("xip", response.iterator().next().intellectualPropertyPublisher()); - Assertions.assertEquals("pvkcnggocnwnjm", response.iterator().next().managedResourceGroup().resourceId()); - Assertions.assertEquals("tlam", response.iterator().next().mlFlowRegistryUri()); - Assertions.assertEquals("k", response.iterator().next().registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("jxwwqz", - response.iterator().next().registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("b", - response.iterator().next().registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("tetfdpu", - response.iterator().next().registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("n", response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("cggoppmxcmoug", response.iterator().next().regionDetails().get(0).location()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListMockTests.java deleted file mode 100644 index ad2c22cf7ab4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.Registry; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistriesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"9434c079-d0ae-4331-9b62-bec292ff8172\",\"tenantId\":\"1e7e30fe-64f3-4a09-bd77-1caf731760aa\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"trbq\":{\"principalId\":\"99cfc218-6b07-4dc8-940b-3bd958de9722\",\"clientId\":\"164a1e67-fb20-4e86-8758-81b0629b5065\"},\"kliop\":{\"principalId\":\"843da938-0b4a-45f1-acb0-d3ffba09fff6\",\"clientId\":\"4590e8db-037f-49bc-821c-c48784efef99\"},\"katccetyyv\":{\"principalId\":\"f6ac3e80-e019-4680-8cac-f0bfb771a1cc\",\"clientId\":\"5bf7e090-b85b-4155-814b-45e160d3eed0\"}}},\"kind\":\"wobbwns\",\"properties\":{\"discoveryUrl\":\"yirt\",\"intellectualPropertyPublisher\":\"zkpjeegzhhfn\",\"managedResourceGroup\":{\"resourceId\":\"lepcklowuthf\"},\"mlFlowRegistryUri\":\"hnmllbljehwhxxu\",\"registryPrivateEndpointConnections\":[{\"id\":\"a\",\"location\":\"hzkvna\",\"properties\":{\"groupIds\":[\"qwsddxaov\",\"bfllfkeub\",\"iibuab\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"hvnjcbuzu\"}},{\"id\":\"qoeoukvinkgb\",\"location\":\"q\",\"properties\":{\"groupIds\":[\"hdyasklmyfh\",\"lxwedetawl\",\"atvfddqspd\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"jtszqexcqcwbxx\"}},{\"id\":\"vekqjdrumlvk\",\"location\":\"wq\",\"properties\":{\"groupIds\":[\"vmw\",\"yarswsvtzotmwxqd\",\"bdanfexlawkeqjhz\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"mjsk\"}},{\"id\":\"enjnady\",\"location\":\"vounbyv\",\"properties\":{\"groupIds\":[\"rrgxqbknoxj\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"hmmwbvr\"}}],\"publicNetworkAccess\":\"jbiigxxr\",\"regionDetails\":[{\"acrDetails\":[{}],\"location\":\"wigif\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{},{}],\"location\":\"tlpshxjhanskooal\",\"storageAccountDetails\":[{},{},{}]},{\"acrDetails\":[{},{},{}],\"location\":\"qvfyoksstalji\",\"storageAccountDetails\":[{},{}]}]},\"sku\":{\"name\":\"j\",\"tier\":\"Basic\",\"size\":\"mnaaqhscaanddlv\",\"family\":\"uv\",\"capacity\":1190877470},\"location\":\"lsb\",\"tags\":{\"teklgs\":\"djvyclasdprknup\",\"oaol\":\"pvqczpk\",\"wcs\":\"h\",\"euimtxmd\":\"ebtjg\"},\"id\":\"exar\",\"name\":\"ukoir\",\"type\":\"ivftl\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.registries().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lsb", response.iterator().next().location()); - Assertions.assertEquals("djvyclasdprknup", response.iterator().next().tags().get("teklgs")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("wobbwns", response.iterator().next().kind()); - Assertions.assertEquals("j", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.iterator().next().sku().tier()); - Assertions.assertEquals("mnaaqhscaanddlv", response.iterator().next().sku().size()); - Assertions.assertEquals("uv", response.iterator().next().sku().family()); - Assertions.assertEquals(1190877470, response.iterator().next().sku().capacity()); - Assertions.assertEquals("yirt", response.iterator().next().discoveryUrl()); - Assertions.assertEquals("zkpjeegzhhfn", response.iterator().next().intellectualPropertyPublisher()); - Assertions.assertEquals("lepcklowuthf", response.iterator().next().managedResourceGroup().resourceId()); - Assertions.assertEquals("hnmllbljehwhxxu", response.iterator().next().mlFlowRegistryUri()); - Assertions.assertEquals("a", response.iterator().next().registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("hzkvna", - response.iterator().next().registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("qwsddxaov", - response.iterator().next().registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("hvnjcbuzu", - response.iterator().next().registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("jbiigxxr", response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("wigif", response.iterator().next().regionDetails().get(0).location()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsMockTests.java deleted file mode 100644 index 66981a507e0f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsMockTests.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; -import com.azure.resourcemanager.machinelearning.models.AcrDetails; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; -import com.azure.resourcemanager.machinelearning.models.Registry; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -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 reactor.core.publisher.Mono; - -public final class RegistriesRemoveRegionsMockTests { - @Test - public void testRemoveRegions() throws Exception { - String responseStr - = "{\"identity\":{\"principalId\":\"e98eb1f4-78b4-4ccc-bbf7-3df0dcf73381\",\"tenantId\":\"ab07c3b1-ab20-4753-aaf8-10b832ae959b\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"jxdrgxpuxpzslmf\":{\"principalId\":\"5263d61b-b20a-44f1-b1ec-aa5982634523\",\"clientId\":\"1296c499-c356-4dd9-ad7c-8e76c83dab8e\"}}},\"kind\":\"pzrycchqz\",\"properties\":{\"discoveryUrl\":\"gesdzgszjhe\",\"intellectualPropertyPublisher\":\"mdhchi\",\"managedResourceGroup\":{\"resourceId\":\"rhgpityeuv\"},\"mlFlowRegistryUri\":\"sbmebfgbzn\",\"registryPrivateEndpointConnections\":[{\"id\":\"kupaeywy\",\"location\":\"vyzuyqzjfvbn\",\"properties\":{\"groupIds\":[\"zlscyzvvsxmyz\",\"sgb\",\"cqheixazebmmjaig\",\"xwqiparctsheggt\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"kxx\"}},{\"id\":\"whoosrsolhhv\",\"location\":\"oejbgiqhjpe\",\"properties\":{\"groupIds\":[\"ifie\",\"xxorsdvuirqfk\",\"jllfgmdoaihl\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"ci\"}}],\"publicNetworkAccess\":\"irybwgaccvwky\",\"regionDetails\":[{\"acrDetails\":[{},{}],\"location\":\"tbynxshcawexge\",\"storageAccountDetails\":[{},{}]},{\"acrDetails\":[{},{},{}],\"location\":\"zxxkojjphbobu\",\"storageAccountDetails\":[{}]}]},\"sku\":{\"name\":\"wnpcxdkmtvparyub\",\"tier\":\"Standard\",\"size\":\"lpz\",\"family\":\"votuc\",\"capacity\":489805159},\"location\":\"ocumqzf\",\"tags\":{\"qsgert\":\"emzdnvnooklgren\",\"bd\":\"icemgsnc\",\"slbnunpxswmcc\":\"kphaed\"},\"id\":\"k\",\"name\":\"viaaep\",\"type\":\"lxbofdchboacf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Registry response - = manager.registries() - .removeRegions("bbbgvm", "wyzxqhuhmldhnz", new RegistryInner().withLocation("jqsshu") - .withTags(mapOf("rqza", "ttnurkm", "qvvtjwdlduvim", "uwome", "rmxoxtap", "tce", "bkj", "fbj")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("o", new UserAssignedIdentity(), "tqhq", - new UserAssignedIdentity(), "uaermawwlnsdaz", new UserAssignedIdentity()))) - .withKind("emcotwfuot") - .withSku(new Sku().withName("znyjqbwxp") - .withTier(SkuTier.STANDARD) - .withSize("isloquttkbzwgju") - .withFamily("bdqm") - .withCapacity(310451773)) - .withDiscoveryUrl("sxzhik") - .withIntellectualPropertyPublisher("fszxbupsxqo") - .withManagedResourceGroup(new ArmResourceId().withResourceId("xcgqkhyvtajwkr")) - .withMlFlowRegistryUri("zlmwfncwlwov") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("mjbyssprkbzraljw") - .withLocation("csa") - .withGroupIds(Arrays.asList("pgzmxrg")) - .withPrivateEndpoint(new PrivateEndpointResource()) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState()) - .withProvisioningState("jdmjunnt"), - new RegistryPrivateEndpointConnection().withId("g") - .withLocation("vnwrziminet") - .withGroupIds(Arrays.asList("fuxdtpjcsqkedlcl")) - .withPrivateEndpoint(new PrivateEndpointResource()) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState()) - .withProvisioningState("yfftqombdsgqxa"))) - .withPublicNetworkAccess("duo") - .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("byfdfuajnhpy") - .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails( - Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("iw") - .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())))), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ocumqzf", response.location()); - Assertions.assertEquals("emzdnvnooklgren", response.tags().get("qsgert")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("pzrycchqz", response.kind()); - Assertions.assertEquals("wnpcxdkmtvparyub", response.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals("lpz", response.sku().size()); - Assertions.assertEquals("votuc", response.sku().family()); - Assertions.assertEquals(489805159, response.sku().capacity()); - Assertions.assertEquals("gesdzgszjhe", response.discoveryUrl()); - Assertions.assertEquals("mdhchi", response.intellectualPropertyPublisher()); - Assertions.assertEquals("rhgpityeuv", response.managedResourceGroup().resourceId()); - Assertions.assertEquals("sbmebfgbzn", response.mlFlowRegistryUri()); - Assertions.assertEquals("kupaeywy", response.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("vyzuyqzjfvbn", response.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("zlscyzvvsxmyz", - response.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("kxx", response.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("irybwgaccvwky", response.publicNetworkAccess()); - Assertions.assertEquals("tbynxshcawexge", response.regionDetails().get(0).location()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateMockTests.java deleted file mode 100644 index faec9d02becb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -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 reactor.core.publisher.Mono; - -public final class RegistryCodeContainersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"putocr\",\"nextVersion\":\"gqicmdrgcuzjmvkr\",\"description\":\"jcqhgcmljzksqim\",\"tags\":{\"qpvhszopeukufds\":\"jvfiomhc\",\"fsjbpwjwz\":\"bsskgqjemosq\"},\"properties\":{\"zkhxfp\":\"pdzy\",\"ibweua\":\"cuudqhadxjvvl\"}},\"id\":\"txlz\",\"name\":\"coqxtvytzqlyldj\",\"type\":\"zmxyrazzstjvcs\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CodeContainer response = manager.registryCodeContainers() - .createOrUpdate("btd", "zhixccnkf", "og", - new CodeContainerInner().withProperties(new CodeContainerProperties().withDescription("ev") - .withTags( - mapOf("wukfjvqglaxseisv", "ddpwmgw", "phheove", "vg", "h", "kpalecztl", "fssrgrq", "tzpu")) - .withProperties(mapOf("louurmuzembqq", "quo", "oxlorxgsl", "ehdhjofywwna", "u", "c")) - .withIsArchived(true)), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jcqhgcmljzksqim", response.properties().description()); - Assertions.assertEquals("jvfiomhc", response.properties().tags().get("qpvhszopeukufds")); - Assertions.assertEquals("pdzy", response.properties().properties().get("zkhxfp")); - Assertions.assertEquals(true, response.properties().isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteMockTests.java deleted file mode 100644 index b1a0331bd4c3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryCodeContainersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryCodeContainers().delete("gnmfakeqnitroml", "svktfps", "ows", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetWithResponseMockTests.java deleted file mode 100644 index 15722bd5391f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryCodeContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":false,\"latestVersion\":\"iri\",\"nextVersion\":\"mqtr\",\"description\":\"doxdegacdedpkw\",\"tags\":{\"mn\":\"bpgdcidpdaqe\"},\"properties\":{\"dureevivk\":\"irqqclsaqife\",\"fpxeswctlfytb\":\"glioklsu\"}},\"id\":\"ytvnpbgcesfd\",\"name\":\"fclmowur\",\"type\":\"fofkbcjzzwweob\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CodeContainer response = manager.registryCodeContainers() - .getWithResponse("vfxjtxlawmv", "yqabjropxfqd", "llznyjyuwqlzw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("doxdegacdedpkw", response.properties().description()); - Assertions.assertEquals("bpgdcidpdaqe", response.properties().tags().get("mn")); - Assertions.assertEquals("irqqclsaqife", response.properties().properties().get("dureevivk")); - Assertions.assertEquals(false, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListMockTests.java deleted file mode 100644 index 6fe21069c33f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryCodeContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"clclf\",\"nextVersion\":\"vyjommw\",\"description\":\"poipjylxtebvse\",\"tags\":{\"lkbntcvpvdfmo\":\"vvpaysqwhzdcyand\",\"sqpffapjpjmsbzz\":\"qctfvxu\",\"iubeqk\":\"snyfowyjzuak\"},\"properties\":{\"h\":\"lrglhxsoang\",\"reneggpdtyz\":\"nhogse\",\"dupe\":\"xlitwkejmgem\"}},\"id\":\"kvsd\",\"name\":\"vhr\",\"type\":\"pezammpkapvnpeu\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.registryCodeContainers() - .list("sphtraitrmsukxtu", "tgcptctxpoeg", "ckm", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("poipjylxtebvse", response.iterator().next().properties().description()); - Assertions.assertEquals("vvpaysqwhzdcyand", - response.iterator().next().properties().tags().get("lkbntcvpvdfmo")); - Assertions.assertEquals("lrglhxsoang", response.iterator().next().properties().properties().get("h")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteMockTests.java deleted file mode 100644 index d21e98f6c2d8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryCodeVersionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryCodeVersions() - .delete("hcxwwwvun", "nsgvxhxrm", "atrtcqyfjvifbmo", "tehqyoytrcoufkq", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateMockTests.java deleted file mode 100644 index be53f387fa8b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -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 reactor.core.publisher.Mono; - -public final class RegistryComponentContainersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"cuuuexsmnteevfg\",\"nextVersion\":\"fezraqs\",\"description\":\"kodkgxq\",\"tags\":{\"glwdzfss\":\"rxgmzz\"},\"properties\":{\"ddkkraj\":\"gaok\"}},\"id\":\"uklx\",\"name\":\"el\",\"type\":\"zpyqbwhuecx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComponentContainer response = manager.registryComponentContainers() - .createOrUpdate("fxnwcgzuoxixtxxx", "jsehbknnrnk", "jfawpcbsogz", new ComponentContainerInner() - .withProperties(new ComponentContainerProperties().withDescription("tvbmyzuqfdqdktr") - .withTags(mapOf("mxlffqgdodnkq", "qszhhqngjndkv")) - .withProperties(mapOf("dazmdzesimeft", "gkmj", "xiefcorzbidaeb", "drfzjlflzagvdava", "e", "zni")) - .withIsArchived(true)), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kodkgxq", response.properties().description()); - Assertions.assertEquals("rxgmzz", response.properties().tags().get("glwdzfss")); - Assertions.assertEquals("gaok", response.properties().properties().get("ddkkraj")); - Assertions.assertEquals(true, response.properties().isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteMockTests.java deleted file mode 100644 index 53430a11e763..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryComponentContainersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryComponentContainers() - .delete("ahktxvcbicfecth", "tbkjw", "ztpxj", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetWithResponseMockTests.java deleted file mode 100644 index fc749e8aa256..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryComponentContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"kgbtqq\",\"nextVersion\":\"bsynne\",\"description\":\"onjqhdheosx\",\"tags\":{\"tcwgpdbbgla\":\"udmpfhwypphtjt\",\"ds\":\"cctokfspvj\",\"ftyptwjwiyyeo\":\"kvrmp\"},\"properties\":{\"fzzi\":\"cmdjmvphwfnugsl\"}},\"id\":\"bgomvue\",\"name\":\"r\",\"type\":\"m\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComponentContainer response = manager.registryComponentContainers() - .getWithResponse("twk", "jdpayx", "pqiwuzr", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("onjqhdheosx", response.properties().description()); - Assertions.assertEquals("udmpfhwypphtjt", response.properties().tags().get("tcwgpdbbgla")); - Assertions.assertEquals("cmdjmvphwfnugsl", response.properties().properties().get("fzzi")); - Assertions.assertEquals(false, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListMockTests.java deleted file mode 100644 index 870a40bde9c6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryComponentContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"uljgxotu\",\"nextVersion\":\"mkiyaosthulzug\",\"description\":\"gspxldlnoc\",\"tags\":{\"wm\":\"gimizlukj\",\"mspppoeszthjt\":\"ksr\"},\"properties\":{\"gzzuqi\":\"skdiy\",\"gvmxwbohxd\":\"psybqo\",\"brhgnaka\":\"koe\",\"umqeu\":\"wscmneev\"}},\"id\":\"yyh\",\"name\":\"gqaeiv\",\"type\":\"qutxrbgbzgfhzd\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.registryComponentContainers() - .list("gdpftfcb", "tsrdplqdyzaci", "sfzrguzliyvsbfsi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("gspxldlnoc", response.iterator().next().properties().description()); - Assertions.assertEquals("gimizlukj", response.iterator().next().properties().tags().get("wm")); - Assertions.assertEquals("skdiy", response.iterator().next().properties().properties().get("gzzuqi")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateMockTests.java deleted file mode 100644 index c6706592a161..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -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 reactor.core.publisher.Mono; - -public final class RegistryComponentVersionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"componentSpec\":\"dataurmrfyyqj\",\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"ddcuqddldaoyvf\",\"tags\":{\"joj\":\"ew\",\"zzw\":\"sxjht\",\"trgu\":\"ocygoyineuaxpmez\",\"oyxfoafzdypzlx\":\"lw\"},\"properties\":{\"qxa\":\"dhgwhlbpjuaj\",\"yy\":\"mitnwlyhbujysvd\",\"tjtnnrjewih\":\"dbhatmabtpgn\"}},\"id\":\"gaahmdfsp\",\"name\":\"dnxq\",\"type\":\"z\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComponentVersion response = manager.registryComponentVersions() - .createOrUpdate("oqatdjka", "dp", "e", "smxfzynfemqy", - new ComponentVersionInner().withProperties(new ComponentVersionProperties().withDescription("nl") - .withTags(mapOf("jwdzpvirzyudrqu", "dsqx", "n", "rxhxmlfouqpskv", "h", "bpmr")) - .withProperties(mapOf("acz", "cq", "tt", "vwae", "qlyyslg", "jqyfy")) - .withIsArchived(false) - .withIsAnonymous(true) - .withComponentSpec("datakpgwgssd")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ddcuqddldaoyvf", response.properties().description()); - Assertions.assertEquals("ew", response.properties().tags().get("joj")); - Assertions.assertEquals("dhgwhlbpjuaj", response.properties().properties().get("qxa")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteMockTests.java deleted file mode 100644 index 7e1f5043ec34..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryComponentVersionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryComponentVersions().delete("wxqd", "oqzh", "wdjox", "kbd", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetWithResponseMockTests.java deleted file mode 100644 index 61bc43ec2de4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryComponentVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"componentSpec\":\"datafzqyugtkxnc\",\"provisioningState\":\"Creating\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"cmwbejywwwvn\",\"tags\":{\"dfyziruqvgnjxi\":\"krmqevrhhafqf\",\"gikyluyu\":\"kgyjmzbm\",\"c\":\"mbrdcvoloxtv\"},\"properties\":{\"okkyankxvcptf\":\"yhmmglvnbenkps\",\"gazhlrdxpc\":\"fbhnkxasomaf\"}},\"id\":\"utfz\",\"name\":\"trcdzytrtffvpkd\",\"type\":\"cyuwenbqvpraw\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComponentVersion response = manager.registryComponentVersions() - .getWithResponse("sobvcnsb", "oeznl", "hn", "z", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("cmwbejywwwvn", response.properties().description()); - Assertions.assertEquals("krmqevrhhafqf", response.properties().tags().get("dfyziruqvgnjxi")); - Assertions.assertEquals("yhmmglvnbenkps", response.properties().properties().get("okkyankxvcptf")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListMockTests.java deleted file mode 100644 index 96c4d78ccf7f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryComponentVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"componentSpec\":\"datakz\",\"provisioningState\":\"Deleting\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"plslfc\",\"tags\":{\"lkyqfnjo\":\"ksuowt\",\"nrtc\":\"rhnxzmfvmw\"},\"properties\":{\"vwnbu\":\"wwhyxfshmbyd\",\"mpshaezcldkckrn\":\"sodtevzshqyke\"}},\"id\":\"qdmhcejstfs\",\"name\":\"a\",\"type\":\"jakgk\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.registryComponentVersions() - .list("gsingmhpavsfg", "rvqrwwbdrwroqk", "jnzpqhqqsa", "kyu", 2097989242, "ameaasjqen", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("plslfc", response.iterator().next().properties().description()); - Assertions.assertEquals("ksuowt", response.iterator().next().properties().tags().get("lkyqfnjo")); - Assertions.assertEquals("wwhyxfshmbyd", response.iterator().next().properties().properties().get("vwnbu")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateMockTests.java deleted file mode 100644 index 6deceebf956a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataType; -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 reactor.core.publisher.Mono; - -public final class RegistryDataContainersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"zfmnpbdrcibjxnn\",\"nextVersion\":\"ztnhvdtuoamqobq\",\"description\":\"spshtis\",\"tags\":{\"wckzeb\":\"eoctrzjwn\"},\"properties\":{\"qzlmln\":\"wdxgyypm\",\"ilyeshox\":\"rcatkuhskegdkvv\",\"jdmu\":\"z\",\"xzgzum\":\"busxyugozwp\"}},\"id\":\"tiixkkbygbgi\",\"name\":\"kwyshybbn\",\"type\":\"ttyizonzsurqcoja\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataContainer response = manager.registryDataContainers() - .createOrUpdate("uijtickzo", "guzprpxhhboigzxk", "pqlrzhtocjzfppex", - new DataContainerInner().withProperties(new DataContainerProperties().withDescription("joypplodaqrbk") - .withTags(mapOf("valcrqaxlmbrtvtg", "ffsobg")) - .withProperties( - mapOf("oysxaqq", "lplgtlayyxhxj", "njc", "hdfhfaob", "qwssyd", "bozvc", "ywo", "wrybi")) - .withIsArchived(true) - .withDataType(DataType.URI_FILE)), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("spshtis", response.properties().description()); - Assertions.assertEquals("eoctrzjwn", response.properties().tags().get("wckzeb")); - Assertions.assertEquals("wdxgyypm", response.properties().properties().get("qzlmln")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, response.properties().dataType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteMockTests.java deleted file mode 100644 index 5cf9319d1588..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryDataContainersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryDataContainers().delete("xhwis", "so", "db", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetWithResponseMockTests.java deleted file mode 100644 index 08126f6d05c1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryDataContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"ywab\",\"nextVersion\":\"tnipaptgv\",\"description\":\"qyjukkajn\",\"tags\":{\"femiwfhhawbabhz\":\"ltonop\",\"qnxyd\":\"fcdi\",\"zsuspaywvslq\":\"zfoi\"},\"properties\":{\"kxfmu\":\"nzea\",\"v\":\"dbvytq\",\"axgbiwpgop\":\"uymkdeuqxlvzpfd\"}},\"id\":\"ktthbmrrmtrx\",\"name\":\"jmpdvrjzwaw\",\"type\":\"ewajccsdjuz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataContainer response = manager.registryDataContainers() - .getWithResponse("wjsba", "xaxtuxirppbiichl", "gkvuixwonkr", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("qyjukkajn", response.properties().description()); - Assertions.assertEquals("ltonop", response.properties().tags().get("femiwfhhawbabhz")); - Assertions.assertEquals("nzea", response.properties().properties().get("kxfmu")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, response.properties().dataType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListMockTests.java deleted file mode 100644 index 8e068fb69d93..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataType; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryDataContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"dataType\":\"mltable\",\"isArchived\":false,\"latestVersion\":\"ghaknklt\",\"nextVersion\":\"wppvihbmwrv\",\"description\":\"drohu\",\"tags\":{\"nygtixkgyob\":\"kabhvxjuaivxzni\",\"xzpqditudcltf\":\"kphvdlo\",\"kehldopjsxvbbwsg\":\"ieileemw\",\"d\":\"kkmibnmdp\"},\"properties\":{\"qa\":\"tgzwmzhcmrl\",\"nmbj\":\"styzavkyjjlu\",\"optythctoxo\":\"bngzldvvd\"}},\"id\":\"mqnerwh\",\"name\":\"mvidsssfzsgzgusp\",\"type\":\"jomeq\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.registryDataContainers() - .list("tertnzrrwsc", "clhdwienvtol", "jy", ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("drohu", response.iterator().next().properties().description()); - Assertions.assertEquals("kabhvxjuaivxzni", response.iterator().next().properties().tags().get("nygtixkgyob")); - Assertions.assertEquals("tgzwmzhcmrl", response.iterator().next().properties().properties().get("qa")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(DataType.MLTABLE, response.iterator().next().properties().dataType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateMockTests.java deleted file mode 100644 index 0449f6fcf9f5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -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 reactor.core.publisher.Mono; - -public final class RegistryDataVersionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"ymxsfqeaxdqelu\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"viawg\",\"tags\":{\"zfz\":\"uhv\"},\"properties\":{\"djieask\":\"pbcbkcpym\",\"noskkhbmj\":\"kqclnfusr\",\"yeikbv\":\"hlyyuah\"}},\"id\":\"rurgbqaucpck\",\"name\":\"jnohafwm\",\"type\":\"pgjl\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataVersionBase response = manager.registryDataVersions() - .createOrUpdate("ppwxnikfz", "xxfnduv", "zjnnuwwv", "zrfxajtbcqj", - new DataVersionBaseInner().withProperties(new DataVersionBaseProperties().withDescription("wyzrieitqml") - .withTags(mapOf("kmpebfhlgeehb", "tbdzqaj", "buafmoubukqmier", "jgplnlxrfeszu")) - .withProperties(mapOf("zytapgzdhzb", "obvveq")) - .withIsArchived(true) - .withIsAnonymous(false) - .withDataUri("bkj")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("viawg", response.properties().description()); - Assertions.assertEquals("uhv", response.properties().tags().get("zfz")); - Assertions.assertEquals("pbcbkcpym", response.properties().properties().get("djieask")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("ymxsfqeaxdqelu", response.properties().dataUri()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteMockTests.java deleted file mode 100644 index 6f4d222b065d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryDataVersionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryDataVersions() - .delete("vclfjyclvi", "dlff", "leirmtxfqpfildcg", "fouzfbpg", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetWithResponseMockTests.java deleted file mode 100644 index fc248a2a444f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryDataVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"akzbyqha\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"x\",\"tags\":{\"gsbpgmncrvtp\":\"olusyruxrzhhlhrv\",\"a\":\"foromppz\",\"plfcmpua\":\"qmeu\",\"iccu\":\"ugoceqtlyspjym\"},\"properties\":{\"nla\":\"f\",\"iwtwfgoc\":\"gixhqjqhgqwbb\",\"zugabkyy\":\"alvemn\",\"bftswcd\":\"syweohlmtsnvon\"}},\"id\":\"nseptvdtic\",\"name\":\"af\",\"type\":\"gzwkopxdkbtwoqh\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataVersionBase response = manager.registryDataVersions() - .getWithResponse("ryvidbzdylb", "jatgngwn", "jftecgprzsqmp", "q", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("x", response.properties().description()); - Assertions.assertEquals("olusyruxrzhhlhrv", response.properties().tags().get("gsbpgmncrvtp")); - Assertions.assertEquals("f", response.properties().properties().get("nla")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals("akzbyqha", response.properties().dataUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListMockTests.java deleted file mode 100644 index be9c4ed38eee..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryDataVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"czzunfnbphceeiv\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"pghcnuqhqpvt\",\"tags\":{\"ga\":\"fscl\",\"zjuzvw\":\"ygntbfytnhdnihu\"},\"properties\":{\"biwny\":\"dto\",\"objzr\":\"zdpxctsucrxdte\",\"ltyl\":\"wtidcnzalgmpupj\",\"p\":\"uudvbgvzlzjsb\"}},\"id\":\"tzaziydpoknseaim\",\"name\":\"dqraokdarluobbva\",\"type\":\"qwzknyujxy\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.registryDataVersions() - .list("fzhzzcarciuo", "yipdthjfvnh", "sgnspu", "felfchnuf", 336300860, "jgbfbba", "h", ListViewType.ALL, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pghcnuqhqpvt", response.iterator().next().properties().description()); - Assertions.assertEquals("fscl", response.iterator().next().properties().tags().get("ga")); - Assertions.assertEquals("dto", response.iterator().next().properties().properties().get("biwny")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("czzunfnbphceeiv", response.iterator().next().properties().dataUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateMockTests.java deleted file mode 100644 index 75a1e7a64e15..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -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 reactor.core.publisher.Mono; - -public final class RegistryEnvironmentContainersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"nsjxwfogb\",\"nextVersion\":\"ylyumb\",\"description\":\"prlnuom\",\"tags\":{\"byoull\":\"dkhmemxkahapes\",\"wba\":\"fzmnxrmxxj\",\"xfmdjsiommd\":\"jgzkmwfwzlm\"},\"properties\":{\"ttowqx\":\"xulxrcbdnpfcgh\",\"oovhatiywtcvzu\":\"cpbzxpz\",\"i\":\"pkfeomotquqlqe\"}},\"id\":\"qpzksdpfvls\",\"name\":\"mmetwtla\",\"type\":\"nkjtefbd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentContainer response = manager.registryEnvironmentContainers() - .createOrUpdate("xjkc", "eenubr", "kjfkxnwtzs", - new EnvironmentContainerInner().withProperties(new EnvironmentContainerProperties() - .withDescription("hdikatzmtuvf") - .withTags(mapOf("ibxl", "tjk", "u", "zlvkcm", "aoboiahk", "aunlodincf", "ksaxyeedvpmodkt", "psvax")) - .withProperties( - mapOf("vuztnsvmsh", "ydvvgkmorbpcjesf", "gf", "kg", "hlclpkr", "hrme", "bmjjv", "r")) - .withIsArchived(false)), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("prlnuom", response.properties().description()); - Assertions.assertEquals("dkhmemxkahapes", response.properties().tags().get("byoull")); - Assertions.assertEquals("xulxrcbdnpfcgh", response.properties().properties().get("ttowqx")); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteMockTests.java deleted file mode 100644 index f1f3140bf4dd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryEnvironmentContainersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryEnvironmentContainers() - .delete("cjqzrevfwcba", "apndm", "qvmkmzvag", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetWithResponseMockTests.java deleted file mode 100644 index 142cdb342bbf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryEnvironmentContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":true,\"latestVersion\":\"yx\",\"nextVersion\":\"xcgqbmxbp\",\"description\":\"nxskehojvma\",\"tags\":{\"pdncokq\":\"lfpiuuf\",\"mjlyhbjf\":\"givbhmn\"},\"properties\":{\"gcaygumqeobrwre\":\"ibgwcduy\",\"s\":\"dgsawhami\"}},\"id\":\"mfkia\",\"name\":\"g\",\"type\":\"k\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentContainer response = manager.registryEnvironmentContainers() - .getWithResponse("xfblsxyfq", "todgkllefmizdcsr", "b", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("nxskehojvma", response.properties().description()); - Assertions.assertEquals("lfpiuuf", response.properties().tags().get("pdncokq")); - Assertions.assertEquals("ibgwcduy", response.properties().properties().get("gcaygumqeobrwre")); - Assertions.assertEquals(true, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListMockTests.java deleted file mode 100644 index d946d0717df4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryEnvironmentContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"tt\",\"nextVersion\":\"pbilnszyjbuw\",\"description\":\"usydscizvkayiox\",\"tags\":{\"l\":\"qs\"},\"properties\":{\"ym\":\"feombodvdgfuakqs\",\"vzceuy\":\"f\"}},\"id\":\"ktck\",\"name\":\"nbpkfnxrlncmlzvv\",\"type\":\"mesfhqs\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.registryEnvironmentContainers() - .list("ovriqtuzwbkqcgz", "gtdjhtbarptxurs", "oyyumhzps", ListViewType.ACTIVE_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("usydscizvkayiox", response.iterator().next().properties().description()); - Assertions.assertEquals("qs", response.iterator().next().properties().tags().get("l")); - Assertions.assertEquals("feombodvdgfuakqs", response.iterator().next().properties().properties().get("ym")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateMockTests.java deleted file mode 100644 index 2c5106aa2b4f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import com.azure.resourcemanager.machinelearning.models.Route; -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 reactor.core.publisher.Mono; - -public final class RegistryEnvironmentVersionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"environmentType\":\"Curated\",\"image\":\"ovelvsp\",\"condaFile\":\"xjtezujtoudo\",\"build\":{\"contextUri\":\"x\",\"dockerfilePath\":\"vssrj\"},\"osType\":\"Windows\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"wemt\",\"port\":1587028677},\"readinessRoute\":{\"path\":\"ebymmcgskscbsx\",\"port\":297174289},\"scoringRoute\":{\"path\":\"xicjojxolknsh\",\"port\":307738924}},\"autoRebuild\":\"OnBaseImageUpdate\",\"provisioningState\":\"Succeeded\",\"stage\":\"hmbglmnlbn\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"zzc\",\"tags\":{\"kahophqwojdz\":\"ortdzzvhbu\",\"srbfbs\":\"cqt\"},\"properties\":{\"h\":\"cdzfbvexrv\",\"vrsksdzmhwt\":\"mfsnqpvjtshl\"}},\"id\":\"ppwfbw\",\"name\":\"etxizrfwxhflgdun\",\"type\":\"aypxsazbxs\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentVersion response = manager.registryEnvironmentVersions() - .createOrUpdate("bjlpfwuq", "rpdgitenyuksli", "mpnxg", "amrplanch", - new EnvironmentVersionInner().withProperties(new EnvironmentVersionProperties().withDescription("a") - .withTags(mapOf("ltckiwxggfagi", "jt", "ah", "xmdboefnhx", "so", "qeinv", "ypcjxhyzzlocjhzp", - "mokrqdbsgkqyjko")) - .withProperties(mapOf("bofprsmivapesb", "rbmc")) - .withIsArchived(false) - .withIsAnonymous(false) - .withImage("mxlmxejwyvjzb") - .withCondaFile("vtuekbb") - .withBuild(new BuildContext().withContextUri("qsm").withDockerfilePath("beqieiuxhjuw")) - .withOsType(OperatingSystemType.LINUX) - .withInferenceConfig(new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("jjhrgkjjpc").withPort(752508930)) - .withReadinessRoute(new Route().withPath("lzyxvtajfjatoid").withPort(1842998823)) - .withScoringRoute(new Route().withPath("urdgc").withPort(1626550750))) - .withAutoRebuild(AutoRebuildSetting.DISABLED) - .withStage("engnpuelrnanbrpk")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zzc", response.properties().description()); - Assertions.assertEquals("ortdzzvhbu", response.properties().tags().get("kahophqwojdz")); - Assertions.assertEquals("cdzfbvexrv", response.properties().properties().get("h")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("ovelvsp", response.properties().image()); - Assertions.assertEquals("xjtezujtoudo", response.properties().condaFile()); - Assertions.assertEquals("x", response.properties().build().contextUri()); - Assertions.assertEquals("vssrj", response.properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, response.properties().osType()); - Assertions.assertEquals("wemt", response.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1587028677, response.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("ebymmcgskscbsx", response.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(297174289, response.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("xicjojxolknsh", response.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(307738924, response.properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, response.properties().autoRebuild()); - Assertions.assertEquals("hmbglmnlbn", response.properties().stage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteMockTests.java deleted file mode 100644 index b607dd272a68..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryEnvironmentVersionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryEnvironmentVersions() - .delete("spjvsyydjlhd", "kcsqvyeegxhulo", "wumfjd", "meqvnxpf", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetWithResponseMockTests.java deleted file mode 100644 index c06970c13e99..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryEnvironmentVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"environmentType\":\"Curated\",\"image\":\"jlwwef\",\"condaFile\":\"twllqypmjc\",\"build\":{\"contextUri\":\"vfwgkz\",\"dockerfilePath\":\"kshxjkckwb\"},\"osType\":\"Windows\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"mmkwahrooy\",\"port\":677197142},\"readinessRoute\":{\"path\":\"bnvy\",\"port\":658844384},\"scoringRoute\":{\"path\":\"a\",\"port\":1415322253}},\"autoRebuild\":\"OnBaseImageUpdate\",\"provisioningState\":\"Updating\",\"stage\":\"xtigukfkbsyc\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"peenlqtqyvlfbsav\",\"tags\":{\"phtoshqtuarjwgu\":\"fjdsq\"},\"properties\":{\"q\":\"nxaeyp\",\"bwscjwyye\":\"izfyasydd\"}},\"id\":\"iflrvfeowctshw\",\"name\":\"rhhasabvauz\",\"type\":\"wwumkbpgcilbwtp\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentVersion response = manager.registryEnvironmentVersions() - .getWithResponse("xdjspnonxe", "hq", "zhn", "twvgc", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("peenlqtqyvlfbsav", response.properties().description()); - Assertions.assertEquals("fjdsq", response.properties().tags().get("phtoshqtuarjwgu")); - Assertions.assertEquals("nxaeyp", response.properties().properties().get("q")); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals("jlwwef", response.properties().image()); - Assertions.assertEquals("twllqypmjc", response.properties().condaFile()); - Assertions.assertEquals("vfwgkz", response.properties().build().contextUri()); - Assertions.assertEquals("kshxjkckwb", response.properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, response.properties().osType()); - Assertions.assertEquals("mmkwahrooy", response.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(677197142, response.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("bnvy", response.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(658844384, response.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("a", response.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(1415322253, response.properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, response.properties().autoRebuild()); - Assertions.assertEquals("xtigukfkbsyc", response.properties().stage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListMockTests.java deleted file mode 100644 index b8e699e02ea9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryEnvironmentVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"environmentType\":\"Curated\",\"image\":\"zebc\",\"condaFile\":\"luedcmkryhh\",\"build\":{\"contextUri\":\"xzh\",\"dockerfilePath\":\"lxwknooxdjklfsdn\"},\"osType\":\"Linux\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"mmddslwnlg\",\"port\":1497973223},\"readinessRoute\":{\"path\":\"hmk\",\"port\":775061052},\"scoringRoute\":{\"path\":\"bnnnlpqdnns\",\"port\":2111031568}},\"autoRebuild\":\"Disabled\",\"provisioningState\":\"Creating\",\"stage\":\"slwknrdvvmb\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"zywx\",\"tags\":{\"etnnefputlkszux\":\"qxtkd\"},\"properties\":{\"wasfw\":\"zs\"}},\"id\":\"zybmfqdnppfcf\",\"name\":\"uamrvamuvkgd\",\"type\":\"pjbblukgctv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.registryEnvironmentVersions() - .list("nuvhgcgrllyyfsm", "cbx", "rchmetvzhuugd", "kgdskwvb", 577736960, "awwayqtsrny", - ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zywx", response.iterator().next().properties().description()); - Assertions.assertEquals("qxtkd", response.iterator().next().properties().tags().get("etnnefputlkszux")); - Assertions.assertEquals("zs", response.iterator().next().properties().properties().get("wasfw")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("zebc", response.iterator().next().properties().image()); - Assertions.assertEquals("luedcmkryhh", response.iterator().next().properties().condaFile()); - Assertions.assertEquals("xzh", response.iterator().next().properties().build().contextUri()); - Assertions.assertEquals("lxwknooxdjklfsdn", response.iterator().next().properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.LINUX, response.iterator().next().properties().osType()); - Assertions.assertEquals("mmddslwnlg", - response.iterator().next().properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1497973223, - response.iterator().next().properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("hmk", - response.iterator().next().properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(775061052, - response.iterator().next().properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("bnnnlpqdnns", - response.iterator().next().properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(2111031568, - response.iterator().next().properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.DISABLED, response.iterator().next().properties().autoRebuild()); - Assertions.assertEquals("slwknrdvvmb", response.iterator().next().properties().stage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryInnerTests.java deleted file mode 100644 index 1b73638cff57..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryInnerTests.java +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; -import com.azure.resourcemanager.machinelearning.models.AcrDetails; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RegistryInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryInner model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"2e21de19-ed91-4869-9c73-7565782ea7b9\",\"tenantId\":\"6af9fc2c-506b-4cbe-8e65-6b28bf960d2b\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"mhk\":{\"principalId\":\"206b86e3-cc8b-4130-9b9a-9d2ab40780d1\",\"clientId\":\"1680cf3f-58ba-449f-b8e2-71f038c17e3e\"},\"sdsu\":{\"principalId\":\"3b5ce0d2-eb15-439d-9cf3-3c1e4543e219\",\"clientId\":\"aa584360-fd95-4661-8ac6-11c9a843aa09\"}}},\"kind\":\"eqdgcruxsp\",\"properties\":{\"discoveryUrl\":\"ymmqgwokmikp\",\"intellectualPropertyPublisher\":\"fbmjxuvji\",\"managedResourceGroup\":{\"resourceId\":\"vhax\"},\"mlFlowRegistryUri\":\"w\",\"registryPrivateEndpointConnections\":[{\"id\":\"pphthdklmvetatla\",\"location\":\"q\",\"properties\":{\"groupIds\":[\"giksbbvto\",\"xrpo\",\"wp\"],\"privateEndpoint\":{\"subnetArmId\":\"gjtnhtukfacihm\",\"id\":\"ntumeezbxvq\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"uvwc\",\"description\":\"sgomtmjz\",\"status\":\"Disconnected\"},\"provisioningState\":\"govsxpwwzt\"}},{\"id\":\"mkkhtgfredml\",\"location\":\"grllcc\",\"properties\":{\"groupIds\":[\"jowazhpab\",\"comlyotgkwsx\",\"srqorcgenmvceb\"],\"privateEndpoint\":{\"subnetArmId\":\"tqujxcxxqndcqjk\",\"id\":\"wqurc\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"mrvvxwj\",\"description\":\"gzseh\",\"status\":\"Disconnected\"},\"provisioningState\":\"ilcchskxxkansbvr\"}},{\"id\":\"qgvtojrulfu\",\"location\":\"ejrthcfjzhxlyub\",\"properties\":{\"groupIds\":[\"stvrjeqmt\",\"zbeqrztrxa\",\"xrd\",\"absr\"],\"privateEndpoint\":{\"subnetArmId\":\"nrhpqatiwkk\",\"id\":\"anxkvvcsemsvuv\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"qxetqmmlivrjjx\",\"description\":\"xdchp\",\"status\":\"Disconnected\"},\"provisioningState\":\"ehzl\"}},{\"id\":\"gfquwz\",\"location\":\"iibelwcerw\",\"properties\":{\"groupIds\":[\"jxljtxbusq\",\"bxxn\"],\"privateEndpoint\":{\"subnetArmId\":\"sdzhgbdgzpagsec\",\"id\":\"db\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"r\",\"description\":\"fllmqiy\",\"status\":\"Disconnected\"},\"provisioningState\":\"ellnkkii\"}}],\"publicNetworkAccess\":\"mtum\",\"regionDetails\":[{\"acrDetails\":[{\"systemCreatedAcrAccount\":{},\"userCreatedAcrAccount\":{}}],\"location\":\"axroqvqpilrgunc\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}},{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}},{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}}]},{\"acrDetails\":[{\"systemCreatedAcrAccount\":{},\"userCreatedAcrAccount\":{}},{\"systemCreatedAcrAccount\":{},\"userCreatedAcrAccount\":{}}],\"location\":\"klxymxkqvfqepdxc\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}},{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}},{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}}]}]},\"sku\":{\"name\":\"bowcpjqduqgi\",\"tier\":\"Standard\",\"size\":\"ydfbwlj\",\"family\":\"huerkjddvrglie\",\"capacity\":53261195},\"location\":\"vbiiftksdwgdnk\",\"tags\":{\"zoutb\":\"mwdhcebuvczldbg\",\"orbjg\":\"aqgzekajclyzgs\"},\"id\":\"nzjotvmr\",\"name\":\"khlobvvjbhvhdi\",\"type\":\"ayfluiyuosnu\"}") - .toObject(RegistryInner.class); - Assertions.assertEquals("vbiiftksdwgdnk", model.location()); - Assertions.assertEquals("mwdhcebuvczldbg", model.tags().get("zoutb")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("eqdgcruxsp", model.kind()); - Assertions.assertEquals("bowcpjqduqgi", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("ydfbwlj", model.sku().size()); - Assertions.assertEquals("huerkjddvrglie", model.sku().family()); - Assertions.assertEquals(53261195, model.sku().capacity()); - Assertions.assertEquals("ymmqgwokmikp", model.discoveryUrl()); - Assertions.assertEquals("fbmjxuvji", model.intellectualPropertyPublisher()); - Assertions.assertEquals("vhax", model.managedResourceGroup().resourceId()); - Assertions.assertEquals("w", model.mlFlowRegistryUri()); - Assertions.assertEquals("pphthdklmvetatla", model.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("q", model.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("giksbbvto", model.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("gjtnhtukfacihm", - model.registryPrivateEndpointConnections().get(0).privateEndpoint().subnetArmId()); - Assertions.assertEquals("uvwc", - model.registryPrivateEndpointConnections() - .get(0) - .registryPrivateLinkServiceConnectionState() - .actionsRequired()); - Assertions.assertEquals("sgomtmjz", - model.registryPrivateEndpointConnections() - .get(0) - .registryPrivateLinkServiceConnectionState() - .description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.DISCONNECTED, - model.registryPrivateEndpointConnections().get(0).registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("govsxpwwzt", model.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("mtum", model.publicNetworkAccess()); - Assertions.assertEquals("axroqvqpilrgunc", model.regionDetails().get(0).location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryInner model = new RegistryInner().withLocation("vbiiftksdwgdnk") - .withTags(mapOf("zoutb", "mwdhcebuvczldbg", "orbjg", "aqgzekajclyzgs")) - .withIdentity( - new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("mhk", new UserAssignedIdentity(), "sdsu", new UserAssignedIdentity()))) - .withKind("eqdgcruxsp") - .withSku(new Sku().withName("bowcpjqduqgi") - .withTier(SkuTier.STANDARD) - .withSize("ydfbwlj") - .withFamily("huerkjddvrglie") - .withCapacity(53261195)) - .withDiscoveryUrl("ymmqgwokmikp") - .withIntellectualPropertyPublisher("fbmjxuvji") - .withManagedResourceGroup(new ArmResourceId().withResourceId("vhax")) - .withMlFlowRegistryUri("w") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("pphthdklmvetatla") - .withLocation("q") - .withGroupIds(Arrays.asList("giksbbvto", "xrpo", "wp")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("gjtnhtukfacihm")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("uvwc") - .withDescription("sgomtmjz") - .withStatus(EndpointServiceConnectionStatus.DISCONNECTED)) - .withProvisioningState("govsxpwwzt"), - new RegistryPrivateEndpointConnection().withId("mkkhtgfredml") - .withLocation("grllcc") - .withGroupIds(Arrays.asList("jowazhpab", "comlyotgkwsx", "srqorcgenmvceb")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("tqujxcxxqndcqjk")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("mrvvxwj") - .withDescription("gzseh") - .withStatus(EndpointServiceConnectionStatus.DISCONNECTED)) - .withProvisioningState("ilcchskxxkansbvr"), - new RegistryPrivateEndpointConnection().withId("qgvtojrulfu") - .withLocation("ejrthcfjzhxlyub") - .withGroupIds(Arrays.asList("stvrjeqmt", "zbeqrztrxa", "xrd", "absr")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("nrhpqatiwkk")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("qxetqmmlivrjjx") - .withDescription("xdchp") - .withStatus(EndpointServiceConnectionStatus.DISCONNECTED)) - .withProvisioningState("ehzl"), - new RegistryPrivateEndpointConnection().withId("gfquwz") - .withLocation("iibelwcerw") - .withGroupIds(Arrays.asList("jxljtxbusq", "bxxn")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("sdzhgbdgzpagsec")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("r") - .withDescription("fllmqiy") - .withStatus(EndpointServiceConnectionStatus.DISCONNECTED)) - .withProvisioningState("ellnkkii"))) - .withPublicNetworkAccess("mtum") - .withRegionDetails(Arrays.asList( - new RegistryRegionArmDetails() - .withAcrDetails( - Arrays.asList(new AcrDetails().withSystemCreatedAcrAccount(new SystemCreatedAcrAccount()) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount()))) - .withLocation("axroqvqpilrgunc") - .withStorageAccountDetails(Arrays.asList( - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()), - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()), - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()))), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList( - new AcrDetails().withSystemCreatedAcrAccount(new SystemCreatedAcrAccount()) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount()), - new AcrDetails().withSystemCreatedAcrAccount(new SystemCreatedAcrAccount()) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount()))) - .withLocation("klxymxkqvfqepdxc") - .withStorageAccountDetails(Arrays.asList( - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()), - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()), - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()))))); - model = BinaryData.fromObject(model).toObject(RegistryInner.class); - Assertions.assertEquals("vbiiftksdwgdnk", model.location()); - Assertions.assertEquals("mwdhcebuvczldbg", model.tags().get("zoutb")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("eqdgcruxsp", model.kind()); - Assertions.assertEquals("bowcpjqduqgi", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("ydfbwlj", model.sku().size()); - Assertions.assertEquals("huerkjddvrglie", model.sku().family()); - Assertions.assertEquals(53261195, model.sku().capacity()); - Assertions.assertEquals("ymmqgwokmikp", model.discoveryUrl()); - Assertions.assertEquals("fbmjxuvji", model.intellectualPropertyPublisher()); - Assertions.assertEquals("vhax", model.managedResourceGroup().resourceId()); - Assertions.assertEquals("w", model.mlFlowRegistryUri()); - Assertions.assertEquals("pphthdklmvetatla", model.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("q", model.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("giksbbvto", model.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("gjtnhtukfacihm", - model.registryPrivateEndpointConnections().get(0).privateEndpoint().subnetArmId()); - Assertions.assertEquals("uvwc", - model.registryPrivateEndpointConnections() - .get(0) - .registryPrivateLinkServiceConnectionState() - .actionsRequired()); - Assertions.assertEquals("sgomtmjz", - model.registryPrivateEndpointConnections() - .get(0) - .registryPrivateLinkServiceConnectionState() - .description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.DISCONNECTED, - model.registryPrivateEndpointConnections().get(0).registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("govsxpwwzt", model.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("mtum", model.publicNetworkAccess()); - Assertions.assertEquals("axroqvqpilrgunc", model.regionDetails().get(0).location()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateMockTests.java deleted file mode 100644 index 191ce9a3b89d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -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 reactor.core.publisher.Mono; - -public final class RegistryModelContainersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"skmpeajzzypa\",\"nextVersion\":\"mzmzfntteyrftxyt\",\"description\":\"ypjdrjli\",\"tags\":{\"vjqxav\":\"vbfaehjji\",\"sscygyzhcvlavyrj\":\"mdmracfsffdralih\",\"u\":\"ndxrmyzvtiojtpd\",\"h\":\"xaxoyj\"},\"properties\":{\"teccxfn\":\"edigiv\"}},\"id\":\"ntmcaxb\",\"name\":\"pmfhjikqcnbdq\",\"type\":\"tghnmelzvrchm\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ModelContainer response = manager.registryModelContainers() - .createOrUpdate("rgmnkgtlhzkrazk", "oiyecznvzmsvzng", "eqzhehgvmm", - new ModelContainerInner().withProperties(new ModelContainerProperties().withDescription("ilzvxotno") - .withTags(mapOf("mbwcacwa", "cdvhyefqhxyts", "xra", "qakvokya")) - .withProperties(mapOf("mmd", "reqbr")) - .withIsArchived(true)), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ypjdrjli", response.properties().description()); - Assertions.assertEquals("vbfaehjji", response.properties().tags().get("vjqxav")); - Assertions.assertEquals("edigiv", response.properties().properties().get("teccxfn")); - Assertions.assertEquals(true, response.properties().isArchived()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteMockTests.java deleted file mode 100644 index d520a6af0e92..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryModelContainersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryModelContainers().delete("ujyiqywlpxm", "iytdeg", "runbkil", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetWithResponseMockTests.java deleted file mode 100644 index f48834b03daa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryModelContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"denmjogx\",\"nextVersion\":\"ggyciwbnqi\",\"description\":\"sx\",\"tags\":{\"oxqswsych\":\"rnjrdi\",\"nowvfxeytzgwjek\":\"cjggcmpncjqbgbno\",\"bdvxlfhlzzgapsp\":\"qirvcpolnvgpppdi\"},\"properties\":{\"xnroyhthesyw\":\"blscrmzquuzywkgo\",\"zcwuejmxlfzl\":\"wnvgyoscif\",\"hrau\":\"zyrgrlh\"}},\"id\":\"ovlx\",\"name\":\"tvmvzpni\",\"type\":\"wx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ModelContainer response = manager.registryModelContainers() - .getWithResponse("stekbirhyv", "yuvriemorszffi", "kltrvgioguoxc", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("sx", response.properties().description()); - Assertions.assertEquals("rnjrdi", response.properties().tags().get("oxqswsych")); - Assertions.assertEquals("blscrmzquuzywkgo", response.properties().properties().get("xnroyhthesyw")); - Assertions.assertEquals(false, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListMockTests.java deleted file mode 100644 index 818886897547..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryModelContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"rolhsfddk\",\"nextVersion\":\"vevwxmnbw\",\"description\":\"a\",\"tags\":{\"na\":\"npyhtuhalpqil\",\"zbtgtzpcat\":\"kexznpnytkqjarl\",\"ujfgtg\":\"mz\"},\"properties\":{\"naidvssv\":\"pczeg\",\"bqgzkuobclo\":\"yoggkztzttjnkn\"}},\"id\":\"aqeizp\",\"name\":\"iqlyugp\",\"type\":\"nhzjmkffeonmnv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.registryModelContainers() - .list("xyksznfstmp", "vgrandzktwo", "lpczlq", ListViewType.ALL, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("a", response.iterator().next().properties().description()); - Assertions.assertEquals("npyhtuhalpqil", response.iterator().next().properties().tags().get("na")); - Assertions.assertEquals("pczeg", response.iterator().next().properties().properties().get("naidvssv")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateMockTests.java deleted file mode 100644 index 4909c6310aad..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -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 reactor.core.publisher.Mono; - -public final class RegistryModelVersionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"flavors\":{\"rnlsyiaanistc\":{\"data\":{\"ivxcodwkwoytcach\":\"txrrgkwiyoyhq\",\"fiikqcdnzsfiu\":\"sizfuewlf\",\"o\":\"gne\",\"ufakrxjjwnbrmdwt\":\"mcrxlyzoaho\"}}},\"modelType\":\"atclpphcs\",\"modelUri\":\"rycpanapfa\",\"jobName\":\"zrinlpxngzzx\",\"provisioningState\":\"Succeeded\",\"stage\":\"nzmzct\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"ifpucv\",\"tags\":{\"e\":\"zwbsk\",\"qmbinpxmiwt\":\"fz\"},\"properties\":{\"abux\":\"fpvrdukcdnzox\",\"wshramqsugqcgl\":\"wgb\",\"xvqlauu\":\"adfzto\",\"fmcerfxfeiqba\":\"gwa\"}},\"id\":\"hzwj\",\"name\":\"pssvnonij\",\"type\":\"qcj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ModelVersion response = manager.registryModelVersions() - .createOrUpdate("susfdyw", "rqcowk", "ndgrciff", "xqqnugt", - new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("lqllbofsn") - .withTags(mapOf("hxgiknr", "yb", "feamz", "ugseiqbroq", "pksgo", "uxd")) - .withProperties(mapOf("ldrqqv", "nvnj", "xedthfwlnvqac", "ugusqlx", "blnlmpuyypaggpai", "yfi")) - .withIsArchived(true) - .withIsAnonymous(false) - .withFlavors(mapOf("ifmyzb", - new FlavorData().withData(mapOf("yjdiujticwmlfz", "g", "bktuajkufpvvd", "hibfmco", - "fyqzaisfofgvmrkm", "nmeiomnobbaibcf")), - "bpcwtwtrchkcmru", new FlavorData().withData(mapOf("cmtslptb", "nh", "cnuqfpzjz", "ponhblqi")), - "zgi", - new FlavorData() - .withData(mapOf("xipwqchfpt", "esqsqmie", "ajcur", "kkvjjl", "izchmb", "yqokbgumuejxxpx")), - "yahfoyfz", - new FlavorData().withData(mapOf("laybhozlsb", "jkngzfs", "ytrsljzmzui", "fnhbvcntpoe", - "mkqbylbbnjldicq", "sggsxznbp", "efwlenitv", "ma")))) - .withModelType("dyaepre") - .withModelUri("jukfalwceechcayv") - .withJobName("eqpucnus") - .withStage("hicrjriy")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ifpucv", response.properties().description()); - Assertions.assertEquals("zwbsk", response.properties().tags().get("e")); - Assertions.assertEquals("fpvrdukcdnzox", response.properties().properties().get("abux")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("txrrgkwiyoyhq", - response.properties().flavors().get("rnlsyiaanistc").data().get("ivxcodwkwoytcach")); - Assertions.assertEquals("atclpphcs", response.properties().modelType()); - Assertions.assertEquals("rycpanapfa", response.properties().modelUri()); - Assertions.assertEquals("zrinlpxngzzx", response.properties().jobName()); - Assertions.assertEquals("nzmzct", response.properties().stage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteMockTests.java deleted file mode 100644 index 7ad5b30b8233..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryModelVersionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryModelVersions() - .delete("uxkdiumgsivxw", "scwbshf", "hvlms", "eylaulpuexy", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetWithResponseMockTests.java deleted file mode 100644 index 8b1763598ec9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryModelVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"flavors\":{\"pmonxdwf\":{\"data\":{\"qtfkmvzr\":\"svsyltap\"}},\"subehztbejrdzwyk\":{\"data\":{\"zene\":\"bgftfvqukkm\",\"jylwqqsemjhhx\":\"pdq\"}}},\"modelType\":\"pfzwufifnj\",\"modelUri\":\"hmjkykqf\",\"jobName\":\"mcyk\",\"provisioningState\":\"Canceled\",\"stage\":\"mkbndnrihpjax\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"noignydlkrnpsb\",\"tags\":{\"pfgwdxmiaelnpbi\":\"mhkipjardv\"},\"properties\":{\"skjvaycxrwknsbg\":\"unddvjlpbjszqj\"}},\"id\":\"pbrzwi\",\"name\":\"pzcyhk\",\"type\":\"cebtpgvut\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ModelVersion response = manager.registryModelVersions() - .getWithResponse("gxzty", "c", "d", "lspgnndefyhsb", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("noignydlkrnpsb", response.properties().description()); - Assertions.assertEquals("mhkipjardv", response.properties().tags().get("pfgwdxmiaelnpbi")); - Assertions.assertEquals("unddvjlpbjszqj", response.properties().properties().get("skjvaycxrwknsbg")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("svsyltap", response.properties().flavors().get("pmonxdwf").data().get("qtfkmvzr")); - Assertions.assertEquals("pfzwufifnj", response.properties().modelType()); - Assertions.assertEquals("hmjkykqf", response.properties().modelUri()); - Assertions.assertEquals("mcyk", response.properties().jobName()); - Assertions.assertEquals("mkbndnrihpjax", response.properties().stage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListMockTests.java deleted file mode 100644 index 0a9e4a89b4f2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryModelVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"flavors\":{\"cocdxvbeqzjd\":{\"data\":{\"mv\":\"gosijiqexqwqy\",\"cnnkvthwtam\":\"gflhdhoxur\",\"gyvxhfmuhkezuucq\":\"m\"}}},\"modelType\":\"tutpdwnee\",\"modelUri\":\"ytlxugjr\",\"jobName\":\"nffaofkvfruxzkfb\",\"provisioningState\":\"Failed\",\"stage\":\"kzovstvymdqay\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"zgubqkfnoxhvo\",\"tags\":{\"xwejuguvnx\":\"gfkrqsjrvpakxrde\",\"yfenrozoijoxcbpk\":\"ohpzurnzoytkbea\",\"pan\":\"wseacbtaxd\",\"r\":\"sxwhxrztda\"},\"properties\":{\"gqysyaj\":\"k\"}},\"id\":\"czupdcbgr\",\"name\":\"f\",\"type\":\"db\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.registryModelVersions() - .list("ucgrmwyv", "d", "yplgq", "qgrbrhhv", "pgtipaaoylwh", 445590794, "kbweasgypjixdmob", "dyd", - "qeuwdvclsxdqdch", "zibixrgsrwxxqkwa", ListViewType.ARCHIVED_ONLY, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zgubqkfnoxhvo", response.iterator().next().properties().description()); - Assertions.assertEquals("gfkrqsjrvpakxrde", response.iterator().next().properties().tags().get("xwejuguvnx")); - Assertions.assertEquals("k", response.iterator().next().properties().properties().get("gqysyaj")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("gosijiqexqwqy", - response.iterator().next().properties().flavors().get("cocdxvbeqzjd").data().get("mv")); - Assertions.assertEquals("tutpdwnee", response.iterator().next().properties().modelType()); - Assertions.assertEquals("ytlxugjr", response.iterator().next().properties().modelUri()); - Assertions.assertEquals("nffaofkvfruxzkfb", response.iterator().next().properties().jobName()); - Assertions.assertEquals("kzovstvymdqay", response.iterator().next().properties().stage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPartialManagedServiceIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPartialManagedServiceIdentityTests.java deleted file mode 100644 index 3cf7a50353ed..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPartialManagedServiceIdentityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.RegistryPartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RegistryPartialManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryPartialManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"acaceebc-8dc5-46a0-a47a-b4682a356778\",\"tenantId\":\"05e04309-83a4-4a06-a3fe-43ad2d346a82\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"dynzjahwr\":{\"principalId\":\"fd0a6aeb-9da8-46f3-9fec-e6c6e47ced61\",\"clientId\":\"48715817-14d2-4ade-b6f6-ebc25ebde7a4\"}}}") - .toObject(RegistryPartialManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryPartialManagedServiceIdentity model - = new RegistryPartialManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("dynzjahwr", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(RegistryPartialManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index 24dad6237742..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.RegistryPrivateEndpointConnectionProperties; -import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegistryPrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryPrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"groupIds\":[\"dfqnhttwdowrczfj\"],\"privateEndpoint\":{\"subnetArmId\":\"uxxrkkmhmnulwemp\",\"id\":\"ifrhjulrsul\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"flu\",\"description\":\"awmhh\",\"status\":\"Approved\"},\"provisioningState\":\"friyrg\"}") - .toObject(RegistryPrivateEndpointConnectionProperties.class); - Assertions.assertEquals("dfqnhttwdowrczfj", model.groupIds().get(0)); - Assertions.assertEquals("uxxrkkmhmnulwemp", model.privateEndpoint().subnetArmId()); - Assertions.assertEquals("flu", model.registryPrivateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("awmhh", model.registryPrivateLinkServiceConnectionState().description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, - model.registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("friyrg", model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryPrivateEndpointConnectionProperties model - = new RegistryPrivateEndpointConnectionProperties().withGroupIds(Arrays.asList("dfqnhttwdowrczfj")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("uxxrkkmhmnulwemp")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("flu") - .withDescription("awmhh") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) - .withProvisioningState("friyrg"); - model = BinaryData.fromObject(model).toObject(RegistryPrivateEndpointConnectionProperties.class); - Assertions.assertEquals("dfqnhttwdowrczfj", model.groupIds().get(0)); - Assertions.assertEquals("uxxrkkmhmnulwemp", model.privateEndpoint().subnetArmId()); - Assertions.assertEquals("flu", model.registryPrivateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("awmhh", model.registryPrivateLinkServiceConnectionState().description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, - model.registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("friyrg", model.provisioningState()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionTests.java deleted file mode 100644 index 9310621b6c63..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegistryPrivateEndpointConnectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryPrivateEndpointConnection model = BinaryData.fromString( - "{\"id\":\"vvjhvvlrlohewjj\",\"location\":\"jnkdflqion\",\"properties\":{\"groupIds\":[\"qkzfz\"],\"privateEndpoint\":{\"subnetArmId\":\"oshohtotrye\",\"id\":\"khxrmexznlwkbf\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"khup\",\"description\":\"rufgjblcdrmyfcem\",\"status\":\"Rejected\"},\"provisioningState\":\"yykyalu\"}}") - .toObject(RegistryPrivateEndpointConnection.class); - Assertions.assertEquals("vvjhvvlrlohewjj", model.id()); - Assertions.assertEquals("jnkdflqion", model.location()); - Assertions.assertEquals("qkzfz", model.groupIds().get(0)); - Assertions.assertEquals("oshohtotrye", model.privateEndpoint().subnetArmId()); - Assertions.assertEquals("khup", model.registryPrivateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("rufgjblcdrmyfcem", model.registryPrivateLinkServiceConnectionState().description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.REJECTED, - model.registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("yykyalu", model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryPrivateEndpointConnection model = new RegistryPrivateEndpointConnection().withId("vvjhvvlrlohewjj") - .withLocation("jnkdflqion") - .withGroupIds(Arrays.asList("qkzfz")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("oshohtotrye")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("khup") - .withDescription("rufgjblcdrmyfcem") - .withStatus(EndpointServiceConnectionStatus.REJECTED)) - .withProvisioningState("yykyalu"); - model = BinaryData.fromObject(model).toObject(RegistryPrivateEndpointConnection.class); - Assertions.assertEquals("vvjhvvlrlohewjj", model.id()); - Assertions.assertEquals("jnkdflqion", model.location()); - Assertions.assertEquals("qkzfz", model.groupIds().get(0)); - Assertions.assertEquals("oshohtotrye", model.privateEndpoint().subnetArmId()); - Assertions.assertEquals("khup", model.registryPrivateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("rufgjblcdrmyfcem", model.registryPrivateLinkServiceConnectionState().description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.REJECTED, - model.registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("yykyalu", model.provisioningState()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateLinkServiceConnectionStateTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateLinkServiceConnectionStateTests.java deleted file mode 100644 index 954b791af0ba..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateLinkServiceConnectionStateTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class RegistryPrivateLinkServiceConnectionStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryPrivateLinkServiceConnectionState model = BinaryData - .fromString("{\"actionsRequired\":\"cqydey\",\"description\":\"skiczd\",\"status\":\"Approved\"}") - .toObject(RegistryPrivateLinkServiceConnectionState.class); - Assertions.assertEquals("cqydey", model.actionsRequired()); - Assertions.assertEquals("skiczd", model.description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryPrivateLinkServiceConnectionState model - = new RegistryPrivateLinkServiceConnectionState().withActionsRequired("cqydey") - .withDescription("skiczd") - .withStatus(EndpointServiceConnectionStatus.APPROVED); - model = BinaryData.fromObject(model).toObject(RegistryPrivateLinkServiceConnectionState.class); - Assertions.assertEquals("cqydey", model.actionsRequired()); - Assertions.assertEquals("skiczd", model.description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, model.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPropertiesTests.java deleted file mode 100644 index be91556d57c6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPropertiesTests.java +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.RegistryProperties; -import com.azure.resourcemanager.machinelearning.models.AcrDetails; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; -import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegistryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryProperties model = BinaryData.fromString( - "{\"discoveryUrl\":\"t\",\"intellectualPropertyPublisher\":\"vhyibdrqrsw\",\"managedResourceGroup\":{\"resourceId\":\"ubpyrow\"},\"mlFlowRegistryUri\":\"oxztfwfqch\",\"registryPrivateEndpointConnections\":[{\"id\":\"vjnn\",\"location\":\"agfyvrtpqpe\",\"properties\":{\"groupIds\":[\"gkrepdqhqyhw\",\"wemvxqabckmze\",\"xin\"],\"privateEndpoint\":{\"subnetArmId\":\"eoh\",\"id\":\"h\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"zjpcee\",\"description\":\"zangprbfaxyxzlbc\",\"status\":\"Approved\"},\"provisioningState\":\"sexroqrndkt\"}},{\"id\":\"vonfeeqgpkr\",\"location\":\"tbgnixxowwzkyfw\",\"properties\":{\"groupIds\":[\"wxeiicrmpepk\",\"dm\",\"xxij\"],\"privateEndpoint\":{\"subnetArmId\":\"ws\",\"id\":\"kjgyacwrasekwe\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"o\",\"description\":\"woqartwy\",\"status\":\"Approved\"},\"provisioningState\":\"l\"}},{\"id\":\"vatdavuqmcbymsf\",\"location\":\"jlquvjez\",\"properties\":{\"groupIds\":[\"v\",\"simi\",\"yoi\"],\"privateEndpoint\":{\"subnetArmId\":\"miqwnnrac\",\"id\":\"bbfqpspklady\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"hautw\",\"description\":\"exzgpmnmabedd\",\"status\":\"Disconnected\"},\"provisioningState\":\"gdfpfqfpcvst\"}}],\"publicNetworkAccess\":\"gq\",\"regionDetails\":[{\"acrDetails\":[{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"xbsmtbljje\",\"acrAccountSku\":\"ci\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"tbrekqhsqhtf\",\"acrAccountSku\":\"pqbye\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"dqigmg\",\"acrAccountSku\":\"inztxl\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}}],\"location\":\"jcmrnkfm\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"jnqtqe\",\"storageAccountType\":\"j\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":true,\"armResourceId\":{},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"dxe\",\"storageAccountType\":\"h\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{},\"storageAccountHnsEnabled\":true,\"storageAccountName\":\"k\",\"storageAccountType\":\"kqynspgbvo\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{},\"storageAccountHnsEnabled\":true,\"storageAccountName\":\"exqokmy\",\"storageAccountType\":\"jialz\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}}]},{\"acrDetails\":[{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"pbcjtrpzuyudivbx\",\"acrAccountSku\":\"sqeaeonqelwg\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"y\",\"acrAccountSku\":\"arogatmolji\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"mzvfkneerz\",\"acrAccountSku\":\"rknsjulug\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}}],\"location\":\"rxle\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"ihtd\",\"storageAccountType\":\"wjekptycaydbj\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"hmhsurlgwqkpm\",\"storageAccountType\":\"pstauol\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}}]}]}") - .toObject(RegistryProperties.class); - Assertions.assertEquals("t", model.discoveryUrl()); - Assertions.assertEquals("vhyibdrqrsw", model.intellectualPropertyPublisher()); - Assertions.assertEquals("ubpyrow", model.managedResourceGroup().resourceId()); - Assertions.assertEquals("oxztfwfqch", model.mlFlowRegistryUri()); - Assertions.assertEquals("vjnn", model.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("agfyvrtpqpe", model.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("gkrepdqhqyhw", model.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("eoh", - model.registryPrivateEndpointConnections().get(0).privateEndpoint().subnetArmId()); - Assertions.assertEquals("zjpcee", - model.registryPrivateEndpointConnections() - .get(0) - .registryPrivateLinkServiceConnectionState() - .actionsRequired()); - Assertions.assertEquals("zangprbfaxyxzlbc", - model.registryPrivateEndpointConnections() - .get(0) - .registryPrivateLinkServiceConnectionState() - .description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, - model.registryPrivateEndpointConnections().get(0).registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("sexroqrndkt", model.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("gq", model.publicNetworkAccess()); - Assertions.assertEquals("xbsmtbljje", - model.regionDetails().get(0).acrDetails().get(0).systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("ci", - model.regionDetails().get(0).acrDetails().get(0).systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("jcmrnkfm", model.regionDetails().get(0).location()); - Assertions.assertEquals(false, - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .allowBlobPublicAccess()); - Assertions.assertEquals(false, - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .storageAccountHnsEnabled()); - Assertions.assertEquals("jnqtqe", - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .storageAccountName()); - Assertions.assertEquals("j", - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .storageAccountType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryProperties model = new RegistryProperties().withDiscoveryUrl("t") - .withIntellectualPropertyPublisher("vhyibdrqrsw") - .withManagedResourceGroup(new ArmResourceId().withResourceId("ubpyrow")) - .withMlFlowRegistryUri("oxztfwfqch") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("vjnn") - .withLocation("agfyvrtpqpe") - .withGroupIds(Arrays.asList("gkrepdqhqyhw", "wemvxqabckmze", "xin")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("eoh")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("zjpcee") - .withDescription("zangprbfaxyxzlbc") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) - .withProvisioningState("sexroqrndkt"), - new RegistryPrivateEndpointConnection().withId("vonfeeqgpkr") - .withLocation("tbgnixxowwzkyfw") - .withGroupIds(Arrays.asList("wxeiicrmpepk", "dm", "xxij")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("ws")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("o") - .withDescription("woqartwy") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) - .withProvisioningState("l"), - new RegistryPrivateEndpointConnection().withId("vatdavuqmcbymsf") - .withLocation("jlquvjez") - .withGroupIds(Arrays.asList("v", "simi", "yoi")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("miqwnnrac")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("hautw") - .withDescription("exzgpmnmabedd") - .withStatus(EndpointServiceConnectionStatus.DISCONNECTED)) - .withProvisioningState("gdfpfqfpcvst"))) - .withPublicNetworkAccess("gq") - .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList( - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("xbsmtbljje") - .withAcrAccountSku("ci") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("tbrekqhsqhtf") - .withAcrAccountSku("pqbye") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("dqigmg") - .withAcrAccountSku("inztxl") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())))) - .withLocation("jcmrnkfm") - .withStorageAccountDetails( - Arrays - .asList( - new StorageAccountDetails() - .withSystemCreatedStorageAccount(new SystemCreatedStorageAccount() - .withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("jnqtqe") - .withStorageAccountType("j")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId())), - new StorageAccountDetails() - .withSystemCreatedStorageAccount( - new SystemCreatedStorageAccount() - .withAllowBlobPublicAccess(true) - .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("dxe") - .withStorageAccountType("h")) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount() - .withArmResourceId(new ArmResourceId())), - new StorageAccountDetails() - .withSystemCreatedStorageAccount( - new SystemCreatedStorageAccount() - .withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(true) - .withStorageAccountName("k") - .withStorageAccountType("kqynspgbvo")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId())), - new StorageAccountDetails() - .withSystemCreatedStorageAccount( - new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(true) - .withStorageAccountName("exqokmy") - .withStorageAccountType("jialz")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId())))), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList( - new AcrDetails() - .withSystemCreatedAcrAccount( - new SystemCreatedAcrAccount().withAcrAccountName("pbcjtrpzuyudivbx") - .withAcrAccountSku("sqeaeonqelwg") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("y") - .withAcrAccountSku("arogatmolji") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("mzvfkneerz") - .withAcrAccountSku("rknsjulug") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())))) - .withLocation("rxle") - .withStorageAccountDetails(Arrays.asList( - new StorageAccountDetails() - .withSystemCreatedStorageAccount( - new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("ihtd") - .withStorageAccountType("wjekptycaydbj")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId())), - new StorageAccountDetails() - .withSystemCreatedStorageAccount( - new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("hmhsurlgwqkpm") - .withStorageAccountType("pstauol")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId())))))); - model = BinaryData.fromObject(model).toObject(RegistryProperties.class); - Assertions.assertEquals("t", model.discoveryUrl()); - Assertions.assertEquals("vhyibdrqrsw", model.intellectualPropertyPublisher()); - Assertions.assertEquals("ubpyrow", model.managedResourceGroup().resourceId()); - Assertions.assertEquals("oxztfwfqch", model.mlFlowRegistryUri()); - Assertions.assertEquals("vjnn", model.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("agfyvrtpqpe", model.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("gkrepdqhqyhw", model.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("eoh", - model.registryPrivateEndpointConnections().get(0).privateEndpoint().subnetArmId()); - Assertions.assertEquals("zjpcee", - model.registryPrivateEndpointConnections() - .get(0) - .registryPrivateLinkServiceConnectionState() - .actionsRequired()); - Assertions.assertEquals("zangprbfaxyxzlbc", - model.registryPrivateEndpointConnections() - .get(0) - .registryPrivateLinkServiceConnectionState() - .description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, - model.registryPrivateEndpointConnections().get(0).registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("sexroqrndkt", model.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("gq", model.publicNetworkAccess()); - Assertions.assertEquals("xbsmtbljje", - model.regionDetails().get(0).acrDetails().get(0).systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("ci", - model.regionDetails().get(0).acrDetails().get(0).systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("jcmrnkfm", model.regionDetails().get(0).location()); - Assertions.assertEquals(false, - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .allowBlobPublicAccess()); - Assertions.assertEquals(false, - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .storageAccountHnsEnabled()); - Assertions.assertEquals("jnqtqe", - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .storageAccountName()); - Assertions.assertEquals("j", - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .storageAccountType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryRegionArmDetailsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryRegionArmDetailsTests.java deleted file mode 100644 index bb6e3483d495..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryRegionArmDetailsTests.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AcrDetails; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; -import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegistryRegionArmDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryRegionArmDetails model = BinaryData.fromString( - "{\"acrDetails\":[{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"kgqaboo\",\"acrAccountSku\":\"bmsgycqsxrmdv\",\"armResourceId\":{\"resourceId\":\"yqaeohpjhgejk\"}},\"userCreatedAcrAccount\":{\"armResourceId\":{\"resourceId\":\"daurgho\"}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"exbkhx\",\"acrAccountSku\":\"joezlqxrkdknkobe\",\"armResourceId\":{\"resourceId\":\"b\"}},\"userCreatedAcrAccount\":{\"armResourceId\":{\"resourceId\":\"tzamicbig\"}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"gzseznuxkeua\",\"acrAccountSku\":\"aabmdlqjb\",\"armResourceId\":{\"resourceId\":\"f\"}},\"userCreatedAcrAccount\":{\"armResourceId\":{\"resourceId\":\"upmomihzbd\"}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"pkcdpreyxely\",\"acrAccountSku\":\"ghflrufssjyghsf\",\"armResourceId\":{\"resourceId\":\"bh\"}},\"userCreatedAcrAccount\":{\"armResourceId\":{\"resourceId\":\"mqfmefgvqcpd\"}}}],\"location\":\"gquxweysland\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{\"resourceId\":\"hghcgawnrrnqu\"},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"tireimse\",\"storageAccountType\":\"fsxstcyil\"},\"userCreatedStorageAccount\":{\"armResourceId\":{\"resourceId\":\"mxcjzlquzexokjx\"}}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{\"resourceId\":\"inzabwmvoglj\"},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"gi\",\"storageAccountType\":\"wcehaqidoyzlt\"},\"userCreatedStorageAccount\":{\"armResourceId\":{\"resourceId\":\"qoqpepiaeap\"}}}]}") - .toObject(RegistryRegionArmDetails.class); - Assertions.assertEquals("kgqaboo", model.acrDetails().get(0).systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("bmsgycqsxrmdv", model.acrDetails().get(0).systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("yqaeohpjhgejk", - model.acrDetails().get(0).systemCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("daurgho", - model.acrDetails().get(0).userCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("gquxweysland", model.location()); - Assertions.assertEquals(false, - model.storageAccountDetails().get(0).systemCreatedStorageAccount().allowBlobPublicAccess()); - Assertions.assertEquals("hghcgawnrrnqu", - model.storageAccountDetails().get(0).systemCreatedStorageAccount().armResourceId().resourceId()); - Assertions.assertEquals(false, - model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountHnsEnabled()); - Assertions.assertEquals("tireimse", - model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountName()); - Assertions.assertEquals("fsxstcyil", - model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountType()); - Assertions.assertEquals("mxcjzlquzexokjx", - model.storageAccountDetails().get(0).userCreatedStorageAccount().armResourceId().resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryRegionArmDetails model = new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList( - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("kgqaboo") - .withAcrAccountSku("bmsgycqsxrmdv") - .withArmResourceId(new ArmResourceId().withResourceId("yqaeohpjhgejk"))) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId().withResourceId("daurgho"))), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("exbkhx") - .withAcrAccountSku("joezlqxrkdknkobe") - .withArmResourceId(new ArmResourceId().withResourceId("b"))) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId().withResourceId("tzamicbig"))), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("gzseznuxkeua") - .withAcrAccountSku("aabmdlqjb") - .withArmResourceId(new ArmResourceId().withResourceId("f"))) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount() - .withArmResourceId(new ArmResourceId().withResourceId("upmomihzbd"))), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("pkcdpreyxely") - .withAcrAccountSku("ghflrufssjyghsf") - .withArmResourceId(new ArmResourceId().withResourceId("bh"))) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount() - .withArmResourceId(new ArmResourceId().withResourceId("mqfmefgvqcpd"))))) - .withLocation("gquxweysland") - .withStorageAccountDetails(Arrays.asList( - new StorageAccountDetails() - .withSystemCreatedStorageAccount(new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId().withResourceId("hghcgawnrrnqu")) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("tireimse") - .withStorageAccountType("fsxstcyil")) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount() - .withArmResourceId(new ArmResourceId().withResourceId("mxcjzlquzexokjx"))), - new StorageAccountDetails() - .withSystemCreatedStorageAccount(new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId().withResourceId("inzabwmvoglj")) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("gi") - .withStorageAccountType("wcehaqidoyzlt")) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount() - .withArmResourceId(new ArmResourceId().withResourceId("qoqpepiaeap"))))); - model = BinaryData.fromObject(model).toObject(RegistryRegionArmDetails.class); - Assertions.assertEquals("kgqaboo", model.acrDetails().get(0).systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("bmsgycqsxrmdv", model.acrDetails().get(0).systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("yqaeohpjhgejk", - model.acrDetails().get(0).systemCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("daurgho", - model.acrDetails().get(0).userCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("gquxweysland", model.location()); - Assertions.assertEquals(false, - model.storageAccountDetails().get(0).systemCreatedStorageAccount().allowBlobPublicAccess()); - Assertions.assertEquals("hghcgawnrrnqu", - model.storageAccountDetails().get(0).systemCreatedStorageAccount().armResourceId().resourceId()); - Assertions.assertEquals(false, - model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountHnsEnabled()); - Assertions.assertEquals("tireimse", - model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountName()); - Assertions.assertEquals("fsxstcyil", - model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountType()); - Assertions.assertEquals("mxcjzlquzexokjx", - model.storageAccountDetails().get(0).userCreatedStorageAccount().armResourceId().resourceId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryTrackedResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryTrackedResourceArmPaginatedResultTests.java deleted file mode 100644 index 85fb0076b4b0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryTrackedResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; -import com.azure.resourcemanager.machinelearning.models.AcrDetails; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; -import com.azure.resourcemanager.machinelearning.models.RegistryTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RegistryTrackedResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryTrackedResourceArmPaginatedResult model = BinaryData.fromString( - "{\"nextLink\":\"deolctaebfs\",\"value\":[{\"identity\":{\"principalId\":\"07040a70-dc4d-409a-93b0-d16491c8a0c2\",\"tenantId\":\"28d8ce6f-2bef-43e1-a54d-097b41679968\",\"type\":\"None\",\"userAssignedIdentities\":{\"vtqigdxzvsgeafg\":{\"principalId\":\"2198b80a-38b1-4f58-af6e-8c77123aab0f\",\"clientId\":\"274d2530-3115-4925-b2f3-1d4d1d19a6a9\"},\"ehxlzsxezppk\":{\"principalId\":\"9f1832a9-90d9-405b-b727-56ee03ab0826\",\"clientId\":\"c579a59a-75cc-407c-b5b4-440628177d78\"}}},\"kind\":\"aaeskyfjlpze\",\"properties\":{\"discoveryUrl\":\"oyrplixl\",\"intellectualPropertyPublisher\":\"mllpquevhamfowg\",\"managedResourceGroup\":{\"resourceId\":\"mkekxpkzwaqxo\"},\"mlFlowRegistryUri\":\"ovchiqbplvfid\",\"registryPrivateEndpointConnections\":[{\"id\":\"ekxbyjg\",\"location\":\"fepxyihpqadag\",\"properties\":{}},{\"id\":\"dicxdw\",\"location\":\"fowxwyovcxjsgbi\",\"properties\":{}},{\"id\":\"kdveksb\",\"location\":\"oduchvlscr\",\"properties\":{}},{\"id\":\"bfdyjduss\",\"location\":\"szekbh\",\"properties\":{}}],\"publicNetworkAccess\":\"aaggkre\",\"regionDetails\":[{\"acrDetails\":[{}],\"location\":\"ybff\",\"storageAccountDetails\":[{},{},{}]},{\"acrDetails\":[{},{}],\"location\":\"reoagsqtaadus\",\"storageAccountDetails\":[{},{},{},{}]},{\"acrDetails\":[{}],\"location\":\"vsqw\",\"storageAccountDetails\":[{},{},{}]}]},\"sku\":{\"name\":\"zilfmnlikps\",\"tier\":\"Free\",\"size\":\"eypofqpm\",\"family\":\"yqgs\",\"capacity\":551840235},\"location\":\"ttjxophgerhsmvgo\",\"tags\":{\"qywwwmhk\":\"zmqilrixysfnim\"},\"id\":\"uwaedrympmlqoi\",\"name\":\"hzdue\",\"type\":\"ihapfjiiknjdiq\"},{\"identity\":{\"principalId\":\"5323f3c2-5ef8-4d6e-83da-ead8dfdb1c5b\",\"tenantId\":\"09354a5e-5d27-4ebe-8851-9b8d190751e0\",\"type\":\"None\",\"userAssignedIdentities\":{\"bi\":{\"principalId\":\"fab38cd6-baff-47cf-8bbc-bba778109e9d\",\"clientId\":\"9205257f-f78c-4f10-b861-b3af0e7c539a\"},\"sbw\":{\"principalId\":\"3d78241d-b70c-494a-8c45-4c72b944fd9a\",\"clientId\":\"2e026a3a-114d-4559-9df9-81ac5f4fdb15\"},\"vbvzipbwxgo\":{\"principalId\":\"2ce94d1a-4419-49a3-aae2-c40bebb4a862\",\"clientId\":\"c56e523e-d40c-4f44-bd09-ac8e416f5eca\"}}},\"kind\":\"x\",\"properties\":{\"discoveryUrl\":\"rad\",\"intellectualPropertyPublisher\":\"kxknpdg\",\"managedResourceGroup\":{\"resourceId\":\"jsugswhgs\"},\"mlFlowRegistryUri\":\"dkwwn\",\"registryPrivateEndpointConnections\":[{\"id\":\"ctohzhaquvwsxbgn\",\"location\":\"ervqchoadhrsxqvz\",\"properties\":{}}],\"publicNetworkAccess\":\"abdsr\",\"regionDetails\":[{\"acrDetails\":[{},{}],\"location\":\"zrsubklrxhjnltce\",\"storageAccountDetails\":[{},{}]},{\"acrDetails\":[{}],\"location\":\"dieq\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{},{}],\"location\":\"wdxvqzxoebwg\",\"storageAccountDetails\":[{},{}]}]},\"sku\":{\"name\":\"banbaupwtzv\",\"tier\":\"Basic\",\"size\":\"ozkxbzrpejplss\",\"family\":\"bttt\",\"capacity\":102469809},\"location\":\"xunrswgkpjhboy\",\"tags\":{\"lgw\":\"bhuhk\",\"o\":\"okhu\",\"cqypz\":\"jy\",\"fejyvdwtfxptpqa\":\"zufgs\"},\"id\":\"amkncfgy\",\"name\":\"mxsnxocuul\",\"type\":\"ojkpoyh\"},{\"identity\":{\"principalId\":\"ea345ed6-776c-4d1a-af21-0e2d89aefb7f\",\"tenantId\":\"0dbb5db4-62b2-49ea-ae41-301ef257bb96\",\"type\":\"None\",\"userAssignedIdentities\":{\"dljzgdyrc\":{\"principalId\":\"bc448ae0-9cce-4f4c-b12d-32a6a580a358\",\"clientId\":\"2c0f2b5d-3184-446e-bde6-b8f7b3fb7569\"},\"bsgzl\":{\"principalId\":\"5cf505b0-c6ff-4e22-815d-6e8dc355f1fe\",\"clientId\":\"8eda3cb4-5ab7-4382-a59c-b273d65517fa\"},\"bjnqogdxwbsf\":{\"principalId\":\"20785746-6ce0-4a33-801f-95f2c487367b\",\"clientId\":\"e16cf91f-6e91-45dd-aa47-424423aa1655\"},\"x\":{\"principalId\":\"73d525d2-f44c-450d-b6e8-f6a63167c620\",\"clientId\":\"c02314e6-1d95-4640-b57f-549f7787e75f\"}}},\"kind\":\"lflec\",\"properties\":{\"discoveryUrl\":\"inxojjlux\",\"intellectualPropertyPublisher\":\"hilzzdzzq\",\"managedResourceGroup\":{\"resourceId\":\"ezay\"},\"mlFlowRegistryUri\":\"ribqlotokh\",\"registryPrivateEndpointConnections\":[{\"id\":\"azn\",\"location\":\"qww\",\"properties\":{}},{\"id\":\"yofgwhnkbtlwljss\",\"location\":\"tsnld\",\"properties\":{}},{\"id\":\"olgisu\",\"location\":\"bteogfg\",\"properties\":{}}],\"publicNetworkAccess\":\"jrykwlefksxqce\",\"regionDetails\":[{\"acrDetails\":[{},{},{}],\"location\":\"nmqvzvluy\",\"storageAccountDetails\":[{},{},{},{}]},{\"acrDetails\":[{},{}],\"location\":\"sscyvai\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{}],\"location\":\"vfyeowpsfxtj\",\"storageAccountDetails\":[{}]}]},\"sku\":{\"name\":\"ymh\",\"tier\":\"Basic\",\"size\":\"qfttehdpboujs\",\"family\":\"fvvdshxcdedsue\",\"capacity\":1734780864},\"location\":\"xcgjtf\",\"tags\":{\"myltrwntfmtbg\":\"uktrfnslnlrx\",\"zjwhsetwwjwz\":\"jdxwnazkurrdre\",\"qzzdcykeyste\":\"qseuzuukykcyqhy\"},\"id\":\"fop\",\"name\":\"z\",\"type\":\"azgbsqgpe\"},{\"identity\":{\"principalId\":\"5ea494c7-bae9-44fd-9c8f-9bad43b0f936\",\"tenantId\":\"4cc0399d-a3c0-4836-9671-70bc2b801c1f\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"vozglqjbk\":{\"principalId\":\"7a757d69-a3ec-4510-94aa-a8a5080b76bb\",\"clientId\":\"b17f4a14-9677-425d-bbc8-ac66d3ec45d7\"}}},\"kind\":\"zcl\",\"properties\":{\"discoveryUrl\":\"zeyowmndcovdwzqa\",\"intellectualPropertyPublisher\":\"zanhmkvfru\",\"managedResourceGroup\":{\"resourceId\":\"drbcp\"},\"mlFlowRegistryUri\":\"xudqyemebunaucmc\",\"registryPrivateEndpointConnections\":[{\"id\":\"eemmjauwcgx\",\"location\":\"noh\",\"properties\":{}},{\"id\":\"ranizerw\",\"location\":\"dasmxu\",\"properties\":{}},{\"id\":\"bngfcocefhpri\",\"location\":\"fmpztraudsvh\",\"properties\":{}},{\"id\":\"culregpqt\",\"location\":\"jhvrztnvgyshqrdg\",\"properties\":{}}],\"publicNetworkAccess\":\"mewjzlpyk\",\"regionDetails\":[{\"acrDetails\":[{},{}],\"location\":\"jcayerzrransyby\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{}],\"location\":\"rghsrleinkfsc\",\"storageAccountDetails\":[{},{}]}]},\"sku\":{\"name\":\"jwvuag\",\"tier\":\"Premium\",\"size\":\"ltngvmreupt\",\"family\":\"lzmijajwolxfsv\",\"capacity\":202449168},\"location\":\"pynwlslrcigtzjcv\",\"tags\":{\"yxpavidnie\":\"lapsnsso\",\"slpuxgcbdsva\":\"wffcvvye\",\"rkxgpazwugxyqvnj\":\"pnptw\"},\"id\":\"bfe\",\"name\":\"hldiuhzzgqlm\",\"type\":\"aewzgiudjp\"}]}") - .toObject(RegistryTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("deolctaebfs", model.nextLink()); - Assertions.assertEquals("ttjxophgerhsmvgo", model.value().get(0).location()); - Assertions.assertEquals("zmqilrixysfnim", model.value().get(0).tags().get("qywwwmhk")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("aaeskyfjlpze", model.value().get(0).kind()); - Assertions.assertEquals("zilfmnlikps", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals("eypofqpm", model.value().get(0).sku().size()); - Assertions.assertEquals("yqgs", model.value().get(0).sku().family()); - Assertions.assertEquals(551840235, model.value().get(0).sku().capacity()); - Assertions.assertEquals("oyrplixl", model.value().get(0).discoveryUrl()); - Assertions.assertEquals("mllpquevhamfowg", model.value().get(0).intellectualPropertyPublisher()); - Assertions.assertEquals("mkekxpkzwaqxo", model.value().get(0).managedResourceGroup().resourceId()); - Assertions.assertEquals("ovchiqbplvfid", model.value().get(0).mlFlowRegistryUri()); - Assertions.assertEquals("ekxbyjg", model.value().get(0).registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("fepxyihpqadag", - model.value().get(0).registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("aaggkre", model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("ybff", model.value().get(0).regionDetails().get(0).location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryTrackedResourceArmPaginatedResult model - = new RegistryTrackedResourceArmPaginatedResult().withNextLink("deolctaebfs") - .withValue(Arrays.asList( - new RegistryInner().withLocation("ttjxophgerhsmvgo") - .withTags(mapOf("qywwwmhk", "zmqilrixysfnim")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("vtqigdxzvsgeafg", new UserAssignedIdentity(), - "ehxlzsxezppk", new UserAssignedIdentity()))) - .withKind("aaeskyfjlpze") - .withSku(new Sku().withName("zilfmnlikps") - .withTier(SkuTier.FREE) - .withSize("eypofqpm") - .withFamily("yqgs") - .withCapacity(551840235)) - .withDiscoveryUrl("oyrplixl") - .withIntellectualPropertyPublisher("mllpquevhamfowg") - .withManagedResourceGroup(new ArmResourceId().withResourceId("mkekxpkzwaqxo")) - .withMlFlowRegistryUri("ovchiqbplvfid") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("ekxbyjg").withLocation("fepxyihpqadag"), - new RegistryPrivateEndpointConnection().withId("dicxdw").withLocation("fowxwyovcxjsgbi"), - new RegistryPrivateEndpointConnection().withId("kdveksb").withLocation("oduchvlscr"), - new RegistryPrivateEndpointConnection().withId("bfdyjduss").withLocation("szekbh"))) - .withPublicNetworkAccess("aaggkre") - .withRegionDetails(Arrays - .asList( - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails())) - .withLocation("ybff") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("reoagsqtaadus") - .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails())) - .withLocation("vsqw") - .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails())))), - new RegistryInner().withLocation("xunrswgkpjhboy") - .withTags(mapOf("lgw", "bhuhk", "o", "okhu", "cqypz", "jy", "fejyvdwtfxptpqa", "zufgs")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("bi", new UserAssignedIdentity(), "sbw", - new UserAssignedIdentity(), "vbvzipbwxgo", new UserAssignedIdentity()))) - .withKind("x") - .withSku(new Sku().withName("banbaupwtzv") - .withTier(SkuTier.BASIC) - .withSize("ozkxbzrpejplss") - .withFamily("bttt") - .withCapacity(102469809)) - .withDiscoveryUrl("rad") - .withIntellectualPropertyPublisher("kxknpdg") - .withManagedResourceGroup(new ArmResourceId().withResourceId("jsugswhgs")) - .withMlFlowRegistryUri("dkwwn") - .withRegistryPrivateEndpointConnections( - Arrays.asList(new RegistryPrivateEndpointConnection().withId("ctohzhaquvwsxbgn") - .withLocation("ervqchoadhrsxqvz"))) - .withPublicNetworkAccess("abdsr") - .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("zrsubklrxhjnltce") - .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails())) - .withLocation("dieq") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails(), - new AcrDetails())) - .withLocation("wdxvqzxoebwg") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), - new StorageAccountDetails())))), - new RegistryInner().withLocation("xcgjtf") - .withTags(mapOf("myltrwntfmtbg", "uktrfnslnlrx", "zjwhsetwwjwz", "jdxwnazkurrdre", - "qzzdcykeyste", "fakeTokenPlaceholder")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("dljzgdyrc", new UserAssignedIdentity(), "bsgzl", new UserAssignedIdentity(), - "bjnqogdxwbsf", new UserAssignedIdentity(), "x", new UserAssignedIdentity()))) - .withKind("lflec") - .withSku(new Sku().withName("ymh") - .withTier(SkuTier.BASIC) - .withSize("qfttehdpboujs") - .withFamily("fvvdshxcdedsue") - .withCapacity(1734780864)) - .withDiscoveryUrl("inxojjlux") - .withIntellectualPropertyPublisher("hilzzdzzq") - .withManagedResourceGroup(new ArmResourceId().withResourceId("ezay")) - .withMlFlowRegistryUri("ribqlotokh") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("azn").withLocation("qww"), - new RegistryPrivateEndpointConnection().withId("yofgwhnkbtlwljss").withLocation("tsnld"), - new RegistryPrivateEndpointConnection().withId("olgisu").withLocation("bteogfg"))) - .withPublicNetworkAccess("jrykwlefksxqce") - .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("nmqvzvluy") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("sscyvai") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("vfyeowpsfxtj") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails())))), - new RegistryInner().withLocation("pynwlslrcigtzjcv") - .withTags( - mapOf("yxpavidnie", "lapsnsso", "slpuxgcbdsva", "wffcvvye", "rkxgpazwugxyqvnj", "pnptw")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("vozglqjbk", new UserAssignedIdentity()))) - .withKind("zcl") - .withSku(new Sku().withName("jwvuag") - .withTier(SkuTier.PREMIUM) - .withSize("ltngvmreupt") - .withFamily("lzmijajwolxfsv") - .withCapacity(202449168)) - .withDiscoveryUrl("zeyowmndcovdwzqa") - .withIntellectualPropertyPublisher("zanhmkvfru") - .withManagedResourceGroup(new ArmResourceId().withResourceId("drbcp")) - .withMlFlowRegistryUri("xudqyemebunaucmc") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("eemmjauwcgx").withLocation("noh"), - new RegistryPrivateEndpointConnection().withId("ranizerw").withLocation("dasmxu"), - new RegistryPrivateEndpointConnection() - .withId("bngfcocefhpri") - .withLocation("fmpztraudsvh"), - new RegistryPrivateEndpointConnection().withId("culregpqt") - .withLocation("jhvrztnvgyshqrdg"))) - .withPublicNetworkAccess("mewjzlpyk") - .withRegionDetails(Arrays.asList( - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("jcayerzrransyby") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("rghsrleinkfsc") - .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails())))))); - model = BinaryData.fromObject(model).toObject(RegistryTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("deolctaebfs", model.nextLink()); - Assertions.assertEquals("ttjxophgerhsmvgo", model.value().get(0).location()); - Assertions.assertEquals("zmqilrixysfnim", model.value().get(0).tags().get("qywwwmhk")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("aaeskyfjlpze", model.value().get(0).kind()); - Assertions.assertEquals("zilfmnlikps", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals("eypofqpm", model.value().get(0).sku().size()); - Assertions.assertEquals("yqgs", model.value().get(0).sku().family()); - Assertions.assertEquals(551840235, model.value().get(0).sku().capacity()); - Assertions.assertEquals("oyrplixl", model.value().get(0).discoveryUrl()); - Assertions.assertEquals("mllpquevhamfowg", model.value().get(0).intellectualPropertyPublisher()); - Assertions.assertEquals("mkekxpkzwaqxo", model.value().get(0).managedResourceGroup().resourceId()); - Assertions.assertEquals("ovchiqbplvfid", model.value().get(0).mlFlowRegistryUri()); - Assertions.assertEquals("ekxbyjg", model.value().get(0).registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("fepxyihpqadag", - model.value().get(0).registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("aaggkre", model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("ybff", model.value().get(0).regionDetails().get(0).location()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTests.java deleted file mode 100644 index f4f861b21572..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTests.java +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BlockedTransformers; -import com.azure.resourcemanager.machinelearning.models.ColumnTransformer; -import com.azure.resourcemanager.machinelearning.models.FeaturizationMode; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NCrossValidations; -import com.azure.resourcemanager.machinelearning.models.Regression; -import com.azure.resourcemanager.machinelearning.models.RegressionModels; -import com.azure.resourcemanager.machinelearning.models.RegressionPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.RegressionTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings; -import java.time.Duration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RegressionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Regression model = BinaryData.fromString( - "{\"taskType\":\"Regression\",\"primaryMetric\":\"R2Score\",\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"LightGBM\"],\"blockedTrainingAlgorithms\":[\"RandomForest\",\"ExtremeRandomTrees\",\"DecisionTree\",\"ExtremeRandomTrees\"],\"enableOnnxCompatibleModels\":false,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LightGBMRegressor\",\"stackMetaLearnerTrainPercentage\":8.33007277629979,\"stackMetaLearnerKWargs\":\"datayvichcap\"},\"enableStackEnsemble\":true,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT9H16M19S\",\"enableModelExplainability\":true,\"enableDnnTraining\":true},\"limitSettings\":{\"maxTrials\":1273889376,\"trialTimeout\":\"PT180H28M30S\",\"timeout\":\"PT69H35M25S\",\"maxConcurrentTrials\":1570051650,\"maxCoresPerTrial\":1441156662,\"exitScore\":37.32116818441482,\"enableEarlyTermination\":true},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"cvSplitColumnNames\":[\"tigpksywicklktg\",\"dprtqjytdcfe\"],\"weightColumnName\":\"hbdwbvjsbgmlamo\",\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"caytnpkvbpbltcws\",\"mode\":\"EvalDownload\",\"description\":\"eocnqoubvepvlrys\"},\"testData\":{\"jobInputType\":\"mltable\",\"uri\":\"h\",\"mode\":\"EvalDownload\",\"description\":\"hxohzbzhhavzf\"},\"validationDataSize\":40.045012854483886,\"testDataSize\":47.5872192816281,\"featurizationSettings\":{\"mode\":\"Auto\",\"blockedTransformers\":[\"CatTargetEncoder\"],\"columnNameAndTypes\":{\"fddxqfussub\":\"uehouisaklh\",\"p\":\"sspmjvailfauyv\",\"wvoglff\":\"wlkqdgwbztrthl\",\"lor\":\"dhg\"},\"transformerParams\":{\"cmo\":[{\"fields\":[\"cvxkylhc\",\"sdylmnq\",\"nkyg\"],\"parameters\":\"datatmsgkwedwl\"},{\"fields\":[\"hgbgbhudh\",\"pjimvrrqfibpkwm\",\"mrlfizjuddndi\"],\"parameters\":\"datapngyhylqyafe\"}],\"jfqreeo\":[{\"fields\":[\"uytxnxr\"],\"parameters\":\"datartzea\"},{\"fields\":[\"fvkhbjhmv\"],\"parameters\":\"dataxsdhweignybffq\"},{\"fields\":[\"ynepkt\",\"mwg\",\"conyse\",\"jijfhpxni\"],\"parameters\":\"datauoxfa\"},{\"fields\":[\"bskkypor\",\"ynieunbydlgfaphw\"],\"parameters\":\"databwtsaynrt\"}],\"rmclyqwwu\":[{\"fields\":[\"mrnblihs\",\"bfb\",\"divixzhpjgqzmiao\"],\"parameters\":\"dataeacfxaubuh\"},{\"fields\":[\"tcnxriqz\",\"dckhsq\"],\"parameters\":\"datarjsurnowo\"},{\"fields\":[\"rxmyokohlsf\",\"fouqjpzhea\",\"uvkqxqkvadmj\",\"ymudj\"],\"parameters\":\"dataajzdebhs\"}]},\"enableDnnFeaturization\":true,\"datasetLanguage\":\"aaptbs\"},\"logVerbosity\":\"Critical\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"bcbptwybloc\",\"mode\":\"Download\",\"description\":\"lxzbnsshvqn\"},\"targetColumnName\":\"zbeuybutcdzjf\"}") - .toObject(Regression.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("lxzbnsshvqn", model.trainingData().description()); - Assertions.assertEquals("bcbptwybloc", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("zbeuybutcdzjf", model.targetColumnName()); - Assertions.assertEquals(RegressionPrimaryMetrics.R2SCORE, model.primaryMetric()); - Assertions.assertEquals(false, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(8.33007277629979D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT9H16M19S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(RegressionModels.LIGHT_GBM, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(RegressionModels.RANDOM_FOREST, - model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals(1273889376, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT180H28M30S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT69H35M25S"), model.limitSettings().timeout()); - Assertions.assertEquals(1570051650, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1441156662, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(37.32116818441482D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("tigpksywicklktg", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("hbdwbvjsbgmlamo", model.weightColumnName()); - Assertions.assertEquals("eocnqoubvepvlrys", model.validationData().description()); - Assertions.assertEquals("caytnpkvbpbltcws", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("hxohzbzhhavzf", model.testData().description()); - Assertions.assertEquals("h", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.testData().mode()); - Assertions.assertEquals(40.045012854483886D, model.validationDataSize()); - Assertions.assertEquals(47.5872192816281D, model.testDataSize()); - Assertions.assertEquals("aaptbs", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.CAT_TARGET_ENCODER, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("uehouisaklh", model.featurizationSettings().columnNameAndTypes().get("fddxqfussub")); - Assertions.assertEquals("cvxkylhc", - model.featurizationSettings().transformerParams().get("cmo").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Regression model - = new Regression().withLogVerbosity(LogVerbosity.CRITICAL) - .withTrainingData(new MLTableJobInput().withDescription("lxzbnsshvqn") - .withUri("bcbptwybloc") - .withMode(InputDeliveryMode.DOWNLOAD)) - .withTargetColumnName("zbeuybutcdzjf") - .withPrimaryMetric(RegressionPrimaryMetrics.R2SCORE) - .withTrainingSettings( - new RegressionTrainingSettings().withEnableOnnxCompatibleModels(false) - .withStackEnsembleSettings(new StackEnsembleSettings() - .withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMREGRESSOR) - .withStackMetaLearnerTrainPercentage(8.33007277629979D) - .withStackMetaLearnerKWargs("datayvichcap")) - .withEnableStackEnsemble(true) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT9H16M19S")) - .withEnableModelExplainability(true) - .withEnableDnnTraining(true) - .withAllowedTrainingAlgorithms(Arrays.asList(RegressionModels.LIGHT_GBM)) - .withBlockedTrainingAlgorithms( - Arrays.asList(RegressionModels.RANDOM_FOREST, RegressionModels.EXTREME_RANDOM_TREES, - RegressionModels.DECISION_TREE, RegressionModels.EXTREME_RANDOM_TREES))) - .withLimitSettings(new TableVerticalLimitSettings().withMaxTrials(1273889376) - .withTrialTimeout(Duration.parse("PT180H28M30S")) - .withTimeout(Duration.parse("PT69H35M25S")) - .withMaxConcurrentTrials(1570051650) - .withMaxCoresPerTrial(1441156662) - .withExitScore(37.32116818441482D) - .withEnableEarlyTermination(true)) - .withNCrossValidations(new NCrossValidations()) - .withCvSplitColumnNames(Arrays.asList("tigpksywicklktg", "dprtqjytdcfe")) - .withWeightColumnName("hbdwbvjsbgmlamo") - .withValidationData(new MLTableJobInput().withDescription("eocnqoubvepvlrys") - .withUri("caytnpkvbpbltcws") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withTestData(new MLTableJobInput() - .withDescription("hxohzbzhhavzf") - .withUri("h") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withValidationDataSize(40.045012854483886D) - .withTestDataSize(47.5872192816281D) - .withFeaturizationSettings(new TableVerticalFeaturizationSettings().withDatasetLanguage("aaptbs") - .withMode(FeaturizationMode.AUTO) - .withBlockedTransformers(Arrays.asList(BlockedTransformers.CAT_TARGET_ENCODER)) - .withColumnNameAndTypes(mapOf("fddxqfussub", "uehouisaklh", "p", "sspmjvailfauyv", "wvoglff", - "wlkqdgwbztrthl", "lor", "dhg")) - .withTransformerParams(mapOf("cmo", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("cvxkylhc", "sdylmnq", "nkyg")) - .withParameters("datatmsgkwedwl"), - new ColumnTransformer() - .withFields(Arrays.asList("hgbgbhudh", "pjimvrrqfibpkwm", "mrlfizjuddndi")) - .withParameters("datapngyhylqyafe")), - "jfqreeo", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("uytxnxr")).withParameters("datartzea"), - new ColumnTransformer().withFields(Arrays.asList("fvkhbjhmv")) - .withParameters("dataxsdhweignybffq"), - new ColumnTransformer().withFields(Arrays.asList("ynepkt", "mwg", "conyse", "jijfhpxni")) - .withParameters("datauoxfa"), - new ColumnTransformer().withFields(Arrays.asList("bskkypor", "ynieunbydlgfaphw")) - .withParameters("databwtsaynrt")), - "rmclyqwwu", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("mrnblihs", "bfb", "divixzhpjgqzmiao")) - .withParameters("dataeacfxaubuh"), - new ColumnTransformer().withFields(Arrays.asList("tcnxriqz", "dckhsq")) - .withParameters("datarjsurnowo"), - new ColumnTransformer() - .withFields(Arrays.asList("rxmyokohlsf", "fouqjpzhea", "uvkqxqkvadmj", "ymudj")) - .withParameters("dataajzdebhs")))) - .withEnableDnnFeaturization(true)); - model = BinaryData.fromObject(model).toObject(Regression.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("lxzbnsshvqn", model.trainingData().description()); - Assertions.assertEquals("bcbptwybloc", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("zbeuybutcdzjf", model.targetColumnName()); - Assertions.assertEquals(RegressionPrimaryMetrics.R2SCORE, model.primaryMetric()); - Assertions.assertEquals(false, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(8.33007277629979D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT9H16M19S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(RegressionModels.LIGHT_GBM, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(RegressionModels.RANDOM_FOREST, - model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals(1273889376, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT180H28M30S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT69H35M25S"), model.limitSettings().timeout()); - Assertions.assertEquals(1570051650, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1441156662, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(37.32116818441482D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("tigpksywicklktg", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("hbdwbvjsbgmlamo", model.weightColumnName()); - Assertions.assertEquals("eocnqoubvepvlrys", model.validationData().description()); - Assertions.assertEquals("caytnpkvbpbltcws", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("hxohzbzhhavzf", model.testData().description()); - Assertions.assertEquals("h", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.testData().mode()); - Assertions.assertEquals(40.045012854483886D, model.validationDataSize()); - Assertions.assertEquals(47.5872192816281D, model.testDataSize()); - Assertions.assertEquals("aaptbs", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.CAT_TARGET_ENCODER, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("uehouisaklh", model.featurizationSettings().columnNameAndTypes().get("fddxqfussub")); - Assertions.assertEquals("cvxkylhc", - model.featurizationSettings().transformerParams().get("cmo").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTrainingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTrainingSettingsTests.java deleted file mode 100644 index 7b58e0cf878c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTrainingSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.RegressionModels; -import com.azure.resourcemanager.machinelearning.models.RegressionTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegressionTrainingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegressionTrainingSettings model = BinaryData.fromString( - "{\"allowedTrainingAlgorithms\":[\"ExtremeRandomTrees\",\"KNN\",\"LightGBM\",\"ElasticNet\"],\"blockedTrainingAlgorithms\":[\"ElasticNet\",\"ElasticNet\",\"GradientBoosting\",\"RandomForest\"],\"enableOnnxCompatibleModels\":false,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LightGBMClassifier\",\"stackMetaLearnerTrainPercentage\":82.88657288403749,\"stackMetaLearnerKWargs\":\"datagp\"},\"enableStackEnsemble\":false,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT146H7M34S\",\"enableModelExplainability\":false,\"enableDnnTraining\":false}") - .toObject(RegressionTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMCLASSIFIER, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(82.88657288403749D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT146H7M34S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(RegressionModels.EXTREME_RANDOM_TREES, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(RegressionModels.ELASTIC_NET, model.blockedTrainingAlgorithms().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegressionTrainingSettings model = new RegressionTrainingSettings().withEnableOnnxCompatibleModels(false) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMCLASSIFIER) - .withStackMetaLearnerTrainPercentage(82.88657288403749D) - .withStackMetaLearnerKWargs("datagp")) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(true) - .withEnsembleModelDownloadTimeout(Duration.parse("PT146H7M34S")) - .withEnableModelExplainability(false) - .withEnableDnnTraining(false) - .withAllowedTrainingAlgorithms(Arrays.asList(RegressionModels.EXTREME_RANDOM_TREES, RegressionModels.KNN, - RegressionModels.LIGHT_GBM, RegressionModels.ELASTIC_NET)) - .withBlockedTrainingAlgorithms(Arrays.asList(RegressionModels.ELASTIC_NET, RegressionModels.ELASTIC_NET, - RegressionModels.GRADIENT_BOOSTING, RegressionModels.RANDOM_FOREST)); - model = BinaryData.fromObject(model).toObject(RegressionTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMCLASSIFIER, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(82.88657288403749D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT146H7M34S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(RegressionModels.EXTREME_RANDOM_TREES, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(RegressionModels.ELASTIC_NET, model.blockedTrainingAlgorithms().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RequestLoggingTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RequestLoggingTests.java deleted file mode 100644 index 984b09efc1b2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RequestLoggingTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.RequestLogging; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RequestLoggingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RequestLogging model - = BinaryData.fromString("{\"captureHeaders\":[\"ozoolzq\"]}").toObject(RequestLogging.class); - Assertions.assertEquals("ozoolzq", model.captureHeaders().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RequestLogging model = new RequestLogging().withCaptureHeaders(Arrays.asList("ozoolzq")); - model = BinaryData.fromObject(model).toObject(RequestLogging.class); - Assertions.assertEquals("ozoolzq", model.captureHeaders().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceBaseTests.java deleted file mode 100644 index 5119a6d50e4c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceBaseTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ResourceBase; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ResourceBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceBase model = BinaryData.fromString( - "{\"description\":\"fgytguslfeadcyg\",\"tags\":{\"lolp\":\"yhejhzisxgfp\",\"r\":\"vk\",\"swibyr\":\"qvujzraehtwdwrf\"},\"properties\":{\"hevxcced\":\"bhshfwpracstwity\"}}") - .toObject(ResourceBase.class); - Assertions.assertEquals("fgytguslfeadcyg", model.description()); - Assertions.assertEquals("yhejhzisxgfp", model.tags().get("lolp")); - Assertions.assertEquals("bhshfwpracstwity", model.properties().get("hevxcced")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceBase model = new ResourceBase().withDescription("fgytguslfeadcyg") - .withTags(mapOf("lolp", "yhejhzisxgfp", "r", "vk", "swibyr", "qvujzraehtwdwrf")) - .withProperties(mapOf("hevxcced", "bhshfwpracstwity")); - model = BinaryData.fromObject(model).toObject(ResourceBase.class); - Assertions.assertEquals("fgytguslfeadcyg", model.description()); - Assertions.assertEquals("yhejhzisxgfp", model.tags().get("lolp")); - Assertions.assertEquals("bhshfwpracstwity", model.properties().get("hevxcced")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceConfigurationTests.java deleted file mode 100644 index 4d9be476f9e8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceConfigurationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ResourceConfiguration; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ResourceConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceConfiguration model = BinaryData.fromString( - "{\"instanceCount\":190807596,\"instanceType\":\"uunfprnjletlxsm\",\"properties\":{\"ifamowazi\":\"datado\",\"hxqszdtmaajquh\":\"datanknlqwzdvpi\"}}") - .toObject(ResourceConfiguration.class); - Assertions.assertEquals(190807596, model.instanceCount()); - Assertions.assertEquals("uunfprnjletlxsm", model.instanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceConfiguration model = new ResourceConfiguration().withInstanceCount(190807596) - .withInstanceType("uunfprnjletlxsm") - .withProperties(mapOf("ifamowazi", "datado", "hxqszdtmaajquh", "datanknlqwzdvpi")); - model = BinaryData.fromObject(model).toObject(ResourceConfiguration.class); - Assertions.assertEquals(190807596, model.instanceCount()); - Assertions.assertEquals("uunfprnjletlxsm", model.instanceType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceIdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceIdTests.java deleted file mode 100644 index 205e95161143..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceIdTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ResourceId; -import org.junit.jupiter.api.Assertions; - -public final class ResourceIdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceId model = BinaryData.fromString("{\"id\":\"qgnnbz\"}").toObject(ResourceId.class); - Assertions.assertEquals("qgnnbz", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceId model = new ResourceId().withId("qgnnbz"); - model = BinaryData.fromObject(model).toObject(ResourceId.class); - Assertions.assertEquals("qgnnbz", model.id()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceNameTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceNameTests.java deleted file mode 100644 index 59af47ed645a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceNameTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ResourceName; - -public final class ResourceNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceName model - = BinaryData.fromString("{\"value\":\"fcnj\",\"localizedValue\":\"cn\"}").toObject(ResourceName.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceName model = new ResourceName(); - model = BinaryData.fromObject(model).toObject(ResourceName.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceQuotaInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceQuotaInnerTests.java deleted file mode 100644 index ca45d7d5bec0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceQuotaInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner; - -public final class ResourceQuotaInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceQuotaInner model = BinaryData.fromString( - "{\"id\":\"rdqmhjjdhtldwkyz\",\"amlWorkspaceLocation\":\"utknc\",\"type\":\"cwsvlxotog\",\"name\":{\"value\":\"upqsx\",\"localizedValue\":\"micykvceoveilo\"},\"limit\":2837447101588730204,\"unit\":\"Count\"}") - .toObject(ResourceQuotaInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceQuotaInner model = new ResourceQuotaInner(); - model = BinaryData.fromObject(model).toObject(ResourceQuotaInner.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RollingInputDataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RollingInputDataTests.java deleted file mode 100644 index 160ece9acc0f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RollingInputDataTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobInputType; -import com.azure.resourcemanager.machinelearning.models.RollingInputData; -import java.time.Duration; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RollingInputDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RollingInputData model = BinaryData.fromString( - "{\"inputDataType\":\"Rolling\",\"windowOffset\":\"PT167H19S\",\"windowSize\":\"PT35H51M52S\",\"preprocessingComponentId\":\"mqfvxgwpqnyumz\",\"dataContext\":\"dokez\",\"jobInputType\":\"custom_model\",\"uri\":\"ezknfzqnzbflbqmh\",\"columns\":{\"bs\":\"xxvwedhagq\",\"crolrzesbomp\":\"seayuflmsyzz\",\"munwjivtbuszbdjr\":\"zk\",\"isdeqng\":\"feujywda\"}}") - .toObject(RollingInputData.class); - Assertions.assertEquals("dokez", model.dataContext()); - Assertions.assertEquals(JobInputType.CUSTOM_MODEL, model.jobInputType()); - Assertions.assertEquals("ezknfzqnzbflbqmh", model.uri()); - Assertions.assertEquals("xxvwedhagq", model.columns().get("bs")); - Assertions.assertEquals(Duration.parse("PT167H19S"), model.windowOffset()); - Assertions.assertEquals(Duration.parse("PT35H51M52S"), model.windowSize()); - Assertions.assertEquals("mqfvxgwpqnyumz", model.preprocessingComponentId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RollingInputData model = new RollingInputData().withDataContext("dokez") - .withJobInputType(JobInputType.CUSTOM_MODEL) - .withUri("ezknfzqnzbflbqmh") - .withColumns(mapOf("bs", "xxvwedhagq", "crolrzesbomp", "seayuflmsyzz", "munwjivtbuszbdjr", "zk", "isdeqng", - "feujywda")) - .withWindowOffset(Duration.parse("PT167H19S")) - .withWindowSize(Duration.parse("PT35H51M52S")) - .withPreprocessingComponentId("mqfvxgwpqnyumz"); - model = BinaryData.fromObject(model).toObject(RollingInputData.class); - Assertions.assertEquals("dokez", model.dataContext()); - Assertions.assertEquals(JobInputType.CUSTOM_MODEL, model.jobInputType()); - Assertions.assertEquals("ezknfzqnzbflbqmh", model.uri()); - Assertions.assertEquals("xxvwedhagq", model.columns().get("bs")); - Assertions.assertEquals(Duration.parse("PT167H19S"), model.windowOffset()); - Assertions.assertEquals(Duration.parse("PT35H51M52S"), model.windowSize()); - Assertions.assertEquals("mqfvxgwpqnyumz", model.preprocessingComponentId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RouteTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RouteTests.java deleted file mode 100644 index 2f7cea25f27b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RouteTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Route; -import org.junit.jupiter.api.Assertions; - -public final class RouteTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Route model = BinaryData.fromString("{\"path\":\"eranokqgukkjqnv\",\"port\":2004582271}").toObject(Route.class); - Assertions.assertEquals("eranokqgukkjqnv", model.path()); - Assertions.assertEquals(2004582271, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Route model = new Route().withPath("eranokqgukkjqnv").withPort(2004582271); - model = BinaryData.fromObject(model).toObject(Route.class); - Assertions.assertEquals("eranokqgukkjqnv", model.path()); - Assertions.assertEquals(2004582271, model.port()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SamplingAlgorithmTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SamplingAlgorithmTests.java deleted file mode 100644 index cea13a05cca2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SamplingAlgorithmTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithm; - -public final class SamplingAlgorithmTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SamplingAlgorithm model = BinaryData.fromString("{\"samplingAlgorithmType\":\"SamplingAlgorithm\"}") - .toObject(SamplingAlgorithm.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SamplingAlgorithm model = new SamplingAlgorithm(); - model = BinaryData.fromObject(model).toObject(SamplingAlgorithm.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsInformationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsInformationTests.java deleted file mode 100644 index fc94115f1fd8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsInformationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScaleSettings; -import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ScaleSettingsInformationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScaleSettingsInformation model = BinaryData.fromString( - "{\"scaleSettings\":{\"maxNodeCount\":1901953478,\"minNodeCount\":1742737473,\"nodeIdleTimeBeforeScaleDown\":\"PT26H51M46S\"}}") - .toObject(ScaleSettingsInformation.class); - Assertions.assertEquals(1901953478, model.scaleSettings().maxNodeCount()); - Assertions.assertEquals(1742737473, model.scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT26H51M46S"), model.scaleSettings().nodeIdleTimeBeforeScaleDown()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScaleSettingsInformation model - = new ScaleSettingsInformation().withScaleSettings(new ScaleSettings().withMaxNodeCount(1901953478) - .withMinNodeCount(1742737473) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT26H51M46S"))); - model = BinaryData.fromObject(model).toObject(ScaleSettingsInformation.class); - Assertions.assertEquals(1901953478, model.scaleSettings().maxNodeCount()); - Assertions.assertEquals(1742737473, model.scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT26H51M46S"), model.scaleSettings().nodeIdleTimeBeforeScaleDown()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsTests.java deleted file mode 100644 index 4e41bcc8cec4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScaleSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ScaleSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScaleSettings model = BinaryData.fromString( - "{\"maxNodeCount\":1397437100,\"minNodeCount\":1232796575,\"nodeIdleTimeBeforeScaleDown\":\"PT232H8M24S\"}") - .toObject(ScaleSettings.class); - Assertions.assertEquals(1397437100, model.maxNodeCount()); - Assertions.assertEquals(1232796575, model.minNodeCount()); - Assertions.assertEquals(Duration.parse("PT232H8M24S"), model.nodeIdleTimeBeforeScaleDown()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScaleSettings model = new ScaleSettings().withMaxNodeCount(1397437100) - .withMinNodeCount(1232796575) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT232H8M24S")); - model = BinaryData.fromObject(model).toObject(ScaleSettings.class); - Assertions.assertEquals(1397437100, model.maxNodeCount()); - Assertions.assertEquals(1232796575, model.minNodeCount()); - Assertions.assertEquals(Duration.parse("PT232H8M24S"), model.nodeIdleTimeBeforeScaleDown()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleActionBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleActionBaseTests.java deleted file mode 100644 index 68d99d619390..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleActionBaseTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScheduleActionBase; - -public final class ScheduleActionBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleActionBase model - = BinaryData.fromString("{\"actionType\":\"ScheduleActionBase\"}").toObject(ScheduleActionBase.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleActionBase model = new ScheduleActionBase(); - model = BinaryData.fromObject(model).toObject(ScheduleActionBase.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleBaseTests.java deleted file mode 100644 index 119db6cb13d7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleBaseTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScheduleBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningState; -import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleBase model = BinaryData - .fromString("{\"id\":\"qirvtk\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Disabled\"}") - .toObject(ScheduleBase.class); - Assertions.assertEquals("qirvtk", model.id()); - Assertions.assertEquals(ScheduleProvisioningState.PROVISIONING, model.provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleBase model = new ScheduleBase().withId("qirvtk") - .withProvisioningStatus(ScheduleProvisioningState.PROVISIONING) - .withStatus(ScheduleStatus.DISABLED); - model = BinaryData.fromObject(model).toObject(ScheduleBase.class); - Assertions.assertEquals("qirvtk", model.id()); - Assertions.assertEquals(ScheduleProvisioningState.PROVISIONING, model.provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleInnerTests.java deleted file mode 100644 index 999e9f22e553..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; -import com.azure.resourcemanager.machinelearning.models.ScheduleActionBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -import com.azure.resourcemanager.machinelearning.models.TriggerBase; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"cteoedlrslsk\",\"isEnabled\":false,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"vjnzdpvocojhpcna\",\"startTime\":\"zf\",\"timeZone\":\"ggytexvzilmhivz\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Deleting\",\"description\":\"ncknrzdajlsk\",\"tags\":{\"eucyrth\":\"jxul\",\"hokamvfej\":\"qlehmcgcjeinu\"},\"properties\":{\"okpysthhzagj\":\"ttmbqdabzfiv\",\"lhgenuzejgvkv\":\"wyy\"}},\"id\":\"aqszllrzl\",\"name\":\"mmdqgmihzpimc\",\"type\":\"rh\"}") - .toObject(ScheduleInner.class); - Assertions.assertEquals("ncknrzdajlsk", model.properties().description()); - Assertions.assertEquals("jxul", model.properties().tags().get("eucyrth")); - Assertions.assertEquals("ttmbqdabzfiv", model.properties().properties().get("okpysthhzagj")); - Assertions.assertEquals("cteoedlrslsk", model.properties().displayName()); - Assertions.assertEquals(false, model.properties().isEnabled()); - Assertions.assertEquals("vjnzdpvocojhpcna", model.properties().trigger().endTime()); - Assertions.assertEquals("zf", model.properties().trigger().startTime()); - Assertions.assertEquals("ggytexvzilmhivz", model.properties().trigger().timeZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleInner model = new ScheduleInner().withProperties(new ScheduleProperties() - .withDescription("ncknrzdajlsk") - .withTags(mapOf("eucyrth", "jxul", "hokamvfej", "qlehmcgcjeinu")) - .withProperties(mapOf("okpysthhzagj", "ttmbqdabzfiv", "lhgenuzejgvkv", "wyy")) - .withDisplayName("cteoedlrslsk") - .withIsEnabled(false) - .withTrigger( - new TriggerBase().withEndTime("vjnzdpvocojhpcna").withStartTime("zf").withTimeZone("ggytexvzilmhivz")) - .withAction(new ScheduleActionBase())); - model = BinaryData.fromObject(model).toObject(ScheduleInner.class); - Assertions.assertEquals("ncknrzdajlsk", model.properties().description()); - Assertions.assertEquals("jxul", model.properties().tags().get("eucyrth")); - Assertions.assertEquals("ttmbqdabzfiv", model.properties().properties().get("okpysthhzagj")); - Assertions.assertEquals("cteoedlrslsk", model.properties().displayName()); - Assertions.assertEquals(false, model.properties().isEnabled()); - Assertions.assertEquals("vjnzdpvocojhpcna", model.properties().trigger().endTime()); - Assertions.assertEquals("zf", model.properties().trigger().startTime()); - Assertions.assertEquals("ggytexvzilmhivz", model.properties().trigger().timeZone()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulePropertiesTests.java deleted file mode 100644 index 4e8e540a1a4b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulePropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScheduleActionBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -import com.azure.resourcemanager.machinelearning.models.TriggerBase; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SchedulePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleProperties model = BinaryData.fromString( - "{\"displayName\":\"t\",\"isEnabled\":true,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"logxsvtzar\",\"startTime\":\"vqnsqk\",\"timeZone\":\"mbjwzzoslpkyb\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Deleting\",\"description\":\"kzpgaj\",\"tags\":{\"uqrebluimmbwx\":\"cemqbmfuvqarwz\",\"kraokq\":\"fgtdmbvx\",\"aokbavlyttaaknwf\":\"budbt\",\"sm\":\"ke\"},\"properties\":{\"gatolekscbctnan\":\"ujd\",\"wnsnlaimouxwks\":\"imwbzxpdcldpk\",\"fco\":\"mud\",\"kbqsjhbtqqvyfscy\":\"bicziuswswj\"}}") - .toObject(ScheduleProperties.class); - Assertions.assertEquals("kzpgaj", model.description()); - Assertions.assertEquals("cemqbmfuvqarwz", model.tags().get("uqrebluimmbwx")); - Assertions.assertEquals("ujd", model.properties().get("gatolekscbctnan")); - Assertions.assertEquals("t", model.displayName()); - Assertions.assertEquals(true, model.isEnabled()); - Assertions.assertEquals("logxsvtzar", model.trigger().endTime()); - Assertions.assertEquals("vqnsqk", model.trigger().startTime()); - Assertions.assertEquals("mbjwzzoslpkyb", model.trigger().timeZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleProperties model = new ScheduleProperties().withDescription("kzpgaj") - .withTags( - mapOf("uqrebluimmbwx", "cemqbmfuvqarwz", "kraokq", "fgtdmbvx", "aokbavlyttaaknwf", "budbt", "sm", "ke")) - .withProperties(mapOf("gatolekscbctnan", "ujd", "wnsnlaimouxwks", "imwbzxpdcldpk", "fco", "mud", - "kbqsjhbtqqvyfscy", "bicziuswswj")) - .withDisplayName("t") - .withIsEnabled(true) - .withTrigger( - new TriggerBase().withEndTime("logxsvtzar").withStartTime("vqnsqk").withTimeZone("mbjwzzoslpkyb")) - .withAction(new ScheduleActionBase()); - model = BinaryData.fromObject(model).toObject(ScheduleProperties.class); - Assertions.assertEquals("kzpgaj", model.description()); - Assertions.assertEquals("cemqbmfuvqarwz", model.tags().get("uqrebluimmbwx")); - Assertions.assertEquals("ujd", model.properties().get("gatolekscbctnan")); - Assertions.assertEquals("t", model.displayName()); - Assertions.assertEquals(true, model.isEnabled()); - Assertions.assertEquals("logxsvtzar", model.trigger().endTime()); - Assertions.assertEquals("vqnsqk", model.trigger().startTime()); - Assertions.assertEquals("mbjwzzoslpkyb", model.trigger().timeZone()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleResourceArmPaginatedResultTests.java deleted file mode 100644 index e970d016f9d5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; -import com.azure.resourcemanager.machinelearning.models.ScheduleActionBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -import com.azure.resourcemanager.machinelearning.models.ScheduleResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.TriggerBase; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"dmkrrb\",\"isEnabled\":false,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"ulubefgybp\",\"startTime\":\"bfununmpzkrv\",\"timeZone\":\"ifkdschlzvf\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Creating\",\"description\":\"kjjwgcwn\",\"tags\":{\"rtogmhmj\":\"kgf\",\"fp\":\"jsc\",\"fv\":\"qwtygevgwmseharx\",\"x\":\"n\"},\"properties\":{\"wjhrsidqpxlbtpa\":\"pjptn\",\"ngatwmy\":\"f\",\"mfjhpycvjqdvdwkq\":\"yutrymd\",\"n\":\"ldrlefgnaavua\"}},\"id\":\"taoutnpdct\",\"name\":\"hspfefyihd\",\"type\":\"yeuyldph\"},{\"properties\":{\"displayName\":\"ybkcgsuthhllnmwy\",\"isEnabled\":true,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"exlfciatxtjrrl\",\"startTime\":\"dskjhhxdlaj\",\"timeZone\":\"xcxscvslxlh\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Failed\",\"description\":\"rmukmyjmkxett\",\"tags\":{\"dnqtoqxjhqx\":\"ojfkq\",\"htkbtnq\":\"s\",\"mbiipsnawwlqk\":\"rngl\"},\"properties\":{\"xricctkwmuqq\":\"hhl\",\"rwvaexhdc\":\"ajxeiygle\",\"hdmljz\":\"rceqnkbrupob\"}},\"id\":\"vume\",\"name\":\"jpbi\",\"type\":\"nzpphepife\"},{\"properties\":{\"displayName\":\"eqir\",\"isEnabled\":false,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"ly\",\"startTime\":\"gxvrpjl\",\"timeZone\":\"zuodacpun\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Updating\",\"description\":\"pdjxqeskoynu\",\"tags\":{\"vesk\":\"pckaewse\",\"fn\":\"xegqphr\",\"bcbcpz\":\"hctmjtsgh\",\"ldtzmpypefcp\":\"rpzeqac\"},\"properties\":{\"fkhuytu\":\"hnuqndaizu\",\"mtvtvegwqiukvzwy\":\"zx\"}},\"id\":\"tthaokgkskj\",\"name\":\"vb\",\"type\":\"shajqf\"},{\"properties\":{\"displayName\":\"peexpgeumilhwuit\",\"isEnabled\":true,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"yion\",\"startTime\":\"ninbdbzsxcwqqrs\",\"timeZone\":\"cbbprtugav\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Canceled\",\"description\":\"yksivmfogdrtbfc\",\"tags\":{\"xsgm\":\"ftsjcwj\",\"if\":\"awvifdxke\",\"loozrvt\":\"ocjxw\"},\"properties\":{\"cpxxvirye\":\"mufun\",\"lpmcrdc\":\"ngjgvrquvpyg\",\"x\":\"eljtiahxmfqryarv\"}},\"id\":\"bglcjkayspthzodu\",\"name\":\"tl\",\"type\":\"jtgblios\"}],\"nextLink\":\"fmkmfdjxyxgbkkq\"}") - .toObject(ScheduleResourceArmPaginatedResult.class); - Assertions.assertEquals("kjjwgcwn", model.value().get(0).properties().description()); - Assertions.assertEquals("kgf", model.value().get(0).properties().tags().get("rtogmhmj")); - Assertions.assertEquals("pjptn", model.value().get(0).properties().properties().get("wjhrsidqpxlbtpa")); - Assertions.assertEquals("dmkrrb", model.value().get(0).properties().displayName()); - Assertions.assertEquals(false, model.value().get(0).properties().isEnabled()); - Assertions.assertEquals("ulubefgybp", model.value().get(0).properties().trigger().endTime()); - Assertions.assertEquals("bfununmpzkrv", model.value().get(0).properties().trigger().startTime()); - Assertions.assertEquals("ifkdschlzvf", model.value().get(0).properties().trigger().timeZone()); - Assertions.assertEquals("fmkmfdjxyxgbkkq", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleResourceArmPaginatedResult model = new ScheduleResourceArmPaginatedResult().withValue(Arrays.asList( - new ScheduleInner().withProperties(new ScheduleProperties().withDescription("kjjwgcwn") - .withTags(mapOf("rtogmhmj", "kgf", "fp", "jsc", "fv", "qwtygevgwmseharx", "x", "n")) - .withProperties(mapOf("wjhrsidqpxlbtpa", "pjptn", "ngatwmy", "f", "mfjhpycvjqdvdwkq", "yutrymd", "n", - "ldrlefgnaavua")) - .withDisplayName("dmkrrb") - .withIsEnabled(false) - .withTrigger(new TriggerBase().withEndTime("ulubefgybp") - .withStartTime("bfununmpzkrv") - .withTimeZone("ifkdschlzvf")) - .withAction(new ScheduleActionBase())), - new ScheduleInner().withProperties(new ScheduleProperties().withDescription("rmukmyjmkxett") - .withTags(mapOf("dnqtoqxjhqx", "ojfkq", "htkbtnq", "s", "mbiipsnawwlqk", "rngl")) - .withProperties(mapOf("xricctkwmuqq", "hhl", "rwvaexhdc", "ajxeiygle", "hdmljz", "rceqnkbrupob")) - .withDisplayName("ybkcgsuthhllnmwy") - .withIsEnabled(true) - .withTrigger(new TriggerBase().withEndTime("exlfciatxtjrrl") - .withStartTime("dskjhhxdlaj") - .withTimeZone("xcxscvslxlh")) - .withAction(new ScheduleActionBase())), - new ScheduleInner().withProperties(new ScheduleProperties().withDescription("pdjxqeskoynu") - .withTags(mapOf("vesk", "pckaewse", "fn", "xegqphr", "bcbcpz", "hctmjtsgh", "ldtzmpypefcp", "rpzeqac")) - .withProperties(mapOf("fkhuytu", "hnuqndaizu", "mtvtvegwqiukvzwy", "zx")) - .withDisplayName("eqir") - .withIsEnabled(false) - .withTrigger(new TriggerBase().withEndTime("ly").withStartTime("gxvrpjl").withTimeZone("zuodacpun")) - .withAction(new ScheduleActionBase())), - new ScheduleInner().withProperties(new ScheduleProperties().withDescription("yksivmfogdrtbfc") - .withTags(mapOf("xsgm", "ftsjcwj", "if", "awvifdxke", "loozrvt", "ocjxw")) - .withProperties(mapOf("cpxxvirye", "mufun", "lpmcrdc", "ngjgvrquvpyg", "x", "eljtiahxmfqryarv")) - .withDisplayName("peexpgeumilhwuit") - .withIsEnabled(true) - .withTrigger( - new TriggerBase().withEndTime("yion").withStartTime("ninbdbzsxcwqqrs").withTimeZone("cbbprtugav")) - .withAction(new ScheduleActionBase())))) - .withNextLink("fmkmfdjxyxgbkkq"); - model = BinaryData.fromObject(model).toObject(ScheduleResourceArmPaginatedResult.class); - Assertions.assertEquals("kjjwgcwn", model.value().get(0).properties().description()); - Assertions.assertEquals("kgf", model.value().get(0).properties().tags().get("rtogmhmj")); - Assertions.assertEquals("pjptn", model.value().get(0).properties().properties().get("wjhrsidqpxlbtpa")); - Assertions.assertEquals("dmkrrb", model.value().get(0).properties().displayName()); - Assertions.assertEquals(false, model.value().get(0).properties().isEnabled()); - Assertions.assertEquals("ulubefgybp", model.value().get(0).properties().trigger().endTime()); - Assertions.assertEquals("bfununmpzkrv", model.value().get(0).properties().trigger().startTime()); - Assertions.assertEquals("ifkdschlzvf", model.value().get(0).properties().trigger().timeZone()); - Assertions.assertEquals("fmkmfdjxyxgbkkq", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateMockTests.java deleted file mode 100644 index 694885a70c03..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Schedule; -import com.azure.resourcemanager.machinelearning.models.ScheduleActionBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -import com.azure.resourcemanager.machinelearning.models.TriggerBase; -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 reactor.core.publisher.Mono; - -public final class SchedulesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"xjxueilixzjvkqj\",\"isEnabled\":false,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"hcmxxxpnkx\",\"startTime\":\"jnkmsfsq\",\"timeZone\":\"xqcim\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Succeeded\",\"description\":\"kjwr\",\"tags\":{\"ybdgtfoz\":\"gcsmrtep\",\"bpqelmszobt\":\"sfjdcokb\",\"bgrdrumu\":\"eltnby\"},\"properties\":{\"kwv\":\"wecdsybiazfvx\",\"byqqon\":\"eqly\"}},\"id\":\"ekiojusmdo\",\"name\":\"kukycn\",\"type\":\"aovlyykx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Schedule response = manager.schedules() - .define("o") - .withExistingWorkspace("tlxrdepqtz", "hkpko") - .withProperties(new ScheduleProperties().withDescription("mbbhluvdce") - .withTags(mapOf("wdskiegtae", "vnomzlre", "xaodbhgxbadbor", "aleptaasqo")) - .withProperties(mapOf("hqwyxbat", "ihggv", "dsclqwkddgepu", "viynlslgxif", "ueq", "ambzfxgshaq", - "jtunlllmtiy", "niagzmyxsoxqa")) - .withDisplayName("nobuwhutvcdtgx") - .withIsEnabled(false) - .withTrigger(new TriggerBase().withEndTime("hgmmzxpsrlbppjq") - .withStartTime("cpdaoskgtalljsoa") - .withTimeZone("jjklmpbgrosxfdx")) - .withAction(new ScheduleActionBase())) - .create(); - - Assertions.assertEquals("kjwr", response.properties().description()); - Assertions.assertEquals("gcsmrtep", response.properties().tags().get("ybdgtfoz")); - Assertions.assertEquals("wecdsybiazfvx", response.properties().properties().get("kwv")); - Assertions.assertEquals("xjxueilixzjvkqj", response.properties().displayName()); - Assertions.assertEquals(false, response.properties().isEnabled()); - Assertions.assertEquals("hcmxxxpnkx", response.properties().trigger().endTime()); - Assertions.assertEquals("jnkmsfsq", response.properties().trigger().startTime()); - Assertions.assertEquals("xqcim", response.properties().trigger().timeZone()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteMockTests.java deleted file mode 100644 index 24c48ec8fa47..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SchedulesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.schedules().delete("qoucmfuvuslvbujw", "nz", "j", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetWithResponseMockTests.java deleted file mode 100644 index 7105742be9ca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Schedule; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SchedulesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"g\",\"isEnabled\":false,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"ypxwlvthiv\",\"startTime\":\"uaxoswqwbh\",\"timeZone\":\"zlgkcnp\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Deleting\",\"description\":\"rxfezlmzse\",\"tags\":{\"vofrenuvp\":\"uzyowra\"},\"properties\":{\"pgqxt\":\"tnyyeyjatfpbxnre\",\"ynxbuvyglfyfcs\":\"hruqtximrxeyz\"}},\"id\":\"jhoxtbsybpefojp\",\"name\":\"ixdgqjkfvmrnwgea\",\"type\":\"yifeiiriomjdnkn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Schedule response = manager.schedules() - .getWithResponse("yyvecr", "hqym", "dsthktsaljkhlpg", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("rxfezlmzse", response.properties().description()); - Assertions.assertEquals("uzyowra", response.properties().tags().get("vofrenuvp")); - Assertions.assertEquals("tnyyeyjatfpbxnre", response.properties().properties().get("pgqxt")); - Assertions.assertEquals("g", response.properties().displayName()); - Assertions.assertEquals(false, response.properties().isEnabled()); - Assertions.assertEquals("ypxwlvthiv", response.properties().trigger().endTime()); - Assertions.assertEquals("uaxoswqwbh", response.properties().trigger().startTime()); - Assertions.assertEquals("zlgkcnp", response.properties().trigger().timeZone()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListMockTests.java deleted file mode 100644 index 76d01c992e58..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Schedule; -import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SchedulesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"oujtcp\",\"isEnabled\":true,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"lyogzbasjckakik\",\"startTime\":\"ajmnvb\",\"timeZone\":\"mnkrqdyc\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Deleting\",\"description\":\"kxx\",\"tags\":{\"bcgsa\":\"qr\",\"qedft\":\"daypx\",\"kt\":\"igmj\"},\"properties\":{\"brtzfliqntnoeg\":\"yvzixmusiidiv\",\"daiex\":\"oqpuclidyt\",\"fgivfiypf\":\"sapygiioukaffz\",\"u\":\"wyzjsixorvigrxmp\"}},\"id\":\"ekbpqghxdpg\",\"name\":\"hfimlyxd\",\"type\":\"ixjudbiac\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.schedules() - .list("nhhvp", "ukourqviyf", "segwez", ScheduleListViewType.ALL, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kxx", response.iterator().next().properties().description()); - Assertions.assertEquals("qr", response.iterator().next().properties().tags().get("bcgsa")); - Assertions.assertEquals("yvzixmusiidiv", - response.iterator().next().properties().properties().get("brtzfliqntnoeg")); - Assertions.assertEquals("oujtcp", response.iterator().next().properties().displayName()); - Assertions.assertEquals(true, response.iterator().next().properties().isEnabled()); - Assertions.assertEquals("lyogzbasjckakik", response.iterator().next().properties().trigger().endTime()); - Assertions.assertEquals("ajmnvb", response.iterator().next().properties().trigger().startTime()); - Assertions.assertEquals("mnkrqdyc", response.iterator().next().properties().trigger().timeZone()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptReferenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptReferenceTests.java deleted file mode 100644 index a9ce56bb4c0c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptReferenceTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScriptReference; -import org.junit.jupiter.api.Assertions; - -public final class ScriptReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptReference model = BinaryData.fromString( - "{\"scriptSource\":\"nione\",\"scriptData\":\"zdrd\",\"scriptArguments\":\"enx\",\"timeout\":\"tlzlmtrlxcznnhz\"}") - .toObject(ScriptReference.class); - Assertions.assertEquals("nione", model.scriptSource()); - Assertions.assertEquals("zdrd", model.scriptData()); - Assertions.assertEquals("enx", model.scriptArguments()); - Assertions.assertEquals("tlzlmtrlxcznnhz", model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptReference model = new ScriptReference().withScriptSource("nione") - .withScriptData("zdrd") - .withScriptArguments("enx") - .withTimeout("tlzlmtrlxcznnhz"); - model = BinaryData.fromObject(model).toObject(ScriptReference.class); - Assertions.assertEquals("nione", model.scriptSource()); - Assertions.assertEquals("zdrd", model.scriptData()); - Assertions.assertEquals("enx", model.scriptArguments()); - Assertions.assertEquals("tlzlmtrlxcznnhz", model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptsToExecuteTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptsToExecuteTests.java deleted file mode 100644 index 6af7f16e9342..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptsToExecuteTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScriptReference; -import com.azure.resourcemanager.machinelearning.models.ScriptsToExecute; -import org.junit.jupiter.api.Assertions; - -public final class ScriptsToExecuteTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptsToExecute model = BinaryData.fromString( - "{\"startupScript\":{\"scriptSource\":\"ibniynts\",\"scriptData\":\"mfmeftvhkmoo\",\"scriptArguments\":\"rh\",\"timeout\":\"bwgmjgrul\"},\"creationScript\":{\"scriptSource\":\"gxhcxnwjtpfdzxco\",\"scriptData\":\"fwofwakukzkdtz\",\"scriptArguments\":\"oednlwglihezomuc\",\"timeout\":\"g\"}}") - .toObject(ScriptsToExecute.class); - Assertions.assertEquals("ibniynts", model.startupScript().scriptSource()); - Assertions.assertEquals("mfmeftvhkmoo", model.startupScript().scriptData()); - Assertions.assertEquals("rh", model.startupScript().scriptArguments()); - Assertions.assertEquals("bwgmjgrul", model.startupScript().timeout()); - Assertions.assertEquals("gxhcxnwjtpfdzxco", model.creationScript().scriptSource()); - Assertions.assertEquals("fwofwakukzkdtz", model.creationScript().scriptData()); - Assertions.assertEquals("oednlwglihezomuc", model.creationScript().scriptArguments()); - Assertions.assertEquals("g", model.creationScript().timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptsToExecute model = new ScriptsToExecute() - .withStartupScript(new ScriptReference().withScriptSource("ibniynts") - .withScriptData("mfmeftvhkmoo") - .withScriptArguments("rh") - .withTimeout("bwgmjgrul")) - .withCreationScript(new ScriptReference().withScriptSource("gxhcxnwjtpfdzxco") - .withScriptData("fwofwakukzkdtz") - .withScriptArguments("oednlwglihezomuc") - .withTimeout("g")); - model = BinaryData.fromObject(model).toObject(ScriptsToExecute.class); - Assertions.assertEquals("ibniynts", model.startupScript().scriptSource()); - Assertions.assertEquals("mfmeftvhkmoo", model.startupScript().scriptData()); - Assertions.assertEquals("rh", model.startupScript().scriptArguments()); - Assertions.assertEquals("bwgmjgrul", model.startupScript().timeout()); - Assertions.assertEquals("gxhcxnwjtpfdzxco", model.creationScript().scriptSource()); - Assertions.assertEquals("fwofwakukzkdtz", model.creationScript().scriptData()); - Assertions.assertEquals("oednlwglihezomuc", model.creationScript().scriptArguments()); - Assertions.assertEquals("g", model.creationScript().timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SeasonalityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SeasonalityTests.java deleted file mode 100644 index 93d8e50a1bf8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SeasonalityTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Seasonality; - -public final class SeasonalityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Seasonality model = BinaryData.fromString("{\"mode\":\"Seasonality\"}").toObject(Seasonality.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Seasonality model = new Seasonality(); - model = BinaryData.fromObject(model).toObject(Seasonality.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessComputeSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessComputeSettingsTests.java deleted file mode 100644 index 344842593e0d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessComputeSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; -import org.junit.jupiter.api.Assertions; - -public final class ServerlessComputeSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerlessComputeSettings model = BinaryData - .fromString("{\"serverlessComputeCustomSubnet\":\"gxsabkyq\",\"serverlessComputeNoPublicIP\":false}") - .toObject(ServerlessComputeSettings.class); - Assertions.assertEquals("gxsabkyq", model.serverlessComputeCustomSubnet()); - Assertions.assertEquals(false, model.serverlessComputeNoPublicIp()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerlessComputeSettings model = new ServerlessComputeSettings().withServerlessComputeCustomSubnet("gxsabkyq") - .withServerlessComputeNoPublicIp(false); - model = BinaryData.fromObject(model).toObject(ServerlessComputeSettings.class); - Assertions.assertEquals("gxsabkyq", model.serverlessComputeCustomSubnet()); - Assertions.assertEquals(false, model.serverlessComputeNoPublicIp()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointInnerTests.java deleted file mode 100644 index f5fbd6182094..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner; -import com.azure.resourcemanager.machinelearning.models.ContentSafety; -import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.ModelSettings; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ServerlessEndpointInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerlessEndpointInner model = BinaryData.fromString( - "{\"properties\":{\"modelSettings\":{\"modelId\":\"h\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"pjtnqjilaywkdcw\",\"headers\":{\"lnkkbjpjvlywltmf\":\"yrilmhxdqaolf\",\"fnqzocr\":\"obbjwhlwy\"}},\"provisioningState\":\"Failed\",\"endpointState\":\"Suspended\",\"marketplaceSubscriptionId\":\"untgxdn\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"tiekoifuvnyttz\",\"identity\":{\"principalId\":\"7f62875c-d396-45a2-b1da-da7c4db12a89\",\"tenantId\":\"39df265d-813e-4d5e-84b3-6134ec2354fc\",\"type\":\"None\",\"userAssignedIdentities\":{\"gm\":{\"principalId\":\"a49947ca-fdaf-4604-aef9-2fd1b4656623\",\"clientId\":\"2bc9890b-220e-4d75-89d4-92a440052ecc\"},\"hlqtxnrflkn\":{\"principalId\":\"131a3a94-149d-431f-89d7-a64607ae0e41\",\"clientId\":\"3db55ce2-f3bd-45bd-9820-f0afc2c01369\"}}},\"sku\":{\"name\":\"ndpgfjodhda\",\"tier\":\"Basic\",\"size\":\"fhipx\",\"family\":\"sabvcip\",\"capacity\":1000118308},\"location\":\"fczuumljcir\",\"tags\":{\"ei\":\"fycd\"},\"id\":\"itjn\",\"name\":\"xzajlnsjhwjuyxxb\",\"type\":\"qvmvuaytuadxkxe\"}") - .toObject(ServerlessEndpointInner.class); - Assertions.assertEquals("fczuumljcir", model.location()); - Assertions.assertEquals("fycd", model.tags().get("ei")); - Assertions.assertEquals("h", model.properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.properties().authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("tiekoifuvnyttz", model.kind()); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("ndpgfjodhda", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("fhipx", model.sku().size()); - Assertions.assertEquals("sabvcip", model.sku().family()); - Assertions.assertEquals(1000118308, model.sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerlessEndpointInner model = new ServerlessEndpointInner().withLocation("fczuumljcir") - .withTags(mapOf("ei", "fycd")) - .withProperties(new ServerlessEndpointProperties().withModelSettings(new ModelSettings().withModelId("h")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety(new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED))) - .withKind("tiekoifuvnyttz") - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("gm", new UserAssignedIdentity(), "hlqtxnrflkn", new UserAssignedIdentity()))) - .withSku(new Sku().withName("ndpgfjodhda") - .withTier(SkuTier.BASIC) - .withSize("fhipx") - .withFamily("sabvcip") - .withCapacity(1000118308)); - model = BinaryData.fromObject(model).toObject(ServerlessEndpointInner.class); - Assertions.assertEquals("fczuumljcir", model.location()); - Assertions.assertEquals("fycd", model.tags().get("ei")); - Assertions.assertEquals("h", model.properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.properties().authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("tiekoifuvnyttz", model.kind()); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("ndpgfjodhda", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("fhipx", model.sku().size()); - Assertions.assertEquals("sabvcip", model.sku().family()); - Assertions.assertEquals(1000118308, model.sku().capacity()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointPropertiesTests.java deleted file mode 100644 index 48a5a7eef6df..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ContentSafety; -import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; -import com.azure.resourcemanager.machinelearning.models.ModelSettings; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode; -import org.junit.jupiter.api.Assertions; - -public final class ServerlessEndpointPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerlessEndpointProperties model = BinaryData.fromString( - "{\"modelSettings\":{\"modelId\":\"pntghyks\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"drnxsluvlzla\",\"headers\":{\"pbqhvfdqqjwkr\":\"x\"}},\"provisioningState\":\"Updating\",\"endpointState\":\"Reinstating\",\"marketplaceSubscriptionId\":\"ojisg\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}}") - .toObject(ServerlessEndpointProperties.class); - Assertions.assertEquals("pntghyks", model.modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.contentSafety().contentSafetyStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerlessEndpointProperties model - = new ServerlessEndpointProperties().withModelSettings(new ModelSettings().withModelId("pntghyks")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety(new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED)); - model = BinaryData.fromObject(model).toObject(ServerlessEndpointProperties.class); - Assertions.assertEquals("pntghyks", model.modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.contentSafety().contentSafetyStatus()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointTrackedResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointTrackedResourceArmPaginatedResultTests.java deleted file mode 100644 index 4c51ba98e8b5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointTrackedResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner; -import com.azure.resourcemanager.machinelearning.models.ContentSafety; -import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.ModelSettings; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ServerlessEndpointTrackedResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerlessEndpointTrackedResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"modelSettings\":{\"modelId\":\"vqvogf\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"wvbhlimbyq\",\"headers\":{\"ikcdrdaasax\":\"ood\"}},\"provisioningState\":\"Creating\",\"endpointState\":\"Suspended\",\"marketplaceSubscriptionId\":\"kwiy\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"ko\",\"identity\":{\"principalId\":\"14063356-96fa-45ba-8878-ff13f4524052\",\"tenantId\":\"77a755f2-7770-4ca6-9abd-449f44d7b996\",\"type\":\"None\",\"userAssignedIdentities\":{\"lnk\":{\"principalId\":\"c7f1f32f-3690-4721-bd7b-ad3e9b209cb1\",\"clientId\":\"660b2bbe-eed1-499d-807d-f4d4e01e1b62\"},\"sxvjabjqqaxuyvy\":{\"principalId\":\"ea6039e0-1d6f-436d-9837-b7fa0188de5c\",\"clientId\":\"ff04f5a9-5340-461d-8be1-947c37c924fe\"},\"udndoabhjxw\":{\"principalId\":\"9ed4a089-b353-4958-8615-103f7a62f4ac\",\"clientId\":\"3faf461d-3003-4d91-bb53-3baea908b2e6\"}}},\"sku\":{\"name\":\"weuipmpvksmi\",\"tier\":\"Premium\",\"size\":\"xtlt\",\"family\":\"krdpqgfhyrfr\",\"capacity\":1004449156},\"location\":\"d\",\"tags\":{\"ajqmat\":\"wfcmfcnr\"},\"id\":\"jti\",\"name\":\"ln\",\"type\":\"qgxxgfbb\"},{\"properties\":{\"modelSettings\":{\"modelId\":\"pqagynoiprn\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"lin\",\"headers\":{\"bmqimi\":\"qxzxaqz\",\"asvvoqsbpkfl\":\"mqruqguhfupe\",\"hdkcprgu\":\"nfkgxsyaowuzowpu\",\"ixmqrudjizcbf\":\"xrztiochlu\"}},\"provisioningState\":\"Succeeded\",\"endpointState\":\"Suspending\",\"marketplaceSubscriptionId\":\"fhi\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"fbcpaqktkrumzu\",\"identity\":{\"principalId\":\"92df8603-76c4-4be3-b906-0be862094d12\",\"tenantId\":\"abe3eb5a-5604-44a4-b322-0fada0fa3f0b\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ovqkxiu\":{\"principalId\":\"d8548fb4-6d4f-46ad-9f3d-43dc502ab8a2\",\"clientId\":\"17c480b0-1ac8-486d-945f-bd809759d2fb\"}}},\"sku\":{\"name\":\"ggvqrnhyhlwcjs\",\"tier\":\"Basic\",\"size\":\"hffbxrq\",\"family\":\"ijpeuql\",\"capacity\":236408023},\"location\":\"qztvx\",\"tags\":{\"me\":\"wmjswenaww\",\"yoeojhtollhs\":\"leqioulndh\"},\"id\":\"idmytzln\",\"name\":\"lxpnovyoanf\",\"type\":\"cswqa\"},{\"properties\":{\"modelSettings\":{\"modelId\":\"vtxigvjr\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"gaeukyawohpm\",\"headers\":{\"hsidsjtdlpbnin\":\"nucsk\",\"cpuo\":\"gazlsvbz\"}},\"provisioningState\":\"Succeeded\",\"endpointState\":\"Suspending\",\"marketplaceSubscriptionId\":\"ciklh\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"rdrenxo\",\"identity\":{\"principalId\":\"90de711a-93f1-4f44-9afc-df8d628f892a\",\"tenantId\":\"9837c157-1789-47da-b8b0-3218ae1ace1a\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"iv\":{\"principalId\":\"b85b9f19-d2be-46d0-bd5c-b52751e2627e\",\"clientId\":\"96ff4b61-596a-4aa3-9e32-6587148ed8e3\"},\"ydwbdbfgrlpunytj\":{\"principalId\":\"faa3abfe-813e-48b4-90eb-141f0b34dfe0\",\"clientId\":\"727c2538-29ea-49bb-b1f9-164ccade35e5\"}}},\"sku\":{\"name\":\"esmmpathubtahd\",\"tier\":\"Standard\",\"size\":\"iwllbvgwzsffted\",\"family\":\"snkt\",\"capacity\":1883511618},\"location\":\"avaqogfkbebau\",\"tags\":{\"tpzkgmeboywhcz\":\"btxxwpfhnjzud\",\"gqbedygi\":\"qrhm\"},\"id\":\"rzwnyk\",\"name\":\"id\",\"type\":\"chl\"},{\"properties\":{\"modelSettings\":{\"modelId\":\"wctofldseacdhz\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"brfgdrwji\",\"headers\":{\"cwv\":\"hfjsrwqrxetf\",\"dqntycnawthv\":\"r\",\"nuyeamcmhud\":\"ax\"}},\"provisioningState\":\"Failed\",\"endpointState\":\"Reinstating\",\"marketplaceSubscriptionId\":\"okwcpqtwl\",\"contentSafety\":{\"contentSafetyStatus\":\"Disabled\"}},\"kind\":\"rg\",\"identity\":{\"principalId\":\"43e56463-5899-46b6-962d-6f31f58a1909\",\"tenantId\":\"a5fff899-0096-4286-ad6c-b647d6821fe1\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"oilacidu\":{\"principalId\":\"988cb364-d0a9-42f6-b45f-c3f75f9da422\",\"clientId\":\"443617dc-222b-49c1-b7dd-935af1210df3\"},\"e\":{\"principalId\":\"333a8344-5efd-46b5-9adb-b30d6608f1a6\",\"clientId\":\"4f117368-7336-4b20-87fd-799eb0e3ce98\"}}},\"sku\":{\"name\":\"jlhwyxpzruzyt\",\"tier\":\"Premium\",\"size\":\"whbgxvellvul\",\"family\":\"d\",\"capacity\":237918150},\"location\":\"mujd\",\"tags\":{\"xfzuvrzmzqmzj\":\"clyymffhmjpddn\"},\"id\":\"rb\",\"name\":\"pv\",\"type\":\"mdyfoebojtj\"}],\"nextLink\":\"g\"}") - .toObject(ServerlessEndpointTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).location()); - Assertions.assertEquals("wfcmfcnr", model.value().get(0).tags().get("ajqmat")); - Assertions.assertEquals("vqvogf", model.value().get(0).properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.value().get(0).properties().authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, - model.value().get(0).properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("ko", model.value().get(0).kind()); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("weuipmpvksmi", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals("xtlt", model.value().get(0).sku().size()); - Assertions.assertEquals("krdpqgfhyrfr", model.value().get(0).sku().family()); - Assertions.assertEquals(1004449156, model.value().get(0).sku().capacity()); - Assertions.assertEquals("g", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerlessEndpointTrackedResourceArmPaginatedResult model - = new ServerlessEndpointTrackedResourceArmPaginatedResult() - .withValue(Arrays - .asList( - new ServerlessEndpointInner().withLocation("d") - .withTags(mapOf("ajqmat", "wfcmfcnr")) - .withProperties(new ServerlessEndpointProperties() - .withModelSettings(new ModelSettings().withModelId("vqvogf")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety( - new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED))) - .withKind("ko") - .withIdentity(new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("lnk", new UserAssignedIdentity(), "sxvjabjqqaxuyvy", - new UserAssignedIdentity(), "udndoabhjxw", new UserAssignedIdentity()))) - .withSku( - new Sku().withName("weuipmpvksmi") - .withTier(SkuTier.PREMIUM) - .withSize("xtlt") - .withFamily("krdpqgfhyrfr") - .withCapacity(1004449156)), - new ServerlessEndpointInner().withLocation("qztvx") - .withTags(mapOf("me", "wmjswenaww", "yoeojhtollhs", "leqioulndh")) - .withProperties(new ServerlessEndpointProperties() - .withModelSettings(new ModelSettings().withModelId("pqagynoiprn")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety( - new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED))) - .withKind("fbcpaqktkrumzu") - .withIdentity( - new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("ovqkxiu", new UserAssignedIdentity()))) - .withSku(new Sku() - .withName("ggvqrnhyhlwcjs") - .withTier(SkuTier.BASIC) - .withSize("hffbxrq") - .withFamily("ijpeuql") - .withCapacity(236408023)), - new ServerlessEndpointInner().withLocation("avaqogfkbebau") - .withTags(mapOf("tpzkgmeboywhcz", "btxxwpfhnjzud", "gqbedygi", "qrhm")) - .withProperties(new ServerlessEndpointProperties() - .withModelSettings(new ModelSettings().withModelId("vtxigvjr")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety( - new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED))) - .withKind("rdrenxo") - .withIdentity(new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("iv", new UserAssignedIdentity(), "ydwbdbfgrlpunytj", - new UserAssignedIdentity()))) - .withSku( - new Sku().withName("esmmpathubtahd") - .withTier(SkuTier.STANDARD) - .withSize("iwllbvgwzsffted") - .withFamily("snkt") - .withCapacity(1883511618)), - new ServerlessEndpointInner().withLocation("mujd") - .withTags(mapOf("xfzuvrzmzqmzj", "clyymffhmjpddn")) - .withProperties(new ServerlessEndpointProperties() - .withModelSettings(new ModelSettings().withModelId("wctofldseacdhz")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety( - new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.DISABLED))) - .withKind("rg") - .withIdentity( - new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf("oilacidu", new UserAssignedIdentity(), "e", new UserAssignedIdentity()))) - .withSku(new Sku().withName("jlhwyxpzruzyt") - .withTier(SkuTier.PREMIUM) - .withSize("whbgxvellvul") - .withFamily("d") - .withCapacity(237918150)))) - .withNextLink("g"); - model = BinaryData.fromObject(model).toObject(ServerlessEndpointTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).location()); - Assertions.assertEquals("wfcmfcnr", model.value().get(0).tags().get("ajqmat")); - Assertions.assertEquals("vqvogf", model.value().get(0).properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.value().get(0).properties().authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, - model.value().get(0).properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("ko", model.value().get(0).kind()); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("weuipmpvksmi", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals("xtlt", model.value().get(0).sku().size()); - Assertions.assertEquals("krdpqgfhyrfr", model.value().get(0).sku().family()); - Assertions.assertEquals(1004449156, model.value().get(0).sku().capacity()); - Assertions.assertEquals("g", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateMockTests.java deleted file mode 100644 index 72ec8c4e21f2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ContentSafety; -import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.ModelSettings; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoint; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -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 reactor.core.publisher.Mono; - -public final class ServerlessEndpointsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"modelSettings\":{\"modelId\":\"fokcbxrskylqppp\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"ikktretutsy\",\"headers\":{\"erotghxkrrpmgdol\":\"plaxxfnrltanv\"}},\"provisioningState\":\"Succeeded\",\"endpointState\":\"Suspended\",\"marketplaceSubscriptionId\":\"lavdtttydjqom\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"jqcshbypw\",\"identity\":{\"principalId\":\"37edbc76-cef9-48b9-9cc2-79608d9945c7\",\"tenantId\":\"0aced1ac-e90b-4127-8f23-14aec8e79d91\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"dmoufjuqowuicvjy\":{\"principalId\":\"71f38893-306d-4554-94d3-d704ba5e4069\",\"clientId\":\"d6c0480e-abcd-4bba-ad9c-0c48ba346fab\"},\"mleuqxhmrilwkcg\":{\"principalId\":\"36881254-7f80-4b44-8ab1-6e4042c96c90\",\"clientId\":\"d3cf50b0-d2ec-475a-a730-1ff16c1504a3\"}}},\"sku\":{\"name\":\"vpvta\",\"tier\":\"Basic\",\"size\":\"znfxdqqzikvgwqi\",\"family\":\"dhas\",\"capacity\":561322142},\"location\":\"exrzxvff\",\"tags\":{\"t\":\"tdmhr\"},\"id\":\"yulkoeps\",\"name\":\"oqdibygrqcid\",\"type\":\"wkxikxiqxlxoksy\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ServerlessEndpoint response = manager.serverlessEndpoints() - .define("szbvhxnjor") - .withRegion("xtnk") - .withExistingWorkspace("voderduabqbverb", "c") - .withProperties(new ServerlessEndpointProperties().withModelSettings(new ModelSettings().withModelId("o")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety(new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.DISABLED))) - .withTags(mapOf("rkyaovc", "dvxsgdaajlhgsuq", "taingadkrkny", "dsrxhpqlxnbd", "fgwbuxqzf", "jngdfzqcjfqm")) - .withKind("vsfgyw") - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("gmebvn", new UserAssignedIdentity(), "hdkvkqjjouh", - new UserAssignedIdentity(), "cttpcctvcjdrmkn", new UserAssignedIdentity()))) - .withSku(new Sku().withName("hvcrjqzbmyftzbx") - .withTier(SkuTier.FREE) - .withSize("rbullqnfz") - .withFamily("gursbzm") - .withCapacity(720175035)) - .create(); - - Assertions.assertEquals("exrzxvff", response.location()); - Assertions.assertEquals("tdmhr", response.tags().get("t")); - Assertions.assertEquals("fokcbxrskylqppp", response.properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, response.properties().authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, - response.properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("jqcshbypw", response.kind()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("vpvta", response.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.sku().tier()); - Assertions.assertEquals("znfxdqqzikvgwqi", response.sku().size()); - Assertions.assertEquals("dhas", response.sku().family()); - Assertions.assertEquals(561322142, response.sku().capacity()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetWithResponseMockTests.java deleted file mode 100644 index 925c9380d20b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoint; -import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServerlessEndpointsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"modelSettings\":{\"modelId\":\"brvrhwq\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"fvgbkle\",\"headers\":{\"kmtljzilkyvyblj\":\"bwhesbeb\"}},\"provisioningState\":\"Updating\",\"endpointState\":\"Unknown\",\"marketplaceSubscriptionId\":\"tzqrm\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"urkggqxqanrkh\",\"identity\":{\"principalId\":\"b488f679-4345-4c70-99bd-42bc94ad7d9b\",\"tenantId\":\"2783b33a-e7ee-4719-8d89-03bed3065258\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"cnadwrbrnt\":{\"principalId\":\"44857e84-ebd2-458e-abcc-114227837c0f\",\"clientId\":\"b08901c0-8b84-4ac2-9d28-de7bad889a23\"},\"pykrlzualsvxpol\":{\"principalId\":\"068211d5-d4d5-4c2e-abd2-175fb0f0f8d4\",\"clientId\":\"92b62b95-7e41-4f79-a8e9-79b3c6c2083a\"},\"rjmsabnmu\":{\"principalId\":\"8beb7e8f-e328-41dd-806f-e27c85a05d4a\",\"clientId\":\"55cc2c73-5cf7-43b3-ae31-45d8a531d743\"},\"hyxryvwnzhsigddg\":{\"principalId\":\"3b0ddca6-7e9c-4f83-8f7a-c7547ffc6bc8\",\"clientId\":\"58291a9e-fcf7-4633-93e8-bb3271824c25\"}}},\"sku\":{\"name\":\"nqvbnybffcvtij\",\"tier\":\"Standard\",\"size\":\"zrwpgvgogczg\",\"family\":\"o\",\"capacity\":1118835977},\"location\":\"ddgyqen\",\"tags\":{\"amlrtcbvif\":\"z\",\"xstowvgwvfv\":\"r\"},\"id\":\"qlyahlao\",\"name\":\"kcitnbuzvaxltr\",\"type\":\"nwhictsauv\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ServerlessEndpoint response = manager.serverlessEndpoints() - .getWithResponse("ysrreebj", "slbxfkiiarlldygf", "dtykhsafrfv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ddgyqen", response.location()); - Assertions.assertEquals("z", response.tags().get("amlrtcbvif")); - Assertions.assertEquals("brvrhwq", response.properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, response.properties().authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, - response.properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("urkggqxqanrkh", response.kind()); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("nqvbnybffcvtij", response.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals("zrwpgvgogczg", response.sku().size()); - Assertions.assertEquals("o", response.sku().family()); - Assertions.assertEquals(1118835977, response.sku().capacity()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListMockTests.java deleted file mode 100644 index 98c3a814def5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoint; -import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServerlessEndpointsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"modelSettings\":{\"modelId\":\"natl\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"kqzfwl\",\"headers\":{\"yyu\":\"nmgsbubzf\"}},\"provisioningState\":\"Updating\",\"endpointState\":\"Unknown\",\"marketplaceSubscriptionId\":\"rederzsnfgmohhcg\",\"contentSafety\":{\"contentSafetyStatus\":\"Disabled\"}},\"kind\":\"vvfpkymq\",\"identity\":{\"principalId\":\"41536c01-2dc8-4767-b6c8-7798b01bd9f5\",\"tenantId\":\"7da471c5-d09c-4d7d-893e-104b6de6f901\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"lboawzplwghfg\":{\"principalId\":\"ea0ea3d7-586d-4a52-9903-a19b81c3099e\",\"clientId\":\"15820477-10ab-4c98-919d-a6a1dece5bb1\"},\"rmtuprqt\":{\"principalId\":\"be36aaa0-8d81-4f60-957a-e1c7a64f7bac\",\"clientId\":\"74576f39-b12a-4b7b-afcb-2a799b711002\"},\"kohupyajkdejp\":{\"principalId\":\"f45a5de5-9558-4e2a-82a5-605e036f07e2\",\"clientId\":\"cfef6c00-90d0-41f3-ba78-acb521fbfd79\"}}},\"sku\":{\"name\":\"jvsbozfjbdyyxhj\",\"tier\":\"Free\",\"size\":\"wmrdlnbklhwrikr\",\"family\":\"j\",\"capacity\":587687819},\"location\":\"ff\",\"tags\":{\"umvbhbli\":\"yoiaobbzcdlcc\",\"x\":\"bxolzin\"},\"id\":\"fixrukwxcaagzlqo\",\"name\":\"gzgsgzlbunmjha\",\"type\":\"fiyrywf\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.serverlessEndpoints().list("fpkdsldyw", "wvswlhjlbkq", "gs", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ff", response.iterator().next().location()); - Assertions.assertEquals("yoiaobbzcdlcc", response.iterator().next().tags().get("umvbhbli")); - Assertions.assertEquals("natl", response.iterator().next().properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, - response.iterator().next().properties().authMode()); - Assertions.assertEquals(ContentSafetyStatus.DISABLED, - response.iterator().next().properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("vvfpkymq", response.iterator().next().kind()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("jvsbozfjbdyyxhj", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.iterator().next().sku().tier()); - Assertions.assertEquals("wmrdlnbklhwrikr", response.iterator().next().sku().size()); - Assertions.assertEquals("j", response.iterator().next().sku().family()); - Assertions.assertEquals(587687819, response.iterator().next().sku().capacity()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessInferenceEndpointTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessInferenceEndpointTests.java deleted file mode 100644 index e38a60175117..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessInferenceEndpointTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpoint; -import org.junit.jupiter.api.Assertions; - -public final class ServerlessInferenceEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerlessInferenceEndpoint model - = BinaryData.fromString("{\"uri\":\"tjctibpvbkaeh\",\"headers\":{\"wseivmakxh\":\"zygdfwa\"}}") - .toObject(ServerlessInferenceEndpoint.class); - Assertions.assertEquals("tjctibpvbkaeh", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerlessInferenceEndpoint model = new ServerlessInferenceEndpoint().withUri("tjctibpvbkaeh"); - model = BinaryData.fromObject(model).toObject(ServerlessInferenceEndpoint.class); - Assertions.assertEquals("tjctibpvbkaeh", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceManagedResourcesSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceManagedResourcesSettingsTests.java deleted file mode 100644 index d8c9f4d142b4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceManagedResourcesSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CosmosDbSettings; -import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; -import org.junit.jupiter.api.Assertions; - -public final class ServiceManagedResourcesSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceManagedResourcesSettings model - = BinaryData.fromString("{\"cosmosDb\":{\"collectionsThroughput\":531743918}}") - .toObject(ServiceManagedResourcesSettings.class); - Assertions.assertEquals(531743918, model.cosmosDb().collectionsThroughput()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceManagedResourcesSettings model = new ServiceManagedResourcesSettings() - .withCosmosDb(new CosmosDbSettings().withCollectionsThroughput(531743918)); - model = BinaryData.fromObject(model).toObject(ServiceManagedResourcesSettings.class); - Assertions.assertEquals(531743918, model.cosmosDb().collectionsThroughput()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagDestinationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagDestinationTests.java deleted file mode 100644 index 6a7354ae23c0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagDestinationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.RuleAction; -import com.azure.resourcemanager.machinelearning.models.ServiceTagDestination; -import org.junit.jupiter.api.Assertions; - -public final class ServiceTagDestinationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceTagDestination model = BinaryData.fromString( - "{\"action\":\"Deny\",\"addressPrefixes\":[\"cm\",\"oxfab\",\"qgpwbmwhr\",\"ali\"],\"portRanges\":\"ycgnwplrrbphc\",\"protocol\":\"bb\",\"serviceTag\":\"ticuhqvumsp\"}") - .toObject(ServiceTagDestination.class); - Assertions.assertEquals(RuleAction.DENY, model.action()); - Assertions.assertEquals("ycgnwplrrbphc", model.portRanges()); - Assertions.assertEquals("bb", model.protocol()); - Assertions.assertEquals("ticuhqvumsp", model.serviceTag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceTagDestination model = new ServiceTagDestination().withAction(RuleAction.DENY) - .withPortRanges("ycgnwplrrbphc") - .withProtocol("bb") - .withServiceTag("ticuhqvumsp"); - model = BinaryData.fromObject(model).toObject(ServiceTagDestination.class); - Assertions.assertEquals(RuleAction.DENY, model.action()); - Assertions.assertEquals("ycgnwplrrbphc", model.portRanges()); - Assertions.assertEquals("bb", model.protocol()); - Assertions.assertEquals("ticuhqvumsp", model.serviceTag()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagOutboundRuleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagOutboundRuleTests.java deleted file mode 100644 index 551a1e363041..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagOutboundRuleTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.RuleAction; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import com.azure.resourcemanager.machinelearning.models.ServiceTagDestination; -import com.azure.resourcemanager.machinelearning.models.ServiceTagOutboundRule; -import org.junit.jupiter.api.Assertions; - -public final class ServiceTagOutboundRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceTagOutboundRule model = BinaryData.fromString( - "{\"type\":\"ServiceTag\",\"destination\":{\"action\":\"Allow\",\"addressPrefixes\":[\"ijzzcaoijolbuauk\",\"wieopexelxqdw\"],\"portRanges\":\"wyil\",\"protocol\":\"ibkgxyxyau\",\"serviceTag\":\"eddobmcnltm\"},\"category\":\"UserDefined\",\"status\":\"Inactive\"}") - .toObject(ServiceTagOutboundRule.class); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.status()); - Assertions.assertEquals(RuleAction.ALLOW, model.destination().action()); - Assertions.assertEquals("wyil", model.destination().portRanges()); - Assertions.assertEquals("ibkgxyxyau", model.destination().protocol()); - Assertions.assertEquals("eddobmcnltm", model.destination().serviceTag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceTagOutboundRule model = new ServiceTagOutboundRule().withCategory(RuleCategory.USER_DEFINED) - .withStatus(RuleStatus.INACTIVE) - .withDestination(new ServiceTagDestination().withAction(RuleAction.ALLOW) - .withPortRanges("wyil") - .withProtocol("ibkgxyxyau") - .withServiceTag("eddobmcnltm")); - model = BinaryData.fromObject(model).toObject(ServiceTagOutboundRule.class); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.status()); - Assertions.assertEquals(RuleAction.ALLOW, model.destination().action()); - Assertions.assertEquals("wyil", model.destination().portRanges()); - Assertions.assertEquals("ibkgxyxyau", model.destination().protocol()); - Assertions.assertEquals("eddobmcnltm", model.destination().serviceTag()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SetupScriptsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SetupScriptsTests.java deleted file mode 100644 index 66d203fa9cf2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SetupScriptsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScriptReference; -import com.azure.resourcemanager.machinelearning.models.ScriptsToExecute; -import com.azure.resourcemanager.machinelearning.models.SetupScripts; -import org.junit.jupiter.api.Assertions; - -public final class SetupScriptsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SetupScripts model = BinaryData.fromString( - "{\"scripts\":{\"startupScript\":{\"scriptSource\":\"awmpjprd\",\"scriptData\":\"rpcfpcfjfwzl\",\"scriptArguments\":\"awkgy\",\"timeout\":\"eyam\"},\"creationScript\":{\"scriptSource\":\"dmdiawpzxkzrntm\",\"scriptData\":\"tdhuo\",\"scriptArguments\":\"wqpsqaz\",\"timeout\":\"qodvqgcnbhcbmj\"}}}") - .toObject(SetupScripts.class); - Assertions.assertEquals("awmpjprd", model.scripts().startupScript().scriptSource()); - Assertions.assertEquals("rpcfpcfjfwzl", model.scripts().startupScript().scriptData()); - Assertions.assertEquals("awkgy", model.scripts().startupScript().scriptArguments()); - Assertions.assertEquals("eyam", model.scripts().startupScript().timeout()); - Assertions.assertEquals("dmdiawpzxkzrntm", model.scripts().creationScript().scriptSource()); - Assertions.assertEquals("tdhuo", model.scripts().creationScript().scriptData()); - Assertions.assertEquals("wqpsqaz", model.scripts().creationScript().scriptArguments()); - Assertions.assertEquals("qodvqgcnbhcbmj", model.scripts().creationScript().timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SetupScripts model = new SetupScripts().withScripts(new ScriptsToExecute() - .withStartupScript(new ScriptReference().withScriptSource("awmpjprd") - .withScriptData("rpcfpcfjfwzl") - .withScriptArguments("awkgy") - .withTimeout("eyam")) - .withCreationScript(new ScriptReference().withScriptSource("dmdiawpzxkzrntm") - .withScriptData("tdhuo") - .withScriptArguments("wqpsqaz") - .withTimeout("qodvqgcnbhcbmj"))); - model = BinaryData.fromObject(model).toObject(SetupScripts.class); - Assertions.assertEquals("awmpjprd", model.scripts().startupScript().scriptSource()); - Assertions.assertEquals("rpcfpcfjfwzl", model.scripts().startupScript().scriptData()); - Assertions.assertEquals("awkgy", model.scripts().startupScript().scriptArguments()); - Assertions.assertEquals("eyam", model.scripts().startupScript().timeout()); - Assertions.assertEquals("dmdiawpzxkzrntm", model.scripts().creationScript().scriptSource()); - Assertions.assertEquals("tdhuo", model.scripts().creationScript().scriptData()); - Assertions.assertEquals("wqpsqaz", model.scripts().creationScript().scriptArguments()); - Assertions.assertEquals("qodvqgcnbhcbmj", model.scripts().creationScript().timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourcePropertyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourcePropertyTests.java deleted file mode 100644 index 78eb7cfd165b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourcePropertyTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.SharedPrivateLinkResourceProperty; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; - -public final class SharedPrivateLinkResourcePropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SharedPrivateLinkResourceProperty model = BinaryData.fromString( - "{\"privateLinkResourceId\":\"tqxhocdgeab\",\"groupId\":\"phut\",\"requestMessage\":\"ndv\",\"status\":\"Rejected\"}") - .toObject(SharedPrivateLinkResourceProperty.class); - Assertions.assertEquals("tqxhocdgeab", model.privateLinkResourceId()); - Assertions.assertEquals("phut", model.groupId()); - Assertions.assertEquals("ndv", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SharedPrivateLinkResourceProperty model - = new SharedPrivateLinkResourceProperty().withPrivateLinkResourceId("tqxhocdgeab") - .withGroupId("phut") - .withRequestMessage("ndv") - .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED); - model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResourceProperty.class); - Assertions.assertEquals("tqxhocdgeab", model.privateLinkResourceId()); - Assertions.assertEquals("phut", model.groupId()); - Assertions.assertEquals("ndv", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourceTests.java deleted file mode 100644 index 08e67b66961b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourceTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; -import org.junit.jupiter.api.Assertions; - -public final class SharedPrivateLinkResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SharedPrivateLinkResource model = BinaryData.fromString( - "{\"name\":\"itcjczdz\",\"properties\":{\"privateLinkResourceId\":\"dhkrwpdappdsbdk\",\"groupId\":\"rwjfe\",\"requestMessage\":\"nhutjeltmrldhugj\",\"status\":\"Approved\"}}") - .toObject(SharedPrivateLinkResource.class); - Assertions.assertEquals("itcjczdz", model.name()); - Assertions.assertEquals("dhkrwpdappdsbdk", model.privateLinkResourceId()); - Assertions.assertEquals("rwjfe", model.groupId()); - Assertions.assertEquals("nhutjeltmrldhugj", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SharedPrivateLinkResource model = new SharedPrivateLinkResource().withName("itcjczdz") - .withPrivateLinkResourceId("dhkrwpdappdsbdk") - .withGroupId("rwjfe") - .withRequestMessage("nhutjeltmrldhugj") - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED); - model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResource.class); - Assertions.assertEquals("itcjczdz", model.name()); - Assertions.assertEquals("dhkrwpdappdsbdk", model.privateLinkResourceId()); - Assertions.assertEquals("rwjfe", model.groupId()); - Assertions.assertEquals("nhutjeltmrldhugj", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuCapacityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuCapacityTests.java deleted file mode 100644 index 9eea4170cc87..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuCapacityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SkuCapacity; -import com.azure.resourcemanager.machinelearning.models.SkuScaleType; -import org.junit.jupiter.api.Assertions; - -public final class SkuCapacityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuCapacity model = BinaryData - .fromString("{\"minimum\":114097957,\"maximum\":1718972803,\"default\":133055758,\"scaleType\":\"Manual\"}") - .toObject(SkuCapacity.class); - Assertions.assertEquals(114097957, model.minimum()); - Assertions.assertEquals(1718972803, model.maximum()); - Assertions.assertEquals(133055758, model.defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.scaleType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuCapacity model = new SkuCapacity().withMinimum(114097957) - .withMaximum(1718972803) - .withDefaultProperty(133055758) - .withScaleType(SkuScaleType.MANUAL); - model = BinaryData.fromObject(model).toObject(SkuCapacity.class); - Assertions.assertEquals(114097957, model.minimum()); - Assertions.assertEquals(1718972803, model.maximum()); - Assertions.assertEquals(133055758, model.defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.scaleType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceArmPaginatedResultTests.java deleted file mode 100644 index 9cf2dc95ea0c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.machinelearning.models.SkuCapacity; -import com.azure.resourcemanager.machinelearning.models.SkuResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.SkuScaleType; -import com.azure.resourcemanager.machinelearning.models.SkuSetting; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SkuResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"resourceType\":\"rra\",\"sku\":{\"name\":\"ekcsueh\",\"tier\":\"Premium\"},\"capacity\":{\"minimum\":942478708,\"maximum\":2130219210,\"default\":414889103,\"scaleType\":\"Automatic\"}}],\"nextLink\":\"qidywmh\"}") - .toObject(SkuResourceArmPaginatedResult.class); - Assertions.assertEquals("ekcsueh", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals(942478708, model.value().get(0).capacity().minimum()); - Assertions.assertEquals(2130219210, model.value().get(0).capacity().maximum()); - Assertions.assertEquals(414889103, model.value().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, model.value().get(0).capacity().scaleType()); - Assertions.assertEquals("qidywmh", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuResourceArmPaginatedResult model = new SkuResourceArmPaginatedResult().withValue( - Arrays.asList(new SkuResourceInner().withSku(new SkuSetting().withName("ekcsueh").withTier(SkuTier.PREMIUM)) - .withCapacity(new SkuCapacity().withMinimum(942478708) - .withMaximum(2130219210) - .withDefaultProperty(414889103) - .withScaleType(SkuScaleType.AUTOMATIC)))) - .withNextLink("qidywmh"); - model = BinaryData.fromObject(model).toObject(SkuResourceArmPaginatedResult.class); - Assertions.assertEquals("ekcsueh", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals(942478708, model.value().get(0).capacity().minimum()); - Assertions.assertEquals(2130219210, model.value().get(0).capacity().maximum()); - Assertions.assertEquals(414889103, model.value().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, model.value().get(0).capacity().scaleType()); - Assertions.assertEquals("qidywmh", model.nextLink()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceInnerTests.java deleted file mode 100644 index 50b0ce32f4e2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.machinelearning.models.SkuCapacity; -import com.azure.resourcemanager.machinelearning.models.SkuScaleType; -import com.azure.resourcemanager.machinelearning.models.SkuSetting; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class SkuResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuResourceInner model = BinaryData.fromString( - "{\"resourceType\":\"tyrilkfbnrqqxvz\",\"sku\":{\"name\":\"bnfnqtxjtoma\",\"tier\":\"Standard\"},\"capacity\":{\"minimum\":1063969738,\"maximum\":1165250795,\"default\":574415772,\"scaleType\":\"Manual\"}}") - .toObject(SkuResourceInner.class); - Assertions.assertEquals("bnfnqtxjtoma", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals(1063969738, model.capacity().minimum()); - Assertions.assertEquals(1165250795, model.capacity().maximum()); - Assertions.assertEquals(574415772, model.capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.capacity().scaleType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuResourceInner model - = new SkuResourceInner().withSku(new SkuSetting().withName("bnfnqtxjtoma").withTier(SkuTier.STANDARD)) - .withCapacity(new SkuCapacity().withMinimum(1063969738) - .withMaximum(1165250795) - .withDefaultProperty(574415772) - .withScaleType(SkuScaleType.MANUAL)); - model = BinaryData.fromObject(model).toObject(SkuResourceInner.class); - Assertions.assertEquals("bnfnqtxjtoma", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals(1063969738, model.capacity().minimum()); - Assertions.assertEquals(1165250795, model.capacity().maximum()); - Assertions.assertEquals(574415772, model.capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.capacity().scaleType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuSettingTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuSettingTests.java deleted file mode 100644 index 01edc09634c2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuSettingTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SkuSetting; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class SkuSettingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuSetting model - = BinaryData.fromString("{\"name\":\"wqjnsfzygleexa\",\"tier\":\"Basic\"}").toObject(SkuSetting.class); - Assertions.assertEquals("wqjnsfzygleexa", model.name()); - Assertions.assertEquals(SkuTier.BASIC, model.tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuSetting model = new SkuSetting().withName("wqjnsfzygleexa").withTier(SkuTier.BASIC); - model = BinaryData.fromObject(model).toObject(SkuSetting.class); - Assertions.assertEquals("wqjnsfzygleexa", model.name()); - Assertions.assertEquals(SkuTier.BASIC, model.tier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuTests.java deleted file mode 100644 index e98948b22eb8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class SkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Sku model = BinaryData.fromString( - "{\"name\":\"bnjbiksqrglssain\",\"tier\":\"Standard\",\"size\":\"nzl\",\"family\":\"fmppe\",\"capacity\":1862600222}") - .toObject(Sku.class); - Assertions.assertEquals("bnjbiksqrglssain", model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("nzl", model.size()); - Assertions.assertEquals("fmppe", model.family()); - Assertions.assertEquals(1862600222, model.capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Sku model = new Sku().withName("bnjbiksqrglssain") - .withTier(SkuTier.STANDARD) - .withSize("nzl") - .withFamily("fmppe") - .withCapacity(1862600222); - model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("bnjbiksqrglssain", model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("nzl", model.size()); - Assertions.assertEquals("fmppe", model.family()); - Assertions.assertEquals(1862600222, model.capacity()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobEntryTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobEntryTests.java deleted file mode 100644 index 4a6f9c32b63d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobEntryTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SparkJobEntry; - -public final class SparkJobEntryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkJobEntry model - = BinaryData.fromString("{\"sparkJobEntryType\":\"SparkJobEntry\"}").toObject(SparkJobEntry.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkJobEntry model = new SparkJobEntry(); - model = BinaryData.fromObject(model).toObject(SparkJobEntry.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobPythonEntryTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobPythonEntryTests.java deleted file mode 100644 index 11fff316f12e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobPythonEntryTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SparkJobPythonEntry; -import org.junit.jupiter.api.Assertions; - -public final class SparkJobPythonEntryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkJobPythonEntry model - = BinaryData.fromString("{\"sparkJobEntryType\":\"SparkJobPythonEntry\",\"file\":\"qt\"}") - .toObject(SparkJobPythonEntry.class); - Assertions.assertEquals("qt", model.file()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkJobPythonEntry model = new SparkJobPythonEntry().withFile("qt"); - model = BinaryData.fromObject(model).toObject(SparkJobPythonEntry.class); - Assertions.assertEquals("qt", model.file()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobScalaEntryTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobScalaEntryTests.java deleted file mode 100644 index 242c47ddafac..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobScalaEntryTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SparkJobScalaEntry; -import org.junit.jupiter.api.Assertions; - -public final class SparkJobScalaEntryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkJobScalaEntry model - = BinaryData.fromString("{\"sparkJobEntryType\":\"SparkJobScalaEntry\",\"className\":\"fkvuozb\"}") - .toObject(SparkJobScalaEntry.class); - Assertions.assertEquals("fkvuozb", model.className()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkJobScalaEntry model = new SparkJobScalaEntry().withClassName("fkvuozb"); - model = BinaryData.fromObject(model).toObject(SparkJobScalaEntry.class); - Assertions.assertEquals("fkvuozb", model.className()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkResourceConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkResourceConfigurationTests.java deleted file mode 100644 index 7f9ce92ed454..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkResourceConfigurationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SparkResourceConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class SparkResourceConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkResourceConfiguration model - = BinaryData.fromString("{\"instanceType\":\"tnhrevimxmaxcj\",\"runtimeVersion\":\"itygvdwds\"}") - .toObject(SparkResourceConfiguration.class); - Assertions.assertEquals("tnhrevimxmaxcj", model.instanceType()); - Assertions.assertEquals("itygvdwds", model.runtimeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkResourceConfiguration model - = new SparkResourceConfiguration().withInstanceType("tnhrevimxmaxcj").withRuntimeVersion("itygvdwds"); - model = BinaryData.fromObject(model).toObject(SparkResourceConfiguration.class); - Assertions.assertEquals("tnhrevimxmaxcj", model.instanceType()); - Assertions.assertEquals("itygvdwds", model.runtimeVersion()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StackEnsembleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StackEnsembleSettingsTests.java deleted file mode 100644 index 7feeef04c75c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StackEnsembleSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import org.junit.jupiter.api.Assertions; - -public final class StackEnsembleSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StackEnsembleSettings model = BinaryData.fromString( - "{\"stackMetaLearnerType\":\"LinearRegression\",\"stackMetaLearnerTrainPercentage\":69.9155023159612,\"stackMetaLearnerKWargs\":\"dataygta\"}") - .toObject(StackEnsembleSettings.class); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, model.stackMetaLearnerType()); - Assertions.assertEquals(69.9155023159612D, model.stackMetaLearnerTrainPercentage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StackEnsembleSettings model - = new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LINEAR_REGRESSION) - .withStackMetaLearnerTrainPercentage(69.9155023159612D) - .withStackMetaLearnerKWargs("dataygta"); - model = BinaryData.fromObject(model).toObject(StackEnsembleSettings.class); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, model.stackMetaLearnerType()); - Assertions.assertEquals(69.9155023159612D, model.stackMetaLearnerTrainPercentage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StaticInputDataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StaticInputDataTests.java deleted file mode 100644 index ea05f46805b7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StaticInputDataTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobInputType; -import com.azure.resourcemanager.machinelearning.models.StaticInputData; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class StaticInputDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StaticInputData model = BinaryData.fromString( - "{\"inputDataType\":\"Static\",\"windowStart\":\"2021-07-21T17:55:57Z\",\"windowEnd\":\"2021-02-10T17:01:52Z\",\"preprocessingComponentId\":\"qekwanklpurl\",\"dataContext\":\"djh\",\"jobInputType\":\"mlflow_model\",\"uri\":\"jse\",\"columns\":{\"urdon\":\"yn\",\"swknpdrgn\":\"gobxblrdolen\",\"fqckie\":\"zaofro\",\"jyoybkqftusdw\":\"yr\"}}") - .toObject(StaticInputData.class); - Assertions.assertEquals("djh", model.dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.jobInputType()); - Assertions.assertEquals("jse", model.uri()); - Assertions.assertEquals("yn", model.columns().get("urdon")); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T17:55:57Z"), model.windowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-10T17:01:52Z"), model.windowEnd()); - Assertions.assertEquals("qekwanklpurl", model.preprocessingComponentId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StaticInputData model = new StaticInputData().withDataContext("djh") - .withJobInputType(JobInputType.MLFLOW_MODEL) - .withUri("jse") - .withColumns(mapOf("urdon", "yn", "swknpdrgn", "gobxblrdolen", "fqckie", "zaofro", "jyoybkqftusdw", "yr")) - .withWindowStart(OffsetDateTime.parse("2021-07-21T17:55:57Z")) - .withWindowEnd(OffsetDateTime.parse("2021-02-10T17:01:52Z")) - .withPreprocessingComponentId("qekwanklpurl"); - model = BinaryData.fromObject(model).toObject(StaticInputData.class); - Assertions.assertEquals("djh", model.dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.jobInputType()); - Assertions.assertEquals("jse", model.uri()); - Assertions.assertEquals("yn", model.columns().get("urdon")); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T17:55:57Z"), model.windowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-10T17:01:52Z"), model.windowEnd()); - Assertions.assertEquals("qekwanklpurl", model.preprocessingComponentId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StorageAccountDetailsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StorageAccountDetailsTests.java deleted file mode 100644 index b65a9f0c8efd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StorageAccountDetailsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; -import org.junit.jupiter.api.Assertions; - -public final class StorageAccountDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageAccountDetails model = BinaryData.fromString( - "{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{\"resourceId\":\"ibz\"},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"ee\",\"storageAccountType\":\"ph\"},\"userCreatedStorageAccount\":{\"armResourceId\":{\"resourceId\":\"jw\"}}}") - .toObject(StorageAccountDetails.class); - Assertions.assertEquals(false, model.systemCreatedStorageAccount().allowBlobPublicAccess()); - Assertions.assertEquals("ibz", model.systemCreatedStorageAccount().armResourceId().resourceId()); - Assertions.assertEquals(false, model.systemCreatedStorageAccount().storageAccountHnsEnabled()); - Assertions.assertEquals("ee", model.systemCreatedStorageAccount().storageAccountName()); - Assertions.assertEquals("ph", model.systemCreatedStorageAccount().storageAccountType()); - Assertions.assertEquals("jw", model.userCreatedStorageAccount().armResourceId().resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageAccountDetails model = new StorageAccountDetails() - .withSystemCreatedStorageAccount(new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId().withResourceId("ibz")) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("ee") - .withStorageAccountType("ph")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId().withResourceId("jw"))); - model = BinaryData.fromObject(model).toObject(StorageAccountDetails.class); - Assertions.assertEquals(false, model.systemCreatedStorageAccount().allowBlobPublicAccess()); - Assertions.assertEquals("ibz", model.systemCreatedStorageAccount().armResourceId().resourceId()); - Assertions.assertEquals(false, model.systemCreatedStorageAccount().storageAccountHnsEnabled()); - Assertions.assertEquals("ee", model.systemCreatedStorageAccount().storageAccountName()); - Assertions.assertEquals("ph", model.systemCreatedStorageAccount().storageAccountType()); - Assertions.assertEquals("jw", model.userCreatedStorageAccount().armResourceId().resourceId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SweepJobLimitsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SweepJobLimitsTests.java deleted file mode 100644 index 98fc1f7a1a40..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SweepJobLimitsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SweepJobLimits; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class SweepJobLimitsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SweepJobLimits model = BinaryData.fromString( - "{\"jobLimitsType\":\"Sweep\",\"maxTotalTrials\":1216231012,\"maxConcurrentTrials\":734824046,\"trialTimeout\":\"PT31H24M17S\",\"timeout\":\"PT39H5M12S\"}") - .toObject(SweepJobLimits.class); - Assertions.assertEquals(Duration.parse("PT39H5M12S"), model.timeout()); - Assertions.assertEquals(1216231012, model.maxTotalTrials()); - Assertions.assertEquals(734824046, model.maxConcurrentTrials()); - Assertions.assertEquals(Duration.parse("PT31H24M17S"), model.trialTimeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SweepJobLimits model = new SweepJobLimits().withTimeout(Duration.parse("PT39H5M12S")) - .withMaxTotalTrials(1216231012) - .withMaxConcurrentTrials(734824046) - .withTrialTimeout(Duration.parse("PT31H24M17S")); - model = BinaryData.fromObject(model).toObject(SweepJobLimits.class); - Assertions.assertEquals(Duration.parse("PT39H5M12S"), model.timeout()); - Assertions.assertEquals(1216231012, model.maxTotalTrials()); - Assertions.assertEquals(734824046, model.maxConcurrentTrials()); - Assertions.assertEquals(Duration.parse("PT31H24M17S"), model.trialTimeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkPropertiesTests.java deleted file mode 100644 index 4df91076ea92..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoPauseProperties; -import com.azure.resourcemanager.machinelearning.models.AutoScaleProperties; -import com.azure.resourcemanager.machinelearning.models.SynapseSparkProperties; -import org.junit.jupiter.api.Assertions; - -public final class SynapseSparkPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SynapseSparkProperties model = BinaryData.fromString( - "{\"autoScaleProperties\":{\"minNodeCount\":217576922,\"enabled\":true,\"maxNodeCount\":1065975774},\"autoPauseProperties\":{\"delayInMinutes\":1088502083,\"enabled\":false},\"sparkVersion\":\"rncmazdfsqxh\",\"nodeCount\":982275641,\"nodeSize\":\"ejparn\",\"nodeSizeFamily\":\"grszrbwtdrcwg\",\"subscriptionId\":\"ll\",\"resourceGroup\":\"lhhfi\",\"workspaceName\":\"cfculzj\",\"poolName\":\"hp\"}") - .toObject(SynapseSparkProperties.class); - Assertions.assertEquals(217576922, model.autoScaleProperties().minNodeCount()); - Assertions.assertEquals(true, model.autoScaleProperties().enabled()); - Assertions.assertEquals(1065975774, model.autoScaleProperties().maxNodeCount()); - Assertions.assertEquals(1088502083, model.autoPauseProperties().delayInMinutes()); - Assertions.assertEquals(false, model.autoPauseProperties().enabled()); - Assertions.assertEquals("rncmazdfsqxh", model.sparkVersion()); - Assertions.assertEquals(982275641, model.nodeCount()); - Assertions.assertEquals("ejparn", model.nodeSize()); - Assertions.assertEquals("grszrbwtdrcwg", model.nodeSizeFamily()); - Assertions.assertEquals("ll", model.subscriptionId()); - Assertions.assertEquals("lhhfi", model.resourceGroup()); - Assertions.assertEquals("cfculzj", model.workspaceName()); - Assertions.assertEquals("hp", model.poolName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SynapseSparkProperties model = new SynapseSparkProperties() - .withAutoScaleProperties( - new AutoScaleProperties().withMinNodeCount(217576922).withEnabled(true).withMaxNodeCount(1065975774)) - .withAutoPauseProperties(new AutoPauseProperties().withDelayInMinutes(1088502083).withEnabled(false)) - .withSparkVersion("rncmazdfsqxh") - .withNodeCount(982275641) - .withNodeSize("ejparn") - .withNodeSizeFamily("grszrbwtdrcwg") - .withSubscriptionId("ll") - .withResourceGroup("lhhfi") - .withWorkspaceName("cfculzj") - .withPoolName("hp"); - model = BinaryData.fromObject(model).toObject(SynapseSparkProperties.class); - Assertions.assertEquals(217576922, model.autoScaleProperties().minNodeCount()); - Assertions.assertEquals(true, model.autoScaleProperties().enabled()); - Assertions.assertEquals(1065975774, model.autoScaleProperties().maxNodeCount()); - Assertions.assertEquals(1088502083, model.autoPauseProperties().delayInMinutes()); - Assertions.assertEquals(false, model.autoPauseProperties().enabled()); - Assertions.assertEquals("rncmazdfsqxh", model.sparkVersion()); - Assertions.assertEquals(982275641, model.nodeCount()); - Assertions.assertEquals("ejparn", model.nodeSize()); - Assertions.assertEquals("grszrbwtdrcwg", model.nodeSizeFamily()); - Assertions.assertEquals("ll", model.subscriptionId()); - Assertions.assertEquals("lhhfi", model.resourceGroup()); - Assertions.assertEquals("cfculzj", model.workspaceName()); - Assertions.assertEquals("hp", model.poolName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedAcrAccountTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedAcrAccountTests.java deleted file mode 100644 index a844ebf3f256..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedAcrAccountTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; -import org.junit.jupiter.api.Assertions; - -public final class SystemCreatedAcrAccountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SystemCreatedAcrAccount model = BinaryData.fromString( - "{\"acrAccountName\":\"cwmbupyvqyvli\",\"acrAccountSku\":\"ipsejbsvsia\",\"armResourceId\":{\"resourceId\":\"whddzydisnuepyw\"}}") - .toObject(SystemCreatedAcrAccount.class); - Assertions.assertEquals("cwmbupyvqyvli", model.acrAccountName()); - Assertions.assertEquals("ipsejbsvsia", model.acrAccountSku()); - Assertions.assertEquals("whddzydisnuepyw", model.armResourceId().resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SystemCreatedAcrAccount model = new SystemCreatedAcrAccount().withAcrAccountName("cwmbupyvqyvli") - .withAcrAccountSku("ipsejbsvsia") - .withArmResourceId(new ArmResourceId().withResourceId("whddzydisnuepyw")); - model = BinaryData.fromObject(model).toObject(SystemCreatedAcrAccount.class); - Assertions.assertEquals("cwmbupyvqyvli", model.acrAccountName()); - Assertions.assertEquals("ipsejbsvsia", model.acrAccountSku()); - Assertions.assertEquals("whddzydisnuepyw", model.armResourceId().resourceId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedStorageAccountTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedStorageAccountTests.java deleted file mode 100644 index 7a41b4a1f727..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedStorageAccountTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; -import org.junit.jupiter.api.Assertions; - -public final class SystemCreatedStorageAccountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SystemCreatedStorageAccount model = BinaryData.fromString( - "{\"allowBlobPublicAccess\":true,\"armResourceId\":{\"resourceId\":\"ratjhdhzybspij\"},\"storageAccountHnsEnabled\":true,\"storageAccountName\":\"gdkkagvwukh\",\"storageAccountType\":\"s\"}") - .toObject(SystemCreatedStorageAccount.class); - Assertions.assertEquals(true, model.allowBlobPublicAccess()); - Assertions.assertEquals("ratjhdhzybspij", model.armResourceId().resourceId()); - Assertions.assertEquals(true, model.storageAccountHnsEnabled()); - Assertions.assertEquals("gdkkagvwukh", model.storageAccountName()); - Assertions.assertEquals("s", model.storageAccountType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SystemCreatedStorageAccount model = new SystemCreatedStorageAccount().withAllowBlobPublicAccess(true) - .withArmResourceId(new ArmResourceId().withResourceId("ratjhdhzybspij")) - .withStorageAccountHnsEnabled(true) - .withStorageAccountName("gdkkagvwukh") - .withStorageAccountType("s"); - model = BinaryData.fromObject(model).toObject(SystemCreatedStorageAccount.class); - Assertions.assertEquals(true, model.allowBlobPublicAccess()); - Assertions.assertEquals("ratjhdhzybspij", model.armResourceId().resourceId()); - Assertions.assertEquals(true, model.storageAccountHnsEnabled()); - Assertions.assertEquals("gdkkagvwukh", model.storageAccountName()); - Assertions.assertEquals("s", model.storageAccountType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemServiceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemServiceTests.java deleted file mode 100644 index 678383993288..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemServiceTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SystemService; - -public final class SystemServiceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SystemService model = BinaryData - .fromString( - "{\"systemServiceType\":\"lpzbtzuykykipf\",\"publicIpAddress\":\"yepfn\",\"version\":\"mbezacfpztg\"}") - .toObject(SystemService.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SystemService model = new SystemService(); - model = BinaryData.fromObject(model).toObject(SystemService.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalFeaturizationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalFeaturizationSettingsTests.java deleted file mode 100644 index 1cf5c12b64a4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalFeaturizationSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BlockedTransformers; -import com.azure.resourcemanager.machinelearning.models.ColumnTransformer; -import com.azure.resourcemanager.machinelearning.models.FeaturizationMode; -import com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TableVerticalFeaturizationSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TableVerticalFeaturizationSettings model = BinaryData.fromString( - "{\"mode\":\"Off\",\"blockedTransformers\":[\"LabelEncoder\"],\"columnNameAndTypes\":{\"klkqnqvkixnmb\":\"ujcyohigimwdc\",\"zayspzvriet\":\"mecuyrzwim\"},\"transformerParams\":{\"smcwoxfaxd\":[{\"fields\":[\"zxplgtpvdvatlz\",\"gschnzrsbk\"],\"parameters\":\"dataovlzdm\"},{\"fields\":[\"fwsx\",\"fo\",\"uworimmov\"],\"parameters\":\"datade\"},{\"fields\":[\"mvhzfovanyrvaprt\",\"elgwewi\"],\"parameters\":\"datayaqandmymnqoqju\"},{\"fields\":[\"sfbpbvzop\",\"x\"],\"parameters\":\"datam\"}],\"riwmmtmqrxrzqv\":[{\"fields\":[\"fbsatroi\"],\"parameters\":\"dataesugmocpcjycbo\"},{\"fields\":[\"gttwfldsi\",\"or\"],\"parameters\":\"dataikcedpk\"}],\"laetscflwtjdtlr\":[{\"fields\":[\"yayub\",\"g\",\"bxiqahragpxmibpl\"],\"parameters\":\"datapoyryefqmwovyzt\"},{\"fields\":[\"omfpb\",\"ceeg\",\"yieztkutnjil\",\"ukkrehyh\"],\"parameters\":\"datajoduifvulxfaryrv\"},{\"fields\":[\"dezvjqw\",\"hoyiyaxqvjweiw\",\"czkddn\"],\"parameters\":\"datavbooqbmdqrxy\"}]},\"enableDnnFeaturization\":false,\"datasetLanguage\":\"oyycuxdtz\"}") - .toObject(TableVerticalFeaturizationSettings.class); - Assertions.assertEquals("oyycuxdtz", model.datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.OFF, model.mode()); - Assertions.assertEquals(BlockedTransformers.LABEL_ENCODER, model.blockedTransformers().get(0)); - Assertions.assertEquals("ujcyohigimwdc", model.columnNameAndTypes().get("klkqnqvkixnmb")); - Assertions.assertEquals("zxplgtpvdvatlz", model.transformerParams().get("smcwoxfaxd").get(0).fields().get(0)); - Assertions.assertEquals(false, model.enableDnnFeaturization()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TableVerticalFeaturizationSettings model = new TableVerticalFeaturizationSettings() - .withDatasetLanguage("oyycuxdtz") - .withMode(FeaturizationMode.OFF) - .withBlockedTransformers(Arrays.asList(BlockedTransformers.LABEL_ENCODER)) - .withColumnNameAndTypes(mapOf("klkqnqvkixnmb", "ujcyohigimwdc", "zayspzvriet", "mecuyrzwim")) - .withTransformerParams(mapOf("smcwoxfaxd", Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("zxplgtpvdvatlz", "gschnzrsbk")) - .withParameters("dataovlzdm"), - new ColumnTransformer().withFields(Arrays.asList("fwsx", "fo", "uworimmov")).withParameters("datade"), - new ColumnTransformer().withFields(Arrays.asList("mvhzfovanyrvaprt", "elgwewi")) - .withParameters("datayaqandmymnqoqju"), - new ColumnTransformer().withFields(Arrays.asList("sfbpbvzop", "x")).withParameters("datam")), - "riwmmtmqrxrzqv", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("fbsatroi")).withParameters("dataesugmocpcjycbo"), - new ColumnTransformer().withFields(Arrays.asList("gttwfldsi", "or")).withParameters("dataikcedpk")), - "laetscflwtjdtlr", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("yayub", "g", "bxiqahragpxmibpl")) - .withParameters("datapoyryefqmwovyzt"), - new ColumnTransformer().withFields(Arrays.asList("omfpb", "ceeg", "yieztkutnjil", "ukkrehyh")) - .withParameters("datajoduifvulxfaryrv"), - new ColumnTransformer().withFields(Arrays.asList("dezvjqw", "hoyiyaxqvjweiw", "czkddn")) - .withParameters("datavbooqbmdqrxy")))) - .withEnableDnnFeaturization(false); - model = BinaryData.fromObject(model).toObject(TableVerticalFeaturizationSettings.class); - Assertions.assertEquals("oyycuxdtz", model.datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.OFF, model.mode()); - Assertions.assertEquals(BlockedTransformers.LABEL_ENCODER, model.blockedTransformers().get(0)); - Assertions.assertEquals("ujcyohigimwdc", model.columnNameAndTypes().get("klkqnqvkixnmb")); - Assertions.assertEquals("zxplgtpvdvatlz", model.transformerParams().get("smcwoxfaxd").get(0).fields().get(0)); - Assertions.assertEquals(false, model.enableDnnFeaturization()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalLimitSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalLimitSettingsTests.java deleted file mode 100644 index 2057d2c563c9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalLimitSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TableVerticalLimitSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TableVerticalLimitSettings model = BinaryData.fromString( - "{\"maxTrials\":1966845044,\"trialTimeout\":\"PT99H7M46S\",\"timeout\":\"PT45H54M58S\",\"maxConcurrentTrials\":595135013,\"maxCoresPerTrial\":1991622972,\"exitScore\":96.52498690136247,\"enableEarlyTermination\":true}") - .toObject(TableVerticalLimitSettings.class); - Assertions.assertEquals(1966845044, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT99H7M46S"), model.trialTimeout()); - Assertions.assertEquals(Duration.parse("PT45H54M58S"), model.timeout()); - Assertions.assertEquals(595135013, model.maxConcurrentTrials()); - Assertions.assertEquals(1991622972, model.maxCoresPerTrial()); - Assertions.assertEquals(96.52498690136247D, model.exitScore()); - Assertions.assertEquals(true, model.enableEarlyTermination()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TableVerticalLimitSettings model = new TableVerticalLimitSettings().withMaxTrials(1966845044) - .withTrialTimeout(Duration.parse("PT99H7M46S")) - .withTimeout(Duration.parse("PT45H54M58S")) - .withMaxConcurrentTrials(595135013) - .withMaxCoresPerTrial(1991622972) - .withExitScore(96.52498690136247D) - .withEnableEarlyTermination(true); - model = BinaryData.fromObject(model).toObject(TableVerticalLimitSettings.class); - Assertions.assertEquals(1966845044, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT99H7M46S"), model.trialTimeout()); - Assertions.assertEquals(Duration.parse("PT45H54M58S"), model.timeout()); - Assertions.assertEquals(595135013, model.maxConcurrentTrials()); - Assertions.assertEquals(1991622972, model.maxCoresPerTrial()); - Assertions.assertEquals(96.52498690136247D, model.exitScore()); - Assertions.assertEquals(true, model.enableEarlyTermination()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalTests.java deleted file mode 100644 index e029e0d76052..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalTests.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BlockedTransformers; -import com.azure.resourcemanager.machinelearning.models.ColumnTransformer; -import com.azure.resourcemanager.machinelearning.models.FeaturizationMode; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NCrossValidations; -import com.azure.resourcemanager.machinelearning.models.TableVertical; -import com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings; -import java.time.Duration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TableVerticalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TableVertical model = BinaryData.fromString( - "{\"limitSettings\":{\"maxTrials\":193717810,\"trialTimeout\":\"PT32H39M11S\",\"timeout\":\"PT201H50M53S\",\"maxConcurrentTrials\":116078360,\"maxCoresPerTrial\":466957223,\"exitScore\":15.688608348249321,\"enableEarlyTermination\":true},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"cvSplitColumnNames\":[\"h\",\"aspiflei\",\"ixlmdbgic\"],\"weightColumnName\":\"fgsmdrjuqb\",\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"tokljmtznpaxw\",\"mode\":\"EvalMount\",\"description\":\"yqiprclt\"},\"testData\":{\"jobInputType\":\"mltable\",\"uri\":\"gbsoljckmiigzb\",\"mode\":\"Download\",\"description\":\"gkdskswtiiq\"},\"validationDataSize\":64.45639483346135,\"testDataSize\":36.424158932077646,\"featurizationSettings\":{\"mode\":\"Custom\",\"blockedTransformers\":[\"NaiveBayes\",\"CatTargetEncoder\"],\"columnNameAndTypes\":{\"ru\":\"ykdnonaaxwmg\",\"iqbcbgv\":\"lqcwnynll\"},\"transformerParams\":{\"il\":[{\"fields\":[\"toxadhxuvjhxmnr\",\"s\",\"jcm\",\"twmlg\"],\"parameters\":\"datavnpvvd\"},{\"fields\":[\"naqyqipslzmvcds\",\"mwbitekdtfo\"],\"parameters\":\"datafiybxqich\"},{\"fields\":[\"fzdqekiv\",\"cpzcvdizul\",\"qtbhtr\"],\"parameters\":\"datapzl\"},{\"fields\":[\"f\"],\"parameters\":\"datamdutzfk\"}]},\"enableDnnFeaturization\":true,\"datasetLanguage\":\"ccgndjgdprig\"}}") - .toObject(TableVertical.class); - Assertions.assertEquals(193717810, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT32H39M11S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT201H50M53S"), model.limitSettings().timeout()); - Assertions.assertEquals(116078360, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(466957223, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(15.688608348249321D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("h", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("fgsmdrjuqb", model.weightColumnName()); - Assertions.assertEquals("yqiprclt", model.validationData().description()); - Assertions.assertEquals("tokljmtznpaxw", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("gkdskswtiiq", model.testData().description()); - Assertions.assertEquals("gbsoljckmiigzb", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.testData().mode()); - Assertions.assertEquals(64.45639483346135D, model.validationDataSize()); - Assertions.assertEquals(36.424158932077646D, model.testDataSize()); - Assertions.assertEquals("ccgndjgdprig", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.CUSTOM, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.NAIVE_BAYES, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("ykdnonaaxwmg", model.featurizationSettings().columnNameAndTypes().get("ru")); - Assertions.assertEquals("toxadhxuvjhxmnr", - model.featurizationSettings().transformerParams().get("il").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TableVertical model = new TableVertical() - .withLimitSettings(new TableVerticalLimitSettings().withMaxTrials(193717810) - .withTrialTimeout(Duration.parse("PT32H39M11S")) - .withTimeout(Duration.parse("PT201H50M53S")) - .withMaxConcurrentTrials(116078360) - .withMaxCoresPerTrial(466957223) - .withExitScore(15.688608348249321D) - .withEnableEarlyTermination(true)) - .withNCrossValidations(new NCrossValidations()) - .withCvSplitColumnNames(Arrays.asList("h", "aspiflei", "ixlmdbgic")) - .withWeightColumnName("fgsmdrjuqb") - .withValidationData(new MLTableJobInput().withDescription("yqiprclt") - .withUri("tokljmtznpaxw") - .withMode(InputDeliveryMode.EVAL_MOUNT)) - .withTestData(new MLTableJobInput().withDescription("gkdskswtiiq") - .withUri("gbsoljckmiigzb") - .withMode(InputDeliveryMode.DOWNLOAD)) - .withValidationDataSize(64.45639483346135D) - .withTestDataSize(36.424158932077646D) - .withFeaturizationSettings(new TableVerticalFeaturizationSettings().withDatasetLanguage("ccgndjgdprig") - .withMode(FeaturizationMode.CUSTOM) - .withBlockedTransformers( - Arrays.asList(BlockedTransformers.NAIVE_BAYES, BlockedTransformers.CAT_TARGET_ENCODER)) - .withColumnNameAndTypes(mapOf("ru", "ykdnonaaxwmg", "iqbcbgv", "lqcwnynll")) - .withTransformerParams(mapOf("il", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("toxadhxuvjhxmnr", "s", "jcm", "twmlg")) - .withParameters("datavnpvvd"), - new ColumnTransformer().withFields(Arrays.asList("naqyqipslzmvcds", "mwbitekdtfo")) - .withParameters("datafiybxqich"), - new ColumnTransformer().withFields(Arrays.asList("fzdqekiv", "cpzcvdizul", "qtbhtr")) - .withParameters("datapzl"), - new ColumnTransformer().withFields(Arrays.asList("f")).withParameters("datamdutzfk")))) - .withEnableDnnFeaturization(true)); - model = BinaryData.fromObject(model).toObject(TableVertical.class); - Assertions.assertEquals(193717810, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT32H39M11S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT201H50M53S"), model.limitSettings().timeout()); - Assertions.assertEquals(116078360, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(466957223, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(15.688608348249321D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("h", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("fgsmdrjuqb", model.weightColumnName()); - Assertions.assertEquals("yqiprclt", model.validationData().description()); - Assertions.assertEquals("tokljmtznpaxw", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("gkdskswtiiq", model.testData().description()); - Assertions.assertEquals("gbsoljckmiigzb", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.testData().mode()); - Assertions.assertEquals(64.45639483346135D, model.validationDataSize()); - Assertions.assertEquals(36.424158932077646D, model.testDataSize()); - Assertions.assertEquals("ccgndjgdprig", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.CUSTOM, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.NAIVE_BAYES, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("ykdnonaaxwmg", model.featurizationSettings().columnNameAndTypes().get("ru")); - Assertions.assertEquals("toxadhxuvjhxmnr", - model.featurizationSettings().transformerParams().get("il").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetLagsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetLagsTests.java deleted file mode 100644 index 529ec59a2e01..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetLagsTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TargetLags; - -public final class TargetLagsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TargetLags model = BinaryData.fromString("{\"mode\":\"TargetLags\"}").toObject(TargetLags.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TargetLags model = new TargetLags(); - model = BinaryData.fromObject(model).toObject(TargetLags.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetRollingWindowSizeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetRollingWindowSizeTests.java deleted file mode 100644 index f227185329ba..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetRollingWindowSizeTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TargetRollingWindowSize; - -public final class TargetRollingWindowSizeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TargetRollingWindowSize model - = BinaryData.fromString("{\"mode\":\"TargetRollingWindowSize\"}").toObject(TargetRollingWindowSize.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TargetRollingWindowSize model = new TargetRollingWindowSize(); - model = BinaryData.fromObject(model).toObject(TargetRollingWindowSize.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetUtilizationScaleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetUtilizationScaleSettingsTests.java deleted file mode 100644 index c3716ab04ec3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetUtilizationScaleSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TargetUtilizationScaleSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TargetUtilizationScaleSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TargetUtilizationScaleSettings model = BinaryData.fromString( - "{\"scaleType\":\"TargetUtilization\",\"pollingInterval\":\"PT36H54M23S\",\"targetUtilizationPercentage\":633287339,\"minInstances\":227283067,\"maxInstances\":1292414700}") - .toObject(TargetUtilizationScaleSettings.class); - Assertions.assertEquals(Duration.parse("PT36H54M23S"), model.pollingInterval()); - Assertions.assertEquals(633287339, model.targetUtilizationPercentage()); - Assertions.assertEquals(227283067, model.minInstances()); - Assertions.assertEquals(1292414700, model.maxInstances()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TargetUtilizationScaleSettings model - = new TargetUtilizationScaleSettings().withPollingInterval(Duration.parse("PT36H54M23S")) - .withTargetUtilizationPercentage(633287339) - .withMinInstances(227283067) - .withMaxInstances(1292414700); - model = BinaryData.fromObject(model).toObject(TargetUtilizationScaleSettings.class); - Assertions.assertEquals(Duration.parse("PT36H54M23S"), model.pollingInterval()); - Assertions.assertEquals(633287339, model.targetUtilizationPercentage()); - Assertions.assertEquals(227283067, model.minInstances()); - Assertions.assertEquals(1292414700, model.maxInstances()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TensorFlowTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TensorFlowTests.java deleted file mode 100644 index 176a15fe0236..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TensorFlowTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TensorFlow; -import org.junit.jupiter.api.Assertions; - -public final class TensorFlowTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TensorFlow model = BinaryData - .fromString( - "{\"distributionType\":\"TensorFlow\",\"workerCount\":116693991,\"parameterServerCount\":1398971753}") - .toObject(TensorFlow.class); - Assertions.assertEquals(116693991, model.workerCount()); - Assertions.assertEquals(1398971753, model.parameterServerCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TensorFlow model = new TensorFlow().withWorkerCount(116693991).withParameterServerCount(1398971753); - model = BinaryData.fromObject(model).toObject(TensorFlow.class); - Assertions.assertEquals(116693991, model.workerCount()); - Assertions.assertEquals(1398971753, model.parameterServerCount()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationMultilabelTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationMultilabelTests.java deleted file mode 100644 index ffc5b8444f02..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationMultilabelTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings; -import com.azure.resourcemanager.machinelearning.models.TextClassificationMultilabel; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TextClassificationMultilabelTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TextClassificationMultilabel model = BinaryData.fromString( - "{\"taskType\":\"TextClassificationMultilabel\",\"primaryMetric\":\"NormMacroRecall\",\"limitSettings\":{\"timeout\":\"PT197H4M37S\",\"maxTrials\":470605377,\"maxConcurrentTrials\":1118935796},\"featurizationSettings\":{\"datasetLanguage\":\"xagf\"},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"dbqjnye\",\"mode\":\"Direct\",\"description\":\"gxqqqasfeooqftp\"},\"logVerbosity\":\"NotSet\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"tarp\",\"mode\":\"ReadOnlyMount\",\"description\":\"liiqeanu\"},\"targetColumnName\":\"jno\"}") - .toObject(TextClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); - Assertions.assertEquals("liiqeanu", model.trainingData().description()); - Assertions.assertEquals("tarp", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("jno", model.targetColumnName()); - Assertions.assertEquals(Duration.parse("PT197H4M37S"), model.limitSettings().timeout()); - Assertions.assertEquals(470605377, model.limitSettings().maxTrials()); - Assertions.assertEquals(1118935796, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("xagf", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("gxqqqasfeooqftp", model.validationData().description()); - Assertions.assertEquals("dbqjnye", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TextClassificationMultilabel model = new TextClassificationMultilabel().withLogVerbosity(LogVerbosity.NOT_SET) - .withTrainingData(new MLTableJobInput().withDescription("liiqeanu") - .withUri("tarp") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withTargetColumnName("jno") - .withLimitSettings(new NlpVerticalLimitSettings().withTimeout(Duration.parse("PT197H4M37S")) - .withMaxTrials(470605377) - .withMaxConcurrentTrials(1118935796)) - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("xagf")) - .withValidationData(new MLTableJobInput().withDescription("gxqqqasfeooqftp") - .withUri("dbqjnye") - .withMode(InputDeliveryMode.DIRECT)); - model = BinaryData.fromObject(model).toObject(TextClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); - Assertions.assertEquals("liiqeanu", model.trainingData().description()); - Assertions.assertEquals("tarp", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("jno", model.targetColumnName()); - Assertions.assertEquals(Duration.parse("PT197H4M37S"), model.limitSettings().timeout()); - Assertions.assertEquals(470605377, model.limitSettings().maxTrials()); - Assertions.assertEquals(1118935796, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("xagf", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("gxqqqasfeooqftp", model.validationData().description()); - Assertions.assertEquals("dbqjnye", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationTests.java deleted file mode 100644 index d9611ad3bb0c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ClassificationPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings; -import com.azure.resourcemanager.machinelearning.models.TextClassification; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TextClassificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TextClassification model = BinaryData.fromString( - "{\"taskType\":\"TextClassification\",\"primaryMetric\":\"AveragePrecisionScoreWeighted\",\"limitSettings\":{\"timeout\":\"PT208H31M59S\",\"maxTrials\":1029367761,\"maxConcurrentTrials\":1396784838},\"featurizationSettings\":{\"datasetLanguage\":\"qdvnpyeevff\"},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"ujgtdowlxmwefcb\",\"mode\":\"Direct\",\"description\":\"hrtczwjcujyz\"},\"logVerbosity\":\"Debug\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"rjq\",\"mode\":\"ReadWriteMount\",\"description\":\"kuirxxe\"},\"targetColumnName\":\"iiircvn\"}") - .toObject(TextClassification.class); - Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); - Assertions.assertEquals("kuirxxe", model.trainingData().description()); - Assertions.assertEquals("rjq", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("iiircvn", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); - Assertions.assertEquals(Duration.parse("PT208H31M59S"), model.limitSettings().timeout()); - Assertions.assertEquals(1029367761, model.limitSettings().maxTrials()); - Assertions.assertEquals(1396784838, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("qdvnpyeevff", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("hrtczwjcujyz", model.validationData().description()); - Assertions.assertEquals("ujgtdowlxmwefcb", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TextClassification model = new TextClassification().withLogVerbosity(LogVerbosity.DEBUG) - .withTrainingData(new MLTableJobInput().withDescription("kuirxxe") - .withUri("rjq") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT)) - .withTargetColumnName("iiircvn") - .withPrimaryMetric(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED) - .withLimitSettings(new NlpVerticalLimitSettings().withTimeout(Duration.parse("PT208H31M59S")) - .withMaxTrials(1029367761) - .withMaxConcurrentTrials(1396784838)) - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("qdvnpyeevff")) - .withValidationData(new MLTableJobInput().withDescription("hrtczwjcujyz") - .withUri("ujgtdowlxmwefcb") - .withMode(InputDeliveryMode.DIRECT)); - model = BinaryData.fromObject(model).toObject(TextClassification.class); - Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); - Assertions.assertEquals("kuirxxe", model.trainingData().description()); - Assertions.assertEquals("rjq", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("iiircvn", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); - Assertions.assertEquals(Duration.parse("PT208H31M59S"), model.limitSettings().timeout()); - Assertions.assertEquals(1029367761, model.limitSettings().maxTrials()); - Assertions.assertEquals(1396784838, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("qdvnpyeevff", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("hrtczwjcujyz", model.validationData().description()); - Assertions.assertEquals("ujgtdowlxmwefcb", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextNerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextNerTests.java deleted file mode 100644 index 0c882e06daf9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextNerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings; -import com.azure.resourcemanager.machinelearning.models.TextNer; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TextNerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TextNer model = BinaryData.fromString( - "{\"taskType\":\"TextNER\",\"primaryMetric\":\"Accuracy\",\"limitSettings\":{\"timeout\":\"PT136H33M44S\",\"maxTrials\":911733513,\"maxConcurrentTrials\":1407364852},\"featurizationSettings\":{\"datasetLanguage\":\"y\"},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"evaebzm\",\"mode\":\"Download\",\"description\":\"rjkejv\"},\"logVerbosity\":\"Error\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"ogzougxbxxgj\",\"mode\":\"ReadOnlyMount\",\"description\":\"hiv\"},\"targetColumnName\":\"rmtenfdvdoearywu\"}") - .toObject(TextNer.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("hiv", model.trainingData().description()); - Assertions.assertEquals("ogzougxbxxgj", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("rmtenfdvdoearywu", model.targetColumnName()); - Assertions.assertEquals(Duration.parse("PT136H33M44S"), model.limitSettings().timeout()); - Assertions.assertEquals(911733513, model.limitSettings().maxTrials()); - Assertions.assertEquals(1407364852, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("y", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("rjkejv", model.validationData().description()); - Assertions.assertEquals("evaebzm", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TextNer model = new TextNer().withLogVerbosity(LogVerbosity.ERROR) - .withTrainingData(new MLTableJobInput().withDescription("hiv") - .withUri("ogzougxbxxgj") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withTargetColumnName("rmtenfdvdoearywu") - .withLimitSettings(new NlpVerticalLimitSettings().withTimeout(Duration.parse("PT136H33M44S")) - .withMaxTrials(911733513) - .withMaxConcurrentTrials(1407364852)) - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("y")) - .withValidationData(new MLTableJobInput().withDescription("rjkejv") - .withUri("evaebzm") - .withMode(InputDeliveryMode.DOWNLOAD)); - model = BinaryData.fromObject(model).toObject(TextNer.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("hiv", model.trainingData().description()); - Assertions.assertEquals("ogzougxbxxgj", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("rmtenfdvdoearywu", model.targetColumnName()); - Assertions.assertEquals(Duration.parse("PT136H33M44S"), model.limitSettings().timeout()); - Assertions.assertEquals(911733513, model.limitSettings().maxTrials()); - Assertions.assertEquals(1407364852, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("y", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("rjkejv", model.validationData().description()); - Assertions.assertEquals("evaebzm", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TmpfsOptionsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TmpfsOptionsTests.java deleted file mode 100644 index 85aed1311f37..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TmpfsOptionsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TmpfsOptions; -import org.junit.jupiter.api.Assertions; - -public final class TmpfsOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TmpfsOptions model = BinaryData.fromString("{\"size\":1684202361}").toObject(TmpfsOptions.class); - Assertions.assertEquals(1684202361, model.size()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TmpfsOptions model = new TmpfsOptions().withSize(1684202361); - model = BinaryData.fromObject(model).toObject(TmpfsOptions.class); - Assertions.assertEquals(1684202361, model.size()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TopNFeaturesByAttributionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TopNFeaturesByAttributionTests.java deleted file mode 100644 index c4f03675c279..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TopNFeaturesByAttributionTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TopNFeaturesByAttribution; -import org.junit.jupiter.api.Assertions; - -public final class TopNFeaturesByAttributionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TopNFeaturesByAttribution model - = BinaryData.fromString("{\"filterType\":\"TopNByAttribution\",\"top\":868397774}") - .toObject(TopNFeaturesByAttribution.class); - Assertions.assertEquals(868397774, model.top()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopNFeaturesByAttribution model = new TopNFeaturesByAttribution().withTop(868397774); - model = BinaryData.fromObject(model).toObject(TopNFeaturesByAttribution.class); - Assertions.assertEquals(868397774, model.top()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TrainingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TrainingSettingsTests.java deleted file mode 100644 index 9129497afac9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TrainingSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import com.azure.resourcemanager.machinelearning.models.TrainingSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TrainingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrainingSettings model = BinaryData.fromString( - "{\"enableOnnxCompatibleModels\":true,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LinearRegression\",\"stackMetaLearnerTrainPercentage\":20.375480617497665,\"stackMetaLearnerKWargs\":\"datauhktq\"},\"enableStackEnsemble\":true,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT238H33M9S\",\"enableModelExplainability\":false,\"enableDnnTraining\":true}") - .toObject(TrainingSettings.class); - Assertions.assertEquals(true, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(20.375480617497665D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT238H33M9S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableDnnTraining()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrainingSettings model = new TrainingSettings().withEnableOnnxCompatibleModels(true) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LINEAR_REGRESSION) - .withStackMetaLearnerTrainPercentage(20.375480617497665D) - .withStackMetaLearnerKWargs("datauhktq")) - .withEnableStackEnsemble(true) - .withEnableVoteEnsemble(true) - .withEnsembleModelDownloadTimeout(Duration.parse("PT238H33M9S")) - .withEnableModelExplainability(false) - .withEnableDnnTraining(true); - model = BinaryData.fromObject(model).toObject(TrainingSettings.class); - Assertions.assertEquals(true, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(20.375480617497665D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT238H33M9S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableDnnTraining()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TriggerBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TriggerBaseTests.java deleted file mode 100644 index f55e6752c2ee..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TriggerBaseTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TriggerBase; -import org.junit.jupiter.api.Assertions; - -public final class TriggerBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TriggerBase model = BinaryData.fromString( - "{\"triggerType\":\"TriggerBase\",\"endTime\":\"jadhqoawj\",\"startTime\":\"yueayfbpcmsp\",\"timeZone\":\"yrrueqth\"}") - .toObject(TriggerBase.class); - Assertions.assertEquals("jadhqoawj", model.endTime()); - Assertions.assertEquals("yueayfbpcmsp", model.startTime()); - Assertions.assertEquals("yrrueqth", model.timeZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TriggerBase model - = new TriggerBase().withEndTime("jadhqoawj").withStartTime("yueayfbpcmsp").withTimeZone("yrrueqth"); - model = BinaryData.fromObject(model).toObject(TriggerBase.class); - Assertions.assertEquals("jadhqoawj", model.endTime()); - Assertions.assertEquals("yueayfbpcmsp", model.startTime()); - Assertions.assertEquals("yrrueqth", model.timeZone()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobInputTests.java deleted file mode 100644 index d0da3ca5d682..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobInputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.TritonModelJobInput; -import org.junit.jupiter.api.Assertions; - -public final class TritonModelJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TritonModelJobInput model = BinaryData.fromString( - "{\"jobInputType\":\"triton_model\",\"uri\":\"zhdtrsyfe\",\"mode\":\"ReadWriteMount\",\"description\":\"yljdzyyrwnmwt\"}") - .toObject(TritonModelJobInput.class); - Assertions.assertEquals("yljdzyyrwnmwt", model.description()); - Assertions.assertEquals("zhdtrsyfe", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TritonModelJobInput model = new TritonModelJobInput().withDescription("yljdzyyrwnmwt") - .withUri("zhdtrsyfe") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(TritonModelJobInput.class); - Assertions.assertEquals("yljdzyyrwnmwt", model.description()); - Assertions.assertEquals("zhdtrsyfe", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobOutputTests.java deleted file mode 100644 index 773fa8b8701b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobOutputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.TritonModelJobOutput; -import org.junit.jupiter.api.Assertions; - -public final class TritonModelJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TritonModelJobOutput model = BinaryData.fromString( - "{\"jobOutputType\":\"triton_model\",\"uri\":\"ljknnkynkstdtfwh\",\"mode\":\"Upload\",\"description\":\"fxaqjyihjcwwv\"}") - .toObject(TritonModelJobOutput.class); - Assertions.assertEquals("fxaqjyihjcwwv", model.description()); - Assertions.assertEquals("ljknnkynkstdtfwh", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TritonModelJobOutput model = new TritonModelJobOutput().withDescription("fxaqjyihjcwwv") - .withUri("ljknnkynkstdtfwh") - .withMode(OutputDeliveryMode.UPLOAD); - model = BinaryData.fromObject(model).toObject(TritonModelJobOutput.class); - Assertions.assertEquals("fxaqjyihjcwwv", model.description()); - Assertions.assertEquals("ljknnkynkstdtfwh", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TruncationSelectionPolicyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TruncationSelectionPolicyTests.java deleted file mode 100644 index bb3198194c4f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TruncationSelectionPolicyTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TruncationSelectionPolicy; -import org.junit.jupiter.api.Assertions; - -public final class TruncationSelectionPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TruncationSelectionPolicy model = BinaryData.fromString( - "{\"policyType\":\"TruncationSelection\",\"truncationPercentage\":2059662360,\"evaluationInterval\":281085668,\"delayEvaluation\":782879823}") - .toObject(TruncationSelectionPolicy.class); - Assertions.assertEquals(281085668, model.evaluationInterval()); - Assertions.assertEquals(782879823, model.delayEvaluation()); - Assertions.assertEquals(2059662360, model.truncationPercentage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TruncationSelectionPolicy model = new TruncationSelectionPolicy().withEvaluationInterval(281085668) - .withDelayEvaluation(782879823) - .withTruncationPercentage(2059662360); - model = BinaryData.fromObject(model).toObject(TruncationSelectionPolicy.class); - Assertions.assertEquals(281085668, model.evaluationInterval()); - Assertions.assertEquals(782879823, model.delayEvaluation()); - Assertions.assertEquals(2059662360, model.truncationPercentage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasResultInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasResultInnerTests.java deleted file mode 100644 index d6fed1b04cd5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasResultInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner; - -public final class UpdateWorkspaceQuotasResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateWorkspaceQuotasResultInner model = BinaryData.fromString( - "{\"value\":[{\"id\":\"dybyxczfclhaa\",\"type\":\"babphlwrqlfk\",\"limit\":4312008787205173543,\"unit\":\"Count\",\"status\":\"OperationNotEnabledForRegion\"},{\"id\":\"mnyyazt\",\"type\":\"twwrqp\",\"limit\":2759149426383242118,\"unit\":\"Count\",\"status\":\"InvalidQuotaExceedsSubscriptionLimit\"}],\"nextLink\":\"iexzfeyue\"}") - .toObject(UpdateWorkspaceQuotasResultInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateWorkspaceQuotasResultInner model = new UpdateWorkspaceQuotasResultInner(); - model = BinaryData.fromObject(model).toObject(UpdateWorkspaceQuotasResultInner.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasTests.java deleted file mode 100644 index 5e6308e7b2d4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Status; -import com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotas; -import org.junit.jupiter.api.Assertions; - -public final class UpdateWorkspaceQuotasTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateWorkspaceQuotas model = BinaryData.fromString( - "{\"id\":\"ibx\",\"type\":\"wbhqwal\",\"limit\":4821082223595321199,\"unit\":\"Count\",\"status\":\"InvalidQuotaBelowClusterMinimum\"}") - .toObject(UpdateWorkspaceQuotas.class); - Assertions.assertEquals(4821082223595321199L, model.limit()); - Assertions.assertEquals(Status.INVALID_QUOTA_BELOW_CLUSTER_MINIMUM, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateWorkspaceQuotas model = new UpdateWorkspaceQuotas().withLimit(4821082223595321199L) - .withStatus(Status.INVALID_QUOTA_BELOW_CLUSTER_MINIMUM); - model = BinaryData.fromObject(model).toObject(UpdateWorkspaceQuotas.class); - Assertions.assertEquals(4821082223595321199L, model.limit()); - Assertions.assertEquals(Status.INVALID_QUOTA_BELOW_CLUSTER_MINIMUM, model.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileDataVersionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileDataVersionTests.java deleted file mode 100644 index 38e74cfaa8dc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileDataVersionTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.UriFileDataVersion; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class UriFileDataVersionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFileDataVersion model = BinaryData.fromString( - "{\"dataType\":\"uri_file\",\"dataUri\":\"vhkhpsp\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"yfaoexnguwnrdpu\",\"tags\":{\"ybsz\":\"ihsujtg\"},\"properties\":{\"yelrnh\":\"jxejpdcliqwzut\"}}") - .toObject(UriFileDataVersion.class); - Assertions.assertEquals("yfaoexnguwnrdpu", model.description()); - Assertions.assertEquals("ihsujtg", model.tags().get("ybsz")); - Assertions.assertEquals("jxejpdcliqwzut", model.properties().get("yelrnh")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("vhkhpsp", model.dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFileDataVersion model = new UriFileDataVersion().withDescription("yfaoexnguwnrdpu") - .withTags(mapOf("ybsz", "ihsujtg")) - .withProperties(mapOf("yelrnh", "jxejpdcliqwzut")) - .withIsArchived(false) - .withIsAnonymous(false) - .withDataUri("vhkhpsp"); - model = BinaryData.fromObject(model).toObject(UriFileDataVersion.class); - Assertions.assertEquals("yfaoexnguwnrdpu", model.description()); - Assertions.assertEquals("ihsujtg", model.tags().get("ybsz")); - Assertions.assertEquals("jxejpdcliqwzut", model.properties().get("yelrnh")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("vhkhpsp", model.dataUri()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobInputTests.java deleted file mode 100644 index b0d6f4a5f6fe..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobInputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.UriFileJobInput; -import org.junit.jupiter.api.Assertions; - -public final class UriFileJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFileJobInput model = BinaryData - .fromString( - "{\"jobInputType\":\"uri_file\",\"uri\":\"jt\",\"mode\":\"ReadWriteMount\",\"description\":\"z\"}") - .toObject(UriFileJobInput.class); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("jt", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFileJobInput model - = new UriFileJobInput().withDescription("z").withUri("jt").withMode(InputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(UriFileJobInput.class); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("jt", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobOutputTests.java deleted file mode 100644 index d91cc4463d4a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobOutputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.UriFileJobOutput; -import org.junit.jupiter.api.Assertions; - -public final class UriFileJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFileJobOutput model = BinaryData.fromString( - "{\"jobOutputType\":\"uri_file\",\"uri\":\"yovqmqcudptoqwr\",\"mode\":\"ReadWriteMount\",\"description\":\"jthlokmx\"}") - .toObject(UriFileJobOutput.class); - Assertions.assertEquals("jthlokmx", model.description()); - Assertions.assertEquals("yovqmqcudptoqwr", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFileJobOutput model = new UriFileJobOutput().withDescription("jthlokmx") - .withUri("yovqmqcudptoqwr") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(UriFileJobOutput.class); - Assertions.assertEquals("jthlokmx", model.description()); - Assertions.assertEquals("yovqmqcudptoqwr", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderDataVersionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderDataVersionTests.java deleted file mode 100644 index bfeba02f5999..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderDataVersionTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.UriFolderDataVersion; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class UriFolderDataVersionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFolderDataVersion model = BinaryData.fromString( - "{\"dataType\":\"uri_folder\",\"dataUri\":\"awfubkngejjxu\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"mo\",\"tags\":{\"fzcfdtstiax\":\"xuktdrsjtmnkxjou\",\"mlroiommemsoqgb\":\"yrnuhcfhepisqb\",\"bobaqca\":\"cyeqd\",\"xbj\":\"ebckcesrsixwnlpj\"},\"properties\":{\"yyfr\":\"y\",\"kidfhmlxrqkeknu\":\"idzfpsfy\",\"uwpuqpsrcekdvvo\":\"kqafzvptriysjrgt\",\"w\":\"dwedg\"}}") - .toObject(UriFolderDataVersion.class); - Assertions.assertEquals("mo", model.description()); - Assertions.assertEquals("xuktdrsjtmnkxjou", model.tags().get("fzcfdtstiax")); - Assertions.assertEquals("y", model.properties().get("yyfr")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("awfubkngejjxu", model.dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFolderDataVersion model = new UriFolderDataVersion().withDescription("mo") - .withTags(mapOf("fzcfdtstiax", "xuktdrsjtmnkxjou", "mlroiommemsoqgb", "yrnuhcfhepisqb", "bobaqca", "cyeqd", - "xbj", "ebckcesrsixwnlpj")) - .withProperties( - mapOf("yyfr", "y", "kidfhmlxrqkeknu", "idzfpsfy", "uwpuqpsrcekdvvo", "kqafzvptriysjrgt", "w", "dwedg")) - .withIsArchived(true) - .withIsAnonymous(false) - .withDataUri("awfubkngejjxu"); - model = BinaryData.fromObject(model).toObject(UriFolderDataVersion.class); - Assertions.assertEquals("mo", model.description()); - Assertions.assertEquals("xuktdrsjtmnkxjou", model.tags().get("fzcfdtstiax")); - Assertions.assertEquals("y", model.properties().get("yyfr")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("awfubkngejjxu", model.dataUri()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobInputTests.java deleted file mode 100644 index 08a49b6a2e98..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobInputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.UriFolderJobInput; -import org.junit.jupiter.api.Assertions; - -public final class UriFolderJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFolderJobInput model = BinaryData.fromString( - "{\"jobInputType\":\"uri_folder\",\"uri\":\"clvbwatza\",\"mode\":\"ReadWriteMount\",\"description\":\"jngoarsrdrw\"}") - .toObject(UriFolderJobInput.class); - Assertions.assertEquals("jngoarsrdrw", model.description()); - Assertions.assertEquals("clvbwatza", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFolderJobInput model = new UriFolderJobInput().withDescription("jngoarsrdrw") - .withUri("clvbwatza") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(UriFolderJobInput.class); - Assertions.assertEquals("jngoarsrdrw", model.description()); - Assertions.assertEquals("clvbwatza", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobOutputTests.java deleted file mode 100644 index ea88cf31f921..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobOutputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.UriFolderJobOutput; -import org.junit.jupiter.api.Assertions; - -public final class UriFolderJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFolderJobOutput model = BinaryData - .fromString( - "{\"jobOutputType\":\"uri_folder\",\"uri\":\"mzc\",\"mode\":\"Upload\",\"description\":\"pypimrxi\"}") - .toObject(UriFolderJobOutput.class); - Assertions.assertEquals("pypimrxi", model.description()); - Assertions.assertEquals("mzc", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFolderJobOutput model - = new UriFolderJobOutput().withDescription("pypimrxi").withUri("mzc").withMode(OutputDeliveryMode.UPLOAD); - model = BinaryData.fromObject(model).toObject(UriFolderJobOutput.class); - Assertions.assertEquals("pypimrxi", model.description()); - Assertions.assertEquals("mzc", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageInnerTests.java deleted file mode 100644 index f8f3f626f8e2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.UsageInner; - -public final class UsageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsageInner model = BinaryData.fromString( - "{\"id\":\"nkoukn\",\"amlWorkspaceLocation\":\"dwtiukbldngkp\",\"type\":\"ipazyxoegukgjnpi\",\"unit\":\"Count\",\"currentValue\":9071113490700391496,\"limit\":7306786683100499941,\"name\":{\"value\":\"yp\",\"localizedValue\":\"bpizcdrqjsdpydn\"}}") - .toObject(UsageInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageInner model = new UsageInner(); - model = BinaryData.fromObject(model).toObject(UsageInner.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageNameTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageNameTests.java deleted file mode 100644 index 0195859044b4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageNameTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.UsageName; - -public final class UsageNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsageName model - = BinaryData.fromString("{\"value\":\"hxdeoejz\",\"localizedValue\":\"w\"}").toObject(UsageName.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageName model = new UsageName(); - model = BinaryData.fromObject(model).toObject(UsageName.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsagesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsagesListMockTests.java deleted file mode 100644 index 869b6facf9c8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsagesListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Usage; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class UsagesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"m\",\"amlWorkspaceLocation\":\"zbyfkoc\",\"type\":\"zdct\",\"unit\":\"Count\",\"currentValue\":3928826524604163892,\"limit\":9107747162621331635,\"name\":{\"value\":\"gxrolw\",\"localizedValue\":\"lks\"}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.usages().list("fjczgohvpsuwi", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserAssignedIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserAssignedIdentityTests.java deleted file mode 100644 index b958eef621cc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserAssignedIdentityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"a78b5bf0-7059-446f-a340-f6da79e18669\",\"clientId\":\"865ed2ee-b134-400f-ae82-0e9ea9358bf5\"}") - .toObject(UserAssignedIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedAcrAccountTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedAcrAccountTests.java deleted file mode 100644 index 6a60f23f291a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedAcrAccountTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import org.junit.jupiter.api.Assertions; - -public final class UserCreatedAcrAccountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserCreatedAcrAccount model = BinaryData.fromString("{\"armResourceId\":{\"resourceId\":\"nldpxottd\"}}") - .toObject(UserCreatedAcrAccount.class); - Assertions.assertEquals("nldpxottd", model.armResourceId().resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserCreatedAcrAccount model - = new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId().withResourceId("nldpxottd")); - model = BinaryData.fromObject(model).toObject(UserCreatedAcrAccount.class); - Assertions.assertEquals("nldpxottd", model.armResourceId().resourceId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedStorageAccountTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedStorageAccountTests.java deleted file mode 100644 index cccd5edd0611..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedStorageAccountTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; -import org.junit.jupiter.api.Assertions; - -public final class UserCreatedStorageAccountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserCreatedStorageAccount model = BinaryData.fromString("{\"armResourceId\":{\"resourceId\":\"rfmzhwilz\"}}") - .toObject(UserCreatedStorageAccount.class); - Assertions.assertEquals("rfmzhwilz", model.armResourceId().resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserCreatedStorageAccount model - = new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId().withResourceId("rfmzhwilz")); - model = BinaryData.fromObject(model).toObject(UserCreatedStorageAccount.class); - Assertions.assertEquals("rfmzhwilz", model.armResourceId().resourceId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserIdentityTests.java deleted file mode 100644 index a6544cd23012..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserIdentityTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.UserIdentity; - -public final class UserIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserIdentity model = BinaryData.fromString("{\"identityType\":\"UserIdentity\"}").toObject(UserIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserIdentity model = new UserIdentity(); - model = BinaryData.fromObject(model).toObject(UserIdentity.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineImageTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineImageTests.java deleted file mode 100644 index 4ba738a2cb71..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineImageTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineImage; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineImageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineImage model = BinaryData.fromString("{\"id\":\"eqi\"}").toObject(VirtualMachineImage.class); - Assertions.assertEquals("eqi", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineImage model = new VirtualMachineImage().withId("eqi"); - model = BinaryData.fromObject(model).toObject(VirtualMachineImage.class); - Assertions.assertEquals("eqi", model.id()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeListResultInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeListResultInnerTests.java deleted file mode 100644 index 5bce03f11974..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeListResultInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner; -import com.azure.resourcemanager.machinelearning.models.BillingCurrency; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrice; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrices; -import com.azure.resourcemanager.machinelearning.models.UnitOfMeasure; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSize; -import com.azure.resourcemanager.machinelearning.models.VMPriceOSType; -import com.azure.resourcemanager.machinelearning.models.VMTier; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineSizeListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineSizeListResultInner model = BinaryData.fromString( - "{\"value\":[{\"name\":\"ttgzfbis\",\"family\":\"bkh\",\"vCPUs\":2127806039,\"gpus\":1288949880,\"osVhdSizeMB\":38028181,\"maxResourceVolumeMB\":1859867828,\"memoryGB\":87.63753319479677,\"lowPriorityCapable\":true,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":64.09894900073603,\"osType\":\"Windows\",\"vmTier\":\"Standard\"},{\"retailPrice\":79.35964206973047,\"osType\":\"Linux\",\"vmTier\":\"Standard\"},{\"retailPrice\":42.700623481202356,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"}]},\"supportedComputeTypes\":[\"ankixzbinjeput\",\"mryw\",\"uzoqft\"]},{\"name\":\"qzrnkcqvyxlwhz\",\"family\":\"icohoqqnwvl\",\"vCPUs\":137418501,\"gpus\":240696862,\"osVhdSizeMB\":989865410,\"maxResourceVolumeMB\":1111271416,\"memoryGB\":89.24862714636545,\"lowPriorityCapable\":true,\"premiumIO\":false,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":16.817525955184955,\"osType\":\"Windows\",\"vmTier\":\"Standard\"},{\"retailPrice\":34.762358205235685,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"}]},\"supportedComputeTypes\":[\"xuconu\",\"szfkbe\"]},{\"name\":\"ewrmjmwvvjektc\",\"family\":\"enhwlrs\",\"vCPUs\":1160903159,\"gpus\":1611937755,\"osVhdSizeMB\":88674605,\"maxResourceVolumeMB\":1497747183,\"memoryGB\":0.6800349373471626,\"lowPriorityCapable\":true,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":75.88369080213783,\"osType\":\"Windows\",\"vmTier\":\"Spot\"}]},\"supportedComputeTypes\":[\"vfcivfsnkymuc\",\"qhjfbebr\",\"cxerf\"]}]}") - .toObject(VirtualMachineSizeListResultInner.class); - Assertions.assertEquals(BillingCurrency.USD, model.value().get(0).estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.value().get(0).estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals(64.09894900073603, - model.value().get(0).estimatedVMPrices().values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.WINDOWS, - model.value().get(0).estimatedVMPrices().values().get(0).osType()); - Assertions.assertEquals(VMTier.STANDARD, model.value().get(0).estimatedVMPrices().values().get(0).vmTier()); - Assertions.assertEquals("ankixzbinjeput", model.value().get(0).supportedComputeTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineSizeListResultInner model = new VirtualMachineSizeListResultInner().withValue(Arrays.asList( - new VirtualMachineSize() - .withEstimatedVMPrices(new EstimatedVMPrices().withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList( - new EstimatedVMPrice().withRetailPrice(64.09894900073603) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice().withRetailPrice(79.35964206973047) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice().withRetailPrice(42.700623481202356) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.LOW_PRIORITY)))) - .withSupportedComputeTypes(Arrays.asList("ankixzbinjeput", "mryw", "uzoqft")), - new VirtualMachineSize() - .withEstimatedVMPrices(new EstimatedVMPrices().withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList( - new EstimatedVMPrice().withRetailPrice(16.817525955184955) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice().withRetailPrice(34.762358205235685) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.LOW_PRIORITY)))) - .withSupportedComputeTypes(Arrays.asList("xuconu", "szfkbe")), - new VirtualMachineSize() - .withEstimatedVMPrices(new EstimatedVMPrices().withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList(new EstimatedVMPrice().withRetailPrice(75.88369080213783) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.SPOT)))) - .withSupportedComputeTypes(Arrays.asList("vfcivfsnkymuc", "qhjfbebr", "cxerf")))); - model = BinaryData.fromObject(model).toObject(VirtualMachineSizeListResultInner.class); - Assertions.assertEquals(BillingCurrency.USD, model.value().get(0).estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.value().get(0).estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals(64.09894900073603, - model.value().get(0).estimatedVMPrices().values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.WINDOWS, - model.value().get(0).estimatedVMPrices().values().get(0).osType()); - Assertions.assertEquals(VMTier.STANDARD, model.value().get(0).estimatedVMPrices().values().get(0).vmTier()); - Assertions.assertEquals("ankixzbinjeput", model.value().get(0).supportedComputeTypes().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeTests.java deleted file mode 100644 index 5d1c21f91557..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BillingCurrency; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrice; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrices; -import com.azure.resourcemanager.machinelearning.models.UnitOfMeasure; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSize; -import com.azure.resourcemanager.machinelearning.models.VMPriceOSType; -import com.azure.resourcemanager.machinelearning.models.VMTier; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineSizeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineSize model = BinaryData.fromString( - "{\"name\":\"utttxfvjrbirp\",\"family\":\"epcyvahfnlj\",\"vCPUs\":561070013,\"gpus\":197436298,\"osVhdSizeMB\":1640197955,\"maxResourceVolumeMB\":9347197,\"memoryGB\":95.87972980881396,\"lowPriorityCapable\":false,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":41.20565542900856,\"osType\":\"Linux\",\"vmTier\":\"Standard\"},{\"retailPrice\":89.24458873666032,\"osType\":\"Windows\",\"vmTier\":\"Standard\"},{\"retailPrice\":74.67569214860603,\"osType\":\"Linux\",\"vmTier\":\"LowPriority\"},{\"retailPrice\":67.46272082562218,\"osType\":\"Linux\",\"vmTier\":\"Standard\"}]},\"supportedComputeTypes\":[\"zz\",\"bijhtxfvgxbf\",\"mxnehmp\",\"ec\"]}") - .toObject(VirtualMachineSize.class); - Assertions.assertEquals(BillingCurrency.USD, model.estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals(41.20565542900856, model.estimatedVMPrices().values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, model.estimatedVMPrices().values().get(0).osType()); - Assertions.assertEquals(VMTier.STANDARD, model.estimatedVMPrices().values().get(0).vmTier()); - Assertions.assertEquals("zz", model.supportedComputeTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineSize model = new VirtualMachineSize() - .withEstimatedVMPrices(new EstimatedVMPrices().withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList( - new EstimatedVMPrice().withRetailPrice(41.20565542900856) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice().withRetailPrice(89.24458873666032) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice().withRetailPrice(74.67569214860603) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.LOW_PRIORITY), - new EstimatedVMPrice().withRetailPrice(67.46272082562218) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.STANDARD)))) - .withSupportedComputeTypes(Arrays.asList("zz", "bijhtxfvgxbf", "mxnehmp", "ec")); - model = BinaryData.fromObject(model).toObject(VirtualMachineSize.class); - Assertions.assertEquals(BillingCurrency.USD, model.estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals(41.20565542900856, model.estimatedVMPrices().values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, model.estimatedVMPrices().values().get(0).osType()); - Assertions.assertEquals(VMTier.STANDARD, model.estimatedVMPrices().values().get(0).vmTier()); - Assertions.assertEquals("zz", model.supportedComputeTypes().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListWithResponseMockTests.java deleted file mode 100644 index 75e3ce53d1ba..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.BillingCurrency; -import com.azure.resourcemanager.machinelearning.models.UnitOfMeasure; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizeListResult; -import com.azure.resourcemanager.machinelearning.models.VMPriceOSType; -import com.azure.resourcemanager.machinelearning.models.VMTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VirtualMachineSizesListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"bvjh\",\"family\":\"pmqququxl\",\"vCPUs\":241242158,\"gpus\":1242468021,\"osVhdSizeMB\":650458247,\"maxResourceVolumeMB\":132435040,\"memoryGB\":31.054010870691286,\"lowPriorityCapable\":true,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":9.524913939318969,\"osType\":\"Linux\",\"vmTier\":\"Standard\"}]},\"supportedComputeTypes\":[\"qpfy\",\"vhtvijvwmrg\"]},{\"name\":\"zhrplcxfmbzqu\",\"family\":\"tqmh\",\"vCPUs\":1980172415,\"gpus\":1049452948,\"osVhdSizeMB\":939315181,\"maxResourceVolumeMB\":823035085,\"memoryGB\":7.69921960533233,\"lowPriorityCapable\":false,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":69.40534502928313,\"osType\":\"Linux\",\"vmTier\":\"Standard\"},{\"retailPrice\":80.17743221655657,\"osType\":\"Windows\",\"vmTier\":\"Spot\"}]},\"supportedComputeTypes\":[\"fufkekzfk\",\"cxhsevmnkgghvsr\",\"jokvlwvbjsa\",\"xsv\"]}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VirtualMachineSizeListResult response = manager.virtualMachineSizes() - .listWithResponse("ksutacuctiha", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(BillingCurrency.USD, response.value().get(0).estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, response.value().get(0).estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals(9.524913939318969, - response.value().get(0).estimatedVMPrices().values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, - response.value().get(0).estimatedVMPrices().values().get(0).osType()); - Assertions.assertEquals(VMTier.STANDARD, response.value().get(0).estimatedVMPrices().values().get(0).vmTier()); - Assertions.assertEquals("qpfy", response.value().get(0).supportedComputeTypes().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeDefinitionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeDefinitionTests.java deleted file mode 100644 index b8642c8393a9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeDefinitionTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BindOptions; -import com.azure.resourcemanager.machinelearning.models.TmpfsOptions; -import com.azure.resourcemanager.machinelearning.models.VolumeDefinition; -import com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType; -import com.azure.resourcemanager.machinelearning.models.VolumeOptions; -import org.junit.jupiter.api.Assertions; - -public final class VolumeDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeDefinition model = BinaryData.fromString( - "{\"type\":\"bind\",\"readOnly\":true,\"source\":\"q\",\"target\":\"qkqsygxiyneco\",\"consistency\":\"gzkheubanl\",\"bind\":{\"propagation\":\"pqcckqiawzlz\",\"createHostPath\":true,\"selinux\":\"lg\"},\"volume\":{\"nocopy\":true},\"tmpfs\":{\"size\":1215971610}}") - .toObject(VolumeDefinition.class); - Assertions.assertEquals(VolumeDefinitionType.BIND, model.type()); - Assertions.assertEquals(true, model.readOnly()); - Assertions.assertEquals("q", model.source()); - Assertions.assertEquals("qkqsygxiyneco", model.target()); - Assertions.assertEquals("gzkheubanl", model.consistency()); - Assertions.assertEquals("pqcckqiawzlz", model.bind().propagation()); - Assertions.assertEquals(true, model.bind().createHostPath()); - Assertions.assertEquals("lg", model.bind().selinux()); - Assertions.assertEquals(true, model.volume().nocopy()); - Assertions.assertEquals(1215971610, model.tmpfs().size()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeDefinition model = new VolumeDefinition().withType(VolumeDefinitionType.BIND) - .withReadOnly(true) - .withSource("q") - .withTarget("qkqsygxiyneco") - .withConsistency("gzkheubanl") - .withBind(new BindOptions().withPropagation("pqcckqiawzlz").withCreateHostPath(true).withSelinux("lg")) - .withVolume(new VolumeOptions().withNocopy(true)) - .withTmpfs(new TmpfsOptions().withSize(1215971610)); - model = BinaryData.fromObject(model).toObject(VolumeDefinition.class); - Assertions.assertEquals(VolumeDefinitionType.BIND, model.type()); - Assertions.assertEquals(true, model.readOnly()); - Assertions.assertEquals("q", model.source()); - Assertions.assertEquals("qkqsygxiyneco", model.target()); - Assertions.assertEquals("gzkheubanl", model.consistency()); - Assertions.assertEquals("pqcckqiawzlz", model.bind().propagation()); - Assertions.assertEquals(true, model.bind().createHostPath()); - Assertions.assertEquals("lg", model.bind().selinux()); - Assertions.assertEquals(true, model.volume().nocopy()); - Assertions.assertEquals(1215971610, model.tmpfs().size()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeOptionsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeOptionsTests.java deleted file mode 100644 index c5717dcfeab5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeOptionsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.VolumeOptions; -import org.junit.jupiter.api.Assertions; - -public final class VolumeOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeOptions model = BinaryData.fromString("{\"nocopy\":false}").toObject(VolumeOptions.class); - Assertions.assertEquals(false, model.nocopy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeOptions model = new VolumeOptions().withNocopy(false); - model = BinaryData.fromObject(model).toObject(VolumeOptions.class); - Assertions.assertEquals(false, model.nocopy()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WebhookTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WebhookTests.java deleted file mode 100644 index dac066de552e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WebhookTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import org.junit.jupiter.api.Assertions; - -public final class WebhookTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Webhook model = BinaryData.fromString("{\"webhookType\":\"Webhook\",\"eventType\":\"zrazisgyk\"}") - .toObject(Webhook.class); - Assertions.assertEquals("zrazisgyk", model.eventType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Webhook model = new Webhook().withEventType("zrazisgyk"); - model = BinaryData.fromObject(model).toObject(Webhook.class); - Assertions.assertEquals("zrazisgyk", model.eventType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionManagedIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionManagedIdentityTests.java deleted file mode 100644 index 6799aa1ec4e8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionManagedIdentityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionManagedIdentity; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionManagedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionManagedIdentity model - = BinaryData.fromString("{\"resourceId\":\"rvrk\",\"clientId\":\"abdu\"}") - .toObject(WorkspaceConnectionManagedIdentity.class); - Assertions.assertEquals("rvrk", model.resourceId()); - Assertions.assertEquals("abdu", model.clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionManagedIdentity model - = new WorkspaceConnectionManagedIdentity().withResourceId("rvrk").withClientId("abdu"); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionManagedIdentity.class); - Assertions.assertEquals("rvrk", model.resourceId()); - Assertions.assertEquals("abdu", model.clientId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPersonalAccessTokenTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPersonalAccessTokenTests.java deleted file mode 100644 index 9ef57a9721c7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPersonalAccessTokenTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPersonalAccessToken; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionPersonalAccessTokenTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionPersonalAccessToken model - = BinaryData.fromString("{\"pat\":\"jshcybwf\"}").toObject(WorkspaceConnectionPersonalAccessToken.class); - Assertions.assertEquals("jshcybwf", model.pat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionPersonalAccessToken model = new WorkspaceConnectionPersonalAccessToken().withPat("jshcybwf"); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionPersonalAccessToken.class); - Assertions.assertEquals("jshcybwf", model.pat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java deleted file mode 100644 index 8c458b41eab6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"MySql\",\"createdByWorkspaceArmId\":\"ashrt\",\"expiryTime\":\"2021-03-25T05:20:51Z\",\"group\":\"ServicesAndApps\",\"isSharedToAll\":true,\"target\":\"bpokulpiujwaasip\",\"metadata\":{\"erpqlpqwcciuqg\":\"obyu\",\"hykojoxafnndlpic\":\"dbutauvfbtkuwhh\"},\"sharedUserList\":[\"ymkcdyhb\"],\"value\":\"kpw\",\"valueFormat\":\"JSON\"},\"id\":\"novvqfovljxy\",\"name\":\"suwsyrsnds\",\"type\":\"tgadgvraeaen\"},{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"MySql\",\"createdByWorkspaceArmId\":\"arrwlquu\",\"expiryTime\":\"2021-08-08T16:39:53Z\",\"group\":\"File\",\"isSharedToAll\":true,\"target\":\"wiipfpub\",\"metadata\":{\"sgplsakn\":\"wwiftohqkvpuv\",\"synljphuopxodl\":\"n\"},\"sharedUserList\":[\"ntorzihleosjswsr\"],\"value\":\"lyzrpzbchckqqzqi\",\"valueFormat\":\"JSON\"},\"id\":\"suiizynkedyat\",\"name\":\"wyhqmibzyhwits\",\"type\":\"ypyynpcdpumnzg\"}],\"nextLink\":\"z\"}") - .toObject(WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.class); - Assertions.assertEquals(ConnectionCategory.MY_SQL, model.value().get(0).properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-25T05:20:51Z"), - model.value().get(0).properties().expiryTime()); - Assertions.assertEquals(true, model.value().get(0).properties().isSharedToAll()); - Assertions.assertEquals("bpokulpiujwaasip", model.value().get(0).properties().target()); - Assertions.assertEquals("obyu", model.value().get(0).properties().metadata().get("erpqlpqwcciuqg")); - Assertions.assertEquals("ymkcdyhb", model.value().get(0).properties().sharedUserList().get(0)); - Assertions.assertEquals("kpw", model.value().get(0).properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.value().get(0).properties().valueFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult model - = new WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult() - .withValue( - Arrays - .asList( - new WorkspaceConnectionPropertiesV2BasicResourceInner().withProperties( - new WorkspaceConnectionPropertiesV2().withCategory(ConnectionCategory.MY_SQL) - .withExpiryTime(OffsetDateTime.parse("2021-03-25T05:20:51Z")) - .withIsSharedToAll(true) - .withTarget("bpokulpiujwaasip") - .withMetadata( - mapOf("erpqlpqwcciuqg", "obyu", "hykojoxafnndlpic", "dbutauvfbtkuwhh")) - .withSharedUserList(Arrays.asList("ymkcdyhb")) - .withValue("kpw") - .withValueFormat(ValueFormat.JSON)), - new WorkspaceConnectionPropertiesV2BasicResourceInner().withProperties( - new WorkspaceConnectionPropertiesV2().withCategory(ConnectionCategory.MY_SQL) - .withExpiryTime(OffsetDateTime.parse("2021-08-08T16:39:53Z")) - .withIsSharedToAll(true) - .withTarget("wiipfpub") - .withMetadata(mapOf("sgplsakn", "wwiftohqkvpuv", "synljphuopxodl", "n")) - .withSharedUserList(Arrays.asList("ntorzihleosjswsr")) - .withValue("lyzrpzbchckqqzqi") - .withValueFormat(ValueFormat.JSON)))); - model = BinaryData.fromObject(model) - .toObject(WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.class); - Assertions.assertEquals(ConnectionCategory.MY_SQL, model.value().get(0).properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-25T05:20:51Z"), - model.value().get(0).properties().expiryTime()); - Assertions.assertEquals(true, model.value().get(0).properties().isSharedToAll()); - Assertions.assertEquals("bpokulpiujwaasip", model.value().get(0).properties().target()); - Assertions.assertEquals("obyu", model.value().get(0).properties().metadata().get("erpqlpqwcciuqg")); - Assertions.assertEquals("ymkcdyhb", model.value().get(0).properties().sharedUserList().get(0)); - Assertions.assertEquals("kpw", model.value().get(0).properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.value().get(0).properties().valueFormat()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceInnerTests.java deleted file mode 100644 index ada8ee08bb73..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionPropertiesV2BasicResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionPropertiesV2BasicResourceInner model = BinaryData.fromString( - "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"AzureDatabricksDeltaLake\",\"createdByWorkspaceArmId\":\"afcnih\",\"expiryTime\":\"2021-09-16T02:36:36Z\",\"group\":\"GenericProtocol\",\"isSharedToAll\":true,\"target\":\"gfbcvkcv\",\"metadata\":{\"tbobz\":\"keqdcvdrhvoods\",\"d\":\"opcjwvnhd\",\"twuoegrpkhjwni\":\"mgxcxrslpm\",\"ggkzzlvmbmpa\":\"qsluicp\"},\"sharedUserList\":[\"dfvue\",\"yw\",\"bpfvm\"],\"value\":\"hrfou\",\"valueFormat\":\"JSON\"},\"id\":\"akcp\",\"name\":\"iyzvqtmnub\",\"type\":\"xkp\"}") - .toObject(WorkspaceConnectionPropertiesV2BasicResourceInner.class); - Assertions.assertEquals(ConnectionCategory.AZURE_DATABRICKS_DELTA_LAKE, model.properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T02:36:36Z"), model.properties().expiryTime()); - Assertions.assertEquals(true, model.properties().isSharedToAll()); - Assertions.assertEquals("gfbcvkcv", model.properties().target()); - Assertions.assertEquals("keqdcvdrhvoods", model.properties().metadata().get("tbobz")); - Assertions.assertEquals("dfvue", model.properties().sharedUserList().get(0)); - Assertions.assertEquals("hrfou", model.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.properties().valueFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionPropertiesV2BasicResourceInner model - = new WorkspaceConnectionPropertiesV2BasicResourceInner().withProperties( - new WorkspaceConnectionPropertiesV2().withCategory(ConnectionCategory.AZURE_DATABRICKS_DELTA_LAKE) - .withExpiryTime(OffsetDateTime.parse("2021-09-16T02:36:36Z")) - .withIsSharedToAll(true) - .withTarget("gfbcvkcv") - .withMetadata(mapOf("tbobz", "keqdcvdrhvoods", "d", "opcjwvnhd", "twuoegrpkhjwni", "mgxcxrslpm", - "ggkzzlvmbmpa", "qsluicp")) - .withSharedUserList(Arrays.asList("dfvue", "yw", "bpfvm")) - .withValue("hrfou") - .withValueFormat(ValueFormat.JSON)); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionPropertiesV2BasicResourceInner.class); - Assertions.assertEquals(ConnectionCategory.AZURE_DATABRICKS_DELTA_LAKE, model.properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T02:36:36Z"), model.properties().expiryTime()); - Assertions.assertEquals(true, model.properties().isSharedToAll()); - Assertions.assertEquals("gfbcvkcv", model.properties().target()); - Assertions.assertEquals("keqdcvdrhvoods", model.properties().metadata().get("tbobz")); - Assertions.assertEquals("dfvue", model.properties().sharedUserList().get(0)); - Assertions.assertEquals("hrfou", model.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.properties().valueFormat()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2Tests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2Tests.java deleted file mode 100644 index 2796f9c6ce63..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2Tests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionPropertiesV2Tests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionPropertiesV2 model = BinaryData.fromString( - "{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"SapOpenHub\",\"createdByWorkspaceArmId\":\"ondjmq\",\"expiryTime\":\"2021-06-21T21:58:07Z\",\"group\":\"Azure\",\"isSharedToAll\":false,\"target\":\"kopkwhojvpajqgx\",\"metadata\":{\"vhelxprglyatdd\":\"ocmbqfqvmkcxoza\",\"rjxgciqib\":\"kcbcue\",\"sdqrhzoymibmrq\":\"hos\"},\"sharedUserList\":[\"ahwfluszdtmhrk\",\"ofyyvoqacpi\"],\"value\":\"pbtg\",\"valueFormat\":\"JSON\"}") - .toObject(WorkspaceConnectionPropertiesV2.class); - Assertions.assertEquals(ConnectionCategory.SAP_OPEN_HUB, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-21T21:58:07Z"), model.expiryTime()); - Assertions.assertEquals(false, model.isSharedToAll()); - Assertions.assertEquals("kopkwhojvpajqgx", model.target()); - Assertions.assertEquals("ocmbqfqvmkcxoza", model.metadata().get("vhelxprglyatdd")); - Assertions.assertEquals("ahwfluszdtmhrk", model.sharedUserList().get(0)); - Assertions.assertEquals("pbtg", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionPropertiesV2 model = new WorkspaceConnectionPropertiesV2() - .withCategory(ConnectionCategory.SAP_OPEN_HUB) - .withExpiryTime(OffsetDateTime.parse("2021-06-21T21:58:07Z")) - .withIsSharedToAll(false) - .withTarget("kopkwhojvpajqgx") - .withMetadata(mapOf("vhelxprglyatdd", "ocmbqfqvmkcxoza", "rjxgciqib", "kcbcue", "sdqrhzoymibmrq", "hos")) - .withSharedUserList(Arrays.asList("ahwfluszdtmhrk", "ofyyvoqacpi")) - .withValue("pbtg") - .withValueFormat(ValueFormat.JSON); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionPropertiesV2.class); - Assertions.assertEquals(ConnectionCategory.SAP_OPEN_HUB, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-21T21:58:07Z"), model.expiryTime()); - Assertions.assertEquals(false, model.isSharedToAll()); - Assertions.assertEquals("kopkwhojvpajqgx", model.target()); - Assertions.assertEquals("ocmbqfqvmkcxoza", model.metadata().get("vhelxprglyatdd")); - Assertions.assertEquals("ahwfluszdtmhrk", model.sharedUserList().get(0)); - Assertions.assertEquals("pbtg", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionSharedAccessSignatureTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionSharedAccessSignatureTests.java deleted file mode 100644 index 820519fd5dfc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionSharedAccessSignatureTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionSharedAccessSignature; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionSharedAccessSignatureTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionSharedAccessSignature model - = BinaryData.fromString("{\"sas\":\"vo\"}").toObject(WorkspaceConnectionSharedAccessSignature.class); - Assertions.assertEquals("vo", model.sas()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionSharedAccessSignature model = new WorkspaceConnectionSharedAccessSignature().withSas("vo"); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionSharedAccessSignature.class); - Assertions.assertEquals("vo", model.sas()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateWithResponseMockTests.java deleted file mode 100644 index 37ebe555db56..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; -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 reactor.core.publisher.Mono; - -public final class WorkspaceConnectionsCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"AzureTableStorage\",\"createdByWorkspaceArmId\":\"njjthpsnxebycym\",\"expiryTime\":\"2021-04-08T08:44:08Z\",\"group\":\"AzureAI\",\"isSharedToAll\":false,\"target\":\"pnse\",\"metadata\":{\"dyzssjlmykdygj\":\"nous\",\"h\":\"gspjlf\",\"s\":\"ngwqxcrbcrgyoim\"},\"sharedUserList\":[\"cctvkog\",\"htvagwnnw\",\"nv\"],\"value\":\"yldjdkjvdryk\",\"valueFormat\":\"JSON\"},\"id\":\"oxh\",\"name\":\"rjlqdoqeje\",\"type\":\"fdlh\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkspaceConnectionPropertiesV2BasicResource response = manager.workspaceConnections() - .define("irlunsskydi") - .withExistingWorkspace("ex", "fjqzyhzydyvtuq") - .withProperties(new WorkspaceConnectionPropertiesV2().withCategory(ConnectionCategory.AZURE_MY_SQL_DB) - .withExpiryTime(OffsetDateTime.parse("2021-10-27T23:46:30Z")) - .withIsSharedToAll(true) - .withTarget("dcwuzs") - .withMetadata(mapOf("jeeyv", "yixecmasjnfgngxa", "axvwxtxuzh", "xbfckmoal")) - .withSharedUserList(Arrays.asList("yffwflbkjcdzu", "ygtc", "z")) - .withValue("efpubaldjcgldryv") - .withValueFormat(ValueFormat.JSON)) - .create(); - - Assertions.assertEquals(ConnectionCategory.AZURE_TABLE_STORAGE, response.properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-08T08:44:08Z"), response.properties().expiryTime()); - Assertions.assertEquals(false, response.properties().isSharedToAll()); - Assertions.assertEquals("pnse", response.properties().target()); - Assertions.assertEquals("nous", response.properties().metadata().get("dyzssjlmykdygj")); - Assertions.assertEquals("cctvkog", response.properties().sharedUserList().get(0)); - Assertions.assertEquals("yldjdkjvdryk", response.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, response.properties().valueFormat()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteWithResponseMockTests.java deleted file mode 100644 index 6ee1b46d2015..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspaceConnectionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workspaceConnections() - .deleteWithResponse("jjpduibsrrrq", "neqrypyur", "shhovtuer", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetWithResponseMockTests.java deleted file mode 100644 index b3e0c9c7ce2e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspaceConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"ApiKey\",\"createdByWorkspaceArmId\":\"knrbxzepi\",\"expiryTime\":\"2021-04-17T10:55:35Z\",\"group\":\"Database\",\"isSharedToAll\":true,\"target\":\"qbvxqtolpwbopv\",\"metadata\":{\"ithue\":\"tzaprjxcontickf\",\"jwv\":\"csgvuqzg\",\"b\":\"udmpwewpmioleaj\"},\"sharedUserList\":[\"yzwphbjks\"],\"value\":\"cmbaa\",\"valueFormat\":\"JSON\"},\"id\":\"rdkqlvzkfekdesb\",\"name\":\"jqtl\",\"type\":\"b\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkspaceConnectionPropertiesV2BasicResource response = manager.workspaceConnections() - .getWithResponse("zdsyxb", "jilbuazcco", "hwivkd", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ConnectionCategory.API_KEY, response.properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-17T10:55:35Z"), response.properties().expiryTime()); - Assertions.assertEquals(true, response.properties().isSharedToAll()); - Assertions.assertEquals("qbvxqtolpwbopv", response.properties().target()); - Assertions.assertEquals("tzaprjxcontickf", response.properties().metadata().get("ithue")); - Assertions.assertEquals("yzwphbjks", response.properties().sharedUserList().get(0)); - Assertions.assertEquals("cmbaa", response.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, response.properties().valueFormat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListMockTests.java deleted file mode 100644 index 688d7b0855b1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspaceConnectionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"Oracle\",\"createdByWorkspaceArmId\":\"hxh\",\"expiryTime\":\"2021-06-05T00:33:45Z\",\"group\":\"GenericProtocol\",\"isSharedToAll\":false,\"target\":\"zzfmugykwuyc\",\"metadata\":{\"zffpherwj\":\"enndzgthdzit\",\"xvfybxmmr\":\"vswtwonadezm\"},\"sharedUserList\":[\"vqkrr\",\"guogkcbrotp\",\"abensjflwpftvv\",\"tmvifgcv\"],\"value\":\"mal\",\"valueFormat\":\"JSON\"},\"id\":\"cx\",\"name\":\"osnx\",\"type\":\"jptcd\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.workspaceConnections() - .list("pzhbw", "xybtdzycxhao", "gjzgpljbnwczsr", "zcby", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(ConnectionCategory.ORACLE, response.iterator().next().properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-05T00:33:45Z"), - response.iterator().next().properties().expiryTime()); - Assertions.assertEquals(false, response.iterator().next().properties().isSharedToAll()); - Assertions.assertEquals("zzfmugykwuyc", response.iterator().next().properties().target()); - Assertions.assertEquals("enndzgthdzit", response.iterator().next().properties().metadata().get("zffpherwj")); - Assertions.assertEquals("vqkrr", response.iterator().next().properties().sharedUserList().get(0)); - Assertions.assertEquals("mal", response.iterator().next().properties().value()); - Assertions.assertEquals(ValueFormat.JSON, response.iterator().next().properties().valueFormat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsWithResponseMockTests.java deleted file mode 100644 index 404038d99c5d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspaceConnectionsListSecretsWithResponseMockTests { - @Test - public void testListSecretsWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"Hive\",\"createdByWorkspaceArmId\":\"aqoqbvejoysoxovl\",\"expiryTime\":\"2021-08-21T06:47:57Z\",\"group\":\"AzureAI\",\"isSharedToAll\":false,\"target\":\"qdlqqhntqrykkxak\",\"metadata\":{\"vpzgyxcc\":\"ptiic\",\"mztjekxsnnbrysg\":\"pxiema\",\"bblrtbofz\":\"tfmocn\",\"hocqxugjx\":\"hfuifwxudyn\"},\"sharedUserList\":[\"crrfbplvhmh\"],\"value\":\"osdjlz\",\"valueFormat\":\"JSON\"},\"id\":\"dghq\",\"name\":\"uyaorservpv\",\"type\":\"sorsbegcl\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkspaceConnectionPropertiesV2BasicResource response = manager.workspaceConnections() - .listSecretsWithResponse("mzxaoxlhmvj", "nn", "sbnuc", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ConnectionCategory.HIVE, response.properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-21T06:47:57Z"), response.properties().expiryTime()); - Assertions.assertEquals(false, response.properties().isSharedToAll()); - Assertions.assertEquals("qdlqqhntqrykkxak", response.properties().target()); - Assertions.assertEquals("ptiic", response.properties().metadata().get("vpzgyxcc")); - Assertions.assertEquals("crrfbplvhmh", response.properties().sharedUserList().get(0)); - Assertions.assertEquals("osdjlz", response.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, response.properties().valueFormat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListMockTests.java deleted file mode 100644 index d07093c62d7a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AmlUserFeature; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspaceFeaturesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"vvogwghxoxw\",\"displayName\":\"qkkmpfnwdrmzw\",\"description\":\"smeaciyp\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.workspaceFeatures().list("pmlrjnnbmodsytq", "vatujphqv", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vvogwghxoxw", response.iterator().next().id()); - Assertions.assertEquals("qkkmpfnwdrmzw", response.iterator().next().displayName()); - Assertions.assertEquals("smeaciyp", response.iterator().next().description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceHubConfigTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceHubConfigTests.java deleted file mode 100644 index b55ced0cf712..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceHubConfigTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceHubConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceHubConfig model = BinaryData.fromString( - "{\"additionalWorkspaceStorageAccounts\":[\"tduqktapspwgcuer\",\"umkdosvqwhbmd\",\"bbjfddgmbmbexp\",\"bhtqqrolfpfpsa\"],\"defaultWorkspaceResourceGroup\":\"bquxigjy\"}") - .toObject(WorkspaceHubConfig.class); - Assertions.assertEquals("tduqktapspwgcuer", model.additionalWorkspaceStorageAccounts().get(0)); - Assertions.assertEquals("bquxigjy", model.defaultWorkspaceResourceGroup()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceHubConfig model = new WorkspaceHubConfig() - .withAdditionalWorkspaceStorageAccounts( - Arrays.asList("tduqktapspwgcuer", "umkdosvqwhbmd", "bbjfddgmbmbexp", "bhtqqrolfpfpsa")) - .withDefaultWorkspaceResourceGroup("bquxigjy"); - model = BinaryData.fromObject(model).toObject(WorkspaceHubConfig.class); - Assertions.assertEquals("tduqktapspwgcuer", model.additionalWorkspaceStorageAccounts().get(0)); - Assertions.assertEquals("bquxigjy", model.defaultWorkspaceResourceGroup()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteMockTests.java deleted file mode 100644 index 5a1818883d15..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspacesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workspaces().delete("hlutjs", "zelsr", true, com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.java deleted file mode 100644 index 5c563bd87192..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ExternalFqdnResponse; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests { - @Test - public void testListOutboundNetworkDependenciesEndpointsWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"category\":\"xjbrixymc\",\"endpoints\":[{}]}},{\"properties\":{\"category\":\"yvurhwishy\",\"endpoints\":[{},{},{},{}]}},{\"properties\":{\"category\":\"qfev\",\"endpoints\":[{},{},{},{}]}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ExternalFqdnResponse response = manager.workspaces() - .listOutboundNetworkDependenciesEndpointsWithResponse("uzltenlb", "xlmxozesndo", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("xjbrixymc", response.value().get(0).properties().category()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysMockTests.java deleted file mode 100644 index 56ebd32e4983..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysMockTests.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.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspacesResyncKeysMockTests { - @Test - public void testResyncKeys() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workspaces().resyncKeys("qwnjzebpicciyo", "poedksp", com.azure.core.util.Context.NONE); - - } -}